Fixed another occurrence of NewFileInputStream.

This commit is contained in:
David Sisson 2017-04-29 19:55:32 -07:00
parent fc8b14b1dc
commit e9dd953cf1
1 changed files with 6 additions and 1 deletions

View File

@ -674,6 +674,7 @@ public class BaseGoTest implements RuntimeTestSupport {
"import (\n"
+" \"github.com/antlr/antlr4/runtime/Go/antlr\"\n"
+" \"./parser\"\n"
+" \"fmt\"\n"
+" \"os\"\n"
+")\n"
+ "\n"
@ -738,7 +739,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"
+ " stream.Fill()\n"