forked from jasder/antlr
Fix tests for PR #1844.
This commit is contained in:
parent
32a8874a29
commit
f41ce7fed4
|
@ -88,7 +88,7 @@ func (this *TreeShapeListener) EnterEveryRule(ctx antlr.ParserRuleContext) {
|
|||
}
|
||||
|
||||
func main() {
|
||||
input := antlr.NewFileStream(os.Args[1])
|
||||
input, _ := antlr.NewFileStream(os.Args[1])
|
||||
lexer := parser.NewJSONLexer(input)
|
||||
stream := antlr.NewCommonTokenStream(lexer,0)
|
||||
p := parser.NewJSONParser(stream)
|
||||
|
|
|
@ -696,7 +696,11 @@ public class BaseGoTest implements RuntimeTestSupport {
|
|||
+ "}\n"
|
||||
+ "\n"
|
||||
+ "func main() {\n"
|
||||
+ " input := antlr.NewFileStream(os.Args[1])\n"
|
||||
+ " input, err := antlr.NewFileStream(os.Args[1])\n"
|
||||
+ " if err != nil {\n"
|
||||
+ " fmt.Printf("Failed to find file: %v", err)\n"
|
||||
+ " return\n"
|
||||
+ " }\n"
|
||||
+ " lexer := parser.New<lexerName>(input)\n"
|
||||
+ " stream := antlr.NewCommonTokenStream(lexer,0)\n"
|
||||
+ "<createParser>"
|
||||
|
|
Loading…
Reference in New Issue