X-Git-Url: http://nitlanguage.org diff --git a/src/parser/parser_nodes.nit b/src/parser/parser_nodes.nit index 30faf18..8793a00 100644 --- a/src/parser/parser_nodes.nit +++ b/src/parser/parser_nodes.nit @@ -1898,11 +1898,24 @@ class AVarargExpr end # A list of expression separated with commas (arguments for instance) -abstract class AExprs - super Prod +class AManyExpr + super AExpr var n_exprs = new ANodes[AExpr](self) end +# A special expression that encapsulates a static type +# Can only be found in special construction like arguments of annotations. +class ATypeExpr + super AExpr + var n_type: AType is writable, noinit +end + +# A special expression that encapsulate an annotation +# Can only be found in special construction like arguments of annotations. +class AAtExpr + super AExpr +end + # A special expression to debug types class ADebugTypeExpr super AExpr @@ -1912,6 +1925,12 @@ class ADebugTypeExpr var n_type: AType is writable, noinit end +# A list of expression separated with commas (arguments for instance) +abstract class AExprs + super Prod + var n_exprs = new ANodes[AExpr](self) +end + # A simple list of expressions class AListExprs super AExprs @@ -2002,32 +2021,10 @@ class AAnnotation var n_visibility: nullable AVisibility is writable var n_atid: AAtid is writable, noinit var n_opar: nullable TOpar = null is writable - var n_args = new ANodes[AAtArg](self) + var n_args = new ANodes[AExpr](self) var n_cpar: nullable TCpar = null is writable end -# A single argument of an annotation -abstract class AAtArg - super Prod -end - -# A type-like argument of an annotation -class ATypeAtArg - super AAtArg - var n_type: AType is writable, noinit -end - -# An expression-like argument of an annotation -class AExprAtArg - super AAtArg - var n_expr: AExpr is writable, noinit -end - -# An annotation-like argument of an annotation -class AAtAtArg - super AAtArg -end - # An annotation name abstract class AAtid super Prod