grammar: add elipsys notation to pass an expression in a vararg parameter
[nit.git] / src / parser / parser_nodes.nit
index 768597f..99fb9c6 100644 (file)
@@ -2250,6 +2250,18 @@ class AIssetAttrExpr
        init do end
 end
 
+# A elyspis notation used to pass an expression as it in a vararg parameter
+class AVarargExpr
+       super AExpr
+       var _n_expr: AExpr
+       fun n_expr: AExpr do return _n_expr
+       fun n_expr=(n_expr: AExpr) do _n_expr = n_expr
+       var _n_dotdotdot: TDotdotdot
+       fun n_dotdotdot: TDotdotdot do return _n_dotdotdot
+       fun n_dotdotdot=(n_dotdotdot: TDotdotdot) do _n_dotdotdot = n_dotdotdot
+       init do end
+end
+
 # A list of expression separated with commas (arguments for instance)
 abstract class AExprs
        super Prod 
@@ -2257,6 +2269,7 @@ abstract class AExprs
        init do end
 end
 
+
 class ADebugTypeExpr
        super AExpr
        var _n_kwdebug: TKwdebug