@@ -33,8 +33,8 @@ var grammarTestData = []struct {
33
33
{"b'abc' b'''123'''" , "eval" , "Expression(body=Bytes(s=b'abc123'))" , nil , "" },
34
34
{"1234" , "eval" , "Expression(body=Num(n=1234))" , nil , "" },
35
35
{"01234" , "eval" , "" , py .SyntaxError , "illegal decimal with leading zero" },
36
- {"1234d" , "eval" , "" , py .SyntaxError , "invalid syntax " },
37
- {"1234d" , "exec" , "" , py .SyntaxError , "invalid syntax " },
36
+ {"1234d" , "eval" , "" , py .SyntaxError , "unexpected EOF while parsing " },
37
+ {"1234d" , "exec" , "" , py .SyntaxError , "unexpected EOF while parsing " },
38
38
{"1234d" , "single" , "" , py .SyntaxError , "unexpected EOF while parsing" },
39
39
{"0x1234" , "eval" , "Expression(body=Num(n=4660))" , nil , "" },
40
40
{"12.34" , "eval" , "Expression(body=Num(n=12.34))" , nil , "" },
@@ -325,10 +325,10 @@ var grammarTestData = []struct {
325
325
{"pass\n " , "single" , "Interactive(body=[Pass()])" , nil , "" },
326
326
{"if True:\n pass\n \n " , "single" , "Interactive(body=[If(test=NameConstant(value=True), body=[Pass()], orelse=[])])" , nil , "" },
327
327
{"while True:\n pass\n else:\n return\n " , "single" , "Interactive(body=[While(test=NameConstant(value=True), body=[Pass()], orelse=[Return(value=None)])])" , nil , "" },
328
- {"a='potato" , "eval" , "" , py .SyntaxError , "invalid syntax " },
328
+ {"a='potato" , "eval" , "" , py .SyntaxError , "unexpected EOF while parsing " },
329
329
{"a='potato" , "exec" , "" , py .SyntaxError , "EOL while scanning string literal" },
330
330
{"a='potato" , "single" , "" , py .SyntaxError , "EOL while scanning string literal" },
331
- {"a='''potato" , "eval" , "" , py .SyntaxError , "invalid syntax " },
331
+ {"a='''potato" , "eval" , "" , py .SyntaxError , "unexpected EOF while parsing " },
332
332
{"a='''potato" , "exec" , "" , py .SyntaxError , "EOF while scanning triple-quoted string literal" },
333
333
{"a='''potato" , "single" , "" , py .SyntaxError , "EOF while scanning triple-quoted string literal" },
334
334
}
0 commit comments