summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
11cd9a9)
Signed-off-by: Jean Privat <jean@pryen.org>
| {bra} obra [exprs]:expr* cbra
;
assign_op
| {bra} obra [exprs]:expr* cbra
;
assign_op
- = {plus} pluseq
- | {minus} minuseq
+ = {plus} [op]:pluseq
+ | {minus}[op]:minuseq
;
module_name = quad? [path]:id* id;
;
module_name = quad? [path]:id* id;
# A complex assignment operator. (`+=` and `-=`)
abstract class AAssignOp
super Prod
# A complex assignment operator. (`+=` and `-=`)
abstract class AAssignOp
super Prod
+
+ # The combined assignment operator
+ var n_op: Token is writable, noinit
+
+ # The name of the operator without the `=` (eg '+')
+ fun operator: String is abstract
end
# The `+=` assignment operation
class APlusAssignOp
super AAssignOp
end
# The `+=` assignment operation
class APlusAssignOp
super AAssignOp
- # The `+=` operator
- var n_pluseq: TPluseq is writable, noinit
+ redef fun operator do return "+"
end
# The `-=` assignment operator
class AMinusAssignOp
super AAssignOp
end
# The `-=` assignment operator
class AMinusAssignOp
super AAssignOp
- # The `-=` operator
- var n_minuseq: TMinuseq is writable, noinit
+ redef fun operator do return "-"
end
# A possibly fully-qualified module identifier
end
# A possibly fully-qualified module identifier