Fix tests for PR #1844.

This commit is contained in:
David Sisson 2017-04-29 17:27:08 -07:00
parent 32a8874a29
commit f41ce7fed4
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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>"