// !nopar to unambiguise 'foo[5].bar' between '(foo[5]).bar' and 'foo([5].bar),
!nobra!nopar | {range} obra no expr [n2]:no dotdot [n3]:no [expr2]:expr_nobra [n4]:no cbra annotations_o {-> New expr.crange(obra, expr, expr2.expr, cbra, annotations_o.annotations)}
!nobra!nopar | {orange} obra no expr [n2]:no dotdot [n3]:no [expr2]:expr_nobra [n4]:no [cbra]:obra annotations_o {-> New expr.orange(obra, expr, expr2.expr, cbra, annotations_o.annotations)}
-!nobra!nopar | {array} braargs annotations_o {-> New expr.array(braargs.exprs, annotations_o.annotations)}
+!nobra!nopar | {array} obra no args_list typing_o cbra annotations_o {-> New expr.array(obra, args_list.exprs, typing_o.type, cbra, annotations_o.annotations)}
;
superstring {-> expr}
;
braargs {-> exprs}
= obra no expr_list cbra {-> New exprs.bra(obra, [expr_list.expr], cbra)};
+args_list {-> exprs}
+ = expr_list {-> New exprs.list([expr_list.expr])};
expr_list {-> expr*}
= expr [n2]:no expr_tail* {-> [expr, expr_tail.expr]};
expr_tail {-> expr}
| {range} expr [expr2]:expr annotations?
| {crange} obra expr [expr2]:expr cbra annotations?
| {orange} obra expr [expr2]:expr [cbra]:obra annotations?
- | {array} [exprs]:exprs annotations?
+ | {array} obra [exprs]:exprs type? cbra annotations?
| {self} kwself annotations?
| {implicit_self}
| {true} kwtrue annotations?
# A literal array. eg. `[x,y,z]`
class AArrayExpr
super AExpr
+ var n_obra: TObra is writable, noinit
var n_exprs: AExprs is writable, noinit
+ var n_type: nullable AType = null is writable
+ var n_cbra: TCbra is writable, noinit
end
# A read of `self`