rta: improve code for methods of classes
[nit.git] / src / parser / parser_abs.nit
index b26e0f9..ee78df0 100644 (file)
@@ -301,10 +301,7 @@ end
 class TAttrid
        super Token
 end
 class TAttrid
        super Token
 end
-class TNumber
-       super Token
-end
-class THexNumber
+class TInteger
        super Token
 end
 class TFloat
        super Token
 end
 class TFloat
@@ -356,6 +353,8 @@ class AClasskind super Prod end
 class AFormaldef super Prod end
 class APropdef super Prod end
 class AMethid super Prod end
 class AFormaldef super Prod end
 class APropdef super Prod end
 class AMethid super Prod end
+class AQid super Prod end
+class AQclassid super Prod end
 class ASignature super Prod end
 class AParam super Prod end
 class AType super Prod end
 class ASignature super Prod end
 class AParam super Prod end
 class AType super Prod end
@@ -363,6 +362,7 @@ class ALabel super Prod end
 class AExpr super Prod end
 class AExprs super Prod end
 class AAssignOp super Prod end
 class AExpr super Prod end
 class AExprs super Prod end
 class AAssignOp super Prod end
+class AForGroup super Prod end
 class AModuleName super Prod end
 class AExternCalls super Prod end
 class AExternCall super Prod end
 class AModuleName super Prod end
 class AExternCalls super Prod end
 class AExternCall super Prod end
@@ -425,7 +425,7 @@ class AStdClassdef
        var n_kwredef: nullable TKwredef = null is writable
        var n_visibility: AVisibility is writable, noinit
        var n_classkind: AClasskind is writable, noinit
        var n_kwredef: nullable TKwredef = null is writable
        var n_visibility: AVisibility is writable, noinit
        var n_classkind: AClasskind is writable, noinit
-       var n_id: nullable TClassid = null is writable
+       var n_qid: nullable AQclassid = null is writable
        var n_obra: nullable TObra = null is writable
        var n_formaldefs: List[AFormaldef] = new List[AFormaldef]
        var n_cbra: nullable TCbra = null is writable
        var n_obra: nullable TObra = null is writable
        var n_formaldefs: List[AFormaldef] = new List[AFormaldef]
        var n_cbra: nullable TCbra = null is writable
@@ -495,7 +495,7 @@ class ATypePropdef
        var n_kwredef: nullable TKwredef = null is writable
        var n_visibility: AVisibility is writable, noinit
        var n_kwtype: TKwtype is writable, noinit
        var n_kwredef: nullable TKwredef = null is writable
        var n_visibility: AVisibility is writable, noinit
        var n_kwtype: TKwtype is writable, noinit
-       var n_id: TClassid is writable, noinit
+       var n_qid: AQclassid is writable, noinit
        var n_type: AType is writable, noinit
        var n_annotations: nullable AAnnotations = null is writable
 end
        var n_type: AType is writable, noinit
        var n_annotations: nullable AAnnotations = null is writable
 end
@@ -632,6 +632,16 @@ class ABraassignMethid
        var n_cbra: TCbra is writable, noinit
        var n_assign: TAssign is writable, noinit
 end
        var n_cbra: TCbra is writable, noinit
        var n_assign: TAssign is writable, noinit
 end
+class AQid
+       super AQid
+       var n_qualified: nullable AQualified = null is writable
+       var n_id: TId is writable, noinit
+end
+class AQclassid
+       super AQclassid
+       var n_qualified: nullable AQualified = null is writable
+       var n_id: TClassid is writable, noinit
+end
 class ASignature
        super ASignature
        var n_opar: nullable TOpar = null is writable
 class ASignature
        super ASignature
        var n_opar: nullable TOpar = null is writable
@@ -649,7 +659,7 @@ end
 class AType
        super AType
        var n_kwnullable: nullable TKwnullable = null is writable
 class AType
        super AType
        var n_kwnullable: nullable TKwnullable = null is writable
-       var n_id: TClassid is writable, noinit
+       var n_qid: AQclassid is writable, noinit
        var n_obra: nullable TObra = null is writable
        var n_types: List[AType] = new List[AType]
        var n_cbra: nullable TCbra = null is writable
        var n_obra: nullable TObra = null is writable
        var n_types: List[AType] = new List[AType]
        var n_cbra: nullable TCbra = null is writable
@@ -734,9 +744,7 @@ end
 class AForExpr
        super AExpr
        var n_kwfor: TKwfor is writable, noinit
 class AForExpr
        super AExpr
        var n_kwfor: TKwfor is writable, noinit
-       var n_ids: List[TId] = new List[TId]
-       var n_kwin: TKwin is writable, noinit
-       var n_expr: AExpr is writable, noinit
+       var n_groups: List[AForGroup] = new List[AForGroup]
        var n_kwdo: TKwdo is writable, noinit
        var n_block: nullable AExpr = null is writable
        var n_label: nullable ALabel = null is writable
        var n_kwdo: TKwdo is writable, noinit
        var n_block: nullable AExpr = null is writable
        var n_label: nullable ALabel = null is writable
@@ -934,7 +942,7 @@ class ANewExpr
        super AExpr
        var n_kwnew: TKwnew is writable, noinit
        var n_type: AType is writable, noinit
        super AExpr
        var n_kwnew: TKwnew is writable, noinit
        var n_type: AType is writable, noinit
-       var n_id: nullable TId = null is writable
+       var n_qid: nullable AQid = null is writable
        var n_args: AExprs is writable, noinit
 end
 class AAttrExpr
        var n_args: AExprs is writable, noinit
 end
 class AAttrExpr
@@ -959,13 +967,13 @@ end
 class ACallExpr
        super AExpr
        var n_expr: AExpr is writable, noinit
 class ACallExpr
        super AExpr
        var n_expr: AExpr is writable, noinit
-       var n_id: TId is writable, noinit
+       var n_qid: AQid is writable, noinit
        var n_args: AExprs is writable, noinit
 end
 class ACallAssignExpr
        super AExpr
        var n_expr: AExpr is writable, noinit
        var n_args: AExprs is writable, noinit
 end
 class ACallAssignExpr
        super AExpr
        var n_expr: AExpr is writable, noinit
-       var n_id: TId is writable, noinit
+       var n_qid: AQid is writable, noinit
        var n_args: AExprs is writable, noinit
        var n_assign: TAssign is writable, noinit
        var n_value: AExpr is writable, noinit
        var n_args: AExprs is writable, noinit
        var n_assign: TAssign is writable, noinit
        var n_value: AExpr is writable, noinit
@@ -973,7 +981,7 @@ end
 class ACallReassignExpr
        super AExpr
        var n_expr: AExpr is writable, noinit
 class ACallReassignExpr
        super AExpr
        var n_expr: AExpr is writable, noinit
-       var n_id: TId is writable, noinit
+       var n_qid: AQid is writable, noinit
        var n_args: AExprs is writable, noinit
        var n_assign_op: AAssignOp is writable, noinit
        var n_value: AExpr is writable, noinit
        var n_args: AExprs is writable, noinit
        var n_assign_op: AAssignOp is writable, noinit
        var n_value: AExpr is writable, noinit
@@ -1080,14 +1088,9 @@ class ANullExpr
        var n_kwnull: TKwnull is writable, noinit
        var n_annotations: nullable AAnnotations = null is writable
 end
        var n_kwnull: TKwnull is writable, noinit
        var n_annotations: nullable AAnnotations = null is writable
 end
-class ADecIntExpr
-       super AExpr
-       var n_number: TNumber is writable, noinit
-       var n_annotations: nullable AAnnotations = null is writable
-end
-class AHexIntExpr
+class AIntegerExpr
        super AExpr
        super AExpr
-       var n_hex_number: THexNumber is writable, noinit
+       var n_integer: TInteger is writable, noinit
        var n_annotations: nullable AAnnotations = null is writable
 end
 class AFloatExpr
        var n_annotations: nullable AAnnotations = null is writable
 end
 class AFloatExpr
@@ -1247,6 +1250,12 @@ class AGgAssignOp
        super AAssignOp
        var n_op: TGgeq is writable, noinit
 end
        super AAssignOp
        var n_op: TGgeq is writable, noinit
 end
+class AForGroup
+       super AForGroup
+       var n_ids: List[TId] = new List[TId]
+       var n_kwin: TKwin is writable, noinit
+       var n_expr: AExpr is writable, noinit
+end
 class AModuleName
        super AModuleName
        var n_quad: nullable TQuad = null is writable
 class AModuleName
        super AModuleName
        var n_quad: nullable TQuad = null is writable