remove error handling in scanner
This commit is contained in:
1 parent
a3965ca1d9
commit
5470783f99
3 files changed
+42
-38
No files matched your search
+19
-1
@@ -35,6 +35,12 @@ var gTests = []struct {
|
||||
[]Expr{&SetExpr{"hidden", ""}, &SetExpr{"preview", ""}},
|
||||
},
|
||||
|
||||
{
|
||||
"set hidden\nset preview",
|
||||
[]string{"set", "hidden", "\n", "set", "preview", "\n"},
|
||||
[]Expr{&SetExpr{"hidden", ""}, &SetExpr{"preview", ""}},
|
||||
},
|
||||
|
||||
{
|
||||
"set ratios 1:2:3",
|
||||
[]string{"set", "ratios", "1:2:3", "\n"},
|
||||
@@ -53,12 +59,24 @@ var gTests = []struct {
|
||||
[]Expr{&ListExpr{[]Expr{&SetExpr{"ratios", "1:2:3"}}}},
|
||||
},
|
||||
|
||||
{
|
||||
":set ratios 1:2:3\nset hidden",
|
||||
[]string{":", "set", "ratios", "1:2:3", "\n", "\n", "set", "hidden", "\n"},
|
||||
[]Expr{&ListExpr{[]Expr{&SetExpr{"ratios", "1:2:3"}}}, &SetExpr{"hidden", ""}},
|
||||
},
|
||||
|
||||
{
|
||||
":set ratios 1:2:3;",
|
||||
[]string{":", "set", "ratios", "1:2:3", ";", "\n"},
|
||||
[]Expr{&ListExpr{[]Expr{&SetExpr{"ratios", "1:2:3"}}}},
|
||||
},
|
||||
|
||||
{
|
||||
":set ratios 1:2:3;\nset hidden",
|
||||
[]string{":", "set", "ratios", "1:2:3", ";", "\n", "set", "hidden", "\n"},
|
||||
[]Expr{&ListExpr{[]Expr{&SetExpr{"ratios", "1:2:3"}}}, &SetExpr{"hidden", ""}},
|
||||
},
|
||||
|
||||
{
|
||||
"map gh cd ~",
|
||||
[]string{"map", "gh", "cd", "~", "\n"},
|
||||
@@ -126,7 +144,7 @@ var gTests = []struct {
|
||||
},
|
||||
|
||||
{
|
||||
"map r push :rename<space> # trailing comments area allowed after a space",
|
||||
"map r push :rename<space> # trailing comments are allowed after a space",
|
||||
[]string{"map", "r", "push", ":rename<space>", "\n"},
|
||||
[]Expr{&MapExpr{"r", &CallExpr{"push", []string{":rename<space>"}}}},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user