parser: Add the concrete grammar for predicate definitions
authorJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Fri, 9 Jun 2017 04:38:02 +0000 (00:38 -0400)
committerJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Thu, 15 Jun 2017 18:48:08 +0000 (14:48 -0400)
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

src/parser/nit.sablecc3xx

index 6a96ed8..f626841 100644 (file)
@@ -300,6 +300,7 @@ propdefn {-> propdef}
 propdef~toplevel {-> propdef}
        = {meth} [doc]:nd redef visibility kwmeth qmethid signature annotation_noend? kwdo stmtso kwend_o {-> New propdef.meth(doc.doc, redef.kwredef, visibility, kwmeth, Null, Null, Null, qmethid.methid, signature, annotation_noend.annotations, Null, Null, kwdo, stmtso.expr, kwend_o.kwend)}
        | {nobody} [doc]:nd redef visibility kwmeth qmethid signature annotation_withend_nonull {-> New propdef.meth(doc.doc, redef.kwredef, visibility, kwmeth, Null, Null, Null, qmethid.methid, signature.signature, annotation_withend_nonull.annotations, Null, Null, Null, Null, Null)}
+!toplevel| {isa} [doc]:nd redef visibility kwisa annotation_noend? kwdo stmtso kwend_o {-> New propdef.meth(doc.doc, redef.kwredef, visibility, Null, Null, kwisa, Null, Null, New signature(Null, [], Null, Null), annotation_noend.annotations, Null, Null, kwdo, stmtso.expr, kwend_o.kwend)}
 !toplevel| {intern_new} [doc]:nd redef visibility kwnew qmethid? signature annotation_withend_nonull {-> New propdef.meth(doc.doc, redef.kwredef, visibility, Null, Null, Null, kwnew, qmethid.methid, signature, annotation_withend_nonull.annotations, Null, Null, Null, Null, Null)}
 !toplevel| {new} [doc]:nd redef visibility kwnew qmethid? signature annotation_noend? kwdo stmtso kwend_o {-> New propdef.meth(doc.doc, redef.kwredef, visibility, Null, Null, Null, kwnew, qmethid.methid, signature, annotation_noend.annotations, Null, Null, kwdo, stmtso.expr, kwend_o.kwend)}
        | {extern_implicit} [doc]:nd redef visibility kwmeth qmethid signature annotation_noend? extern_calls extern_code_block {-> New propdef.meth(doc.doc, redef.kwredef, visibility, kwmeth, Null, Null, Null, qmethid.methid, signature.signature, annotation_noend.annotations, extern_calls, extern_code_block, Null, Null, Null)}