Fixed another occurrence of NewFileInputStream.
This commit is contained in:
parent
fc8b14b1dc
commit
e9dd953cf1
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue