New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infix:<xx> #109
Labels
Comments
From olivier.mengue@gmail.comHere is a patch for operator infix:<xx>. Added the operator to the grammar. Olivier (dolmen). |
From olivier.mengue@gmail.cominfix-xx.patchIndex: src/builtins/op.pir
===================================================================
--- src/builtins/op.pir (révision 27823)
+++ src/builtins/op.pir (copie de travail)
@@ -186,14 +186,14 @@
.sub 'infix:xx' :multi(_,_)
- .param string a
- .param int b
- $P0 = new 'ResizablePMCArray'
+ .param pmc a
+ .param int n
+ $P0 = 'list'()
lp:
- unless b, ex
+ unless n goto ex
push $P0, a
- dec b
- branch lp
+ dec n
+ goto lp
ex:
.return ($P0)
.end
Index: src/parser/grammar-oper.pg
===================================================================
--- src/parser/grammar-oper.pg (révision 27823)
+++ src/parser/grammar-oper.pg (copie de travail)
@@ -49,6 +49,8 @@
## replication
proto infix:<x> is precedence('s=') { ... }
+proto infix:<xx> is equiv(infix:<x>)
+ { ... }
## concatenation
proto infix:<~> is precedence('r=') { ... }
|
From @pmichaudApplied (with minor changes) in r27835, thanks! Pm |
@pmichaud - Status changed from 'new' to 'resolved' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Migrated from rt.perl.org#54870 (status was 'resolved')
Searchable as RT54870$
The text was updated successfully, but these errors were encountered: