parser_nodes: Add a class kind for class subsets
authorJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Thu, 8 Jun 2017 23:34:03 +0000 (19:34 -0400)
committerJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Tue, 13 Jun 2017 20:14:30 +0000 (16:14 -0400)
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

src/parser/parser_nodes.nit

index dc3b1f7..b6b3332 100644 (file)
@@ -539,6 +539,11 @@ class TKwenum
        super TokenKeyword
 end
 
+# The keyword `subset`
+class TKwsubset
+       super TokenKeyword
+end
+
 # The keyword `end`
 class TKwend
        super TokenKeyword
@@ -1314,6 +1319,18 @@ class AExternClasskind
        var n_kwclass: nullable TKwclass = null is writable
 end
 
+class ASubsetClasskind
+       super AClasskind
+
+       # The `subset` keyword.
+       var n_kwsubset: TKwsubset is writable, noinit
+
+       redef fun visit_all(v) do
+               # TODO: Remove this redefinition once generated from the grammar.
+               v.enter_visit(n_kwsubset)
+       end
+end
+
 # The definition of a formal generic parameter type. eg `X: Y`
 class AFormaldef
        super Prod