Update LuaParser.jj and LuaParser.java to accept lua 5.2 syntax for all files in the standard tests.
This commit is contained in:
@@ -81,6 +81,34 @@ public class Stat {
|
||||
return new IfThenElse(ifexp, ifblock, elseifexps, elseifblocks, elseblock);
|
||||
}
|
||||
|
||||
public static Stat gotostat(String name) {
|
||||
return new Goto(name);
|
||||
}
|
||||
|
||||
public static Stat labelstat(String name) {
|
||||
return new Label(name);
|
||||
}
|
||||
|
||||
public static class Goto extends Stat {
|
||||
public final String name;
|
||||
public Goto(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public void accept(Visitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Label extends Stat {
|
||||
public final String name;
|
||||
public Label(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public void accept(Visitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Assign extends Stat {
|
||||
public final List<VarExp> vars;
|
||||
public final List<Exp> exps;
|
||||
|
||||
@@ -173,4 +173,8 @@ abstract public class Visitor {
|
||||
}
|
||||
public void visit(NameScope scope) {
|
||||
}
|
||||
public void visit(Stat.Goto gotostat) {
|
||||
}
|
||||
public void visit(Stat.Label label) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user