fixer parser when there is no args
This commit is contained in:
@@ -31,10 +31,9 @@ liste_param returns [ArrayList<VarImp> out]
|
|||||||
@init{
|
@init{
|
||||||
$out = new ArrayList<VarImp>();
|
$out = new ArrayList<VarImp>();
|
||||||
}:
|
}:
|
||||||
(
|
ii1=ident {$out.add(new VarImp($ii1.out));}
|
||||||
(ii1=ident {$out.add(new VarImp($ii1.out));})
|
|
||||||
(VIRGULE ii2=ident {$out.add(new VarImp($ii2.out));})*
|
(VIRGULE ii2=ident {$out.add(new VarImp($ii2.out));})*
|
||||||
)*
|
|
||||||
;
|
;
|
||||||
|
|
||||||
functions returns [ArrayList<Function> out]
|
functions returns [ArrayList<Function> out]
|
||||||
@@ -221,7 +220,7 @@ lit returns [Expression out]:
|
|||||||
}
|
}
|
||||||
| t=ident
|
| t=ident
|
||||||
(
|
(
|
||||||
ParO (para=list_expression)? ParF {$out = new AppealImp($t.out,$para.out);}
|
ParO (para=list_expression)? ParF {$out = new AppealImp($t.out,($para.out !=null) ?$para.out : new ArrayList<>());}
|
||||||
| {$out=new VarImp($t.out);}
|
| {$out=new VarImp($t.out);}
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user