parser: fix parser test
This commit is contained in:
parent
0cf842255d
commit
1f47d675b9
@ -75,7 +75,7 @@ func TestListType(t *testing.T) {
|
|||||||
t.Errorf("node should be of type LiteralType, got: %+v", item.Val)
|
t.Errorf("node should be of type LiteralType, got: %+v", item.Val)
|
||||||
}
|
}
|
||||||
|
|
||||||
var tokens []token.Type
|
tokens := []token.Type{}
|
||||||
for _, li := range list.List {
|
for _, li := range list.List {
|
||||||
if tp, ok := li.(*ast.LiteralType); ok {
|
if tp, ok := li.(*ast.LiteralType); ok {
|
||||||
tokens = append(tokens, tp.Token.Type)
|
tokens = append(tokens, tp.Token.Type)
|
||||||
|
Loading…
Reference in New Issue
Block a user