diff options
| author | Marc Vertes <mvertes@free.fr> | 2026-01-22 23:31:41 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2026-01-22 23:31:41 +0100 |
| commit | 305e4774d543dab27d665c39fd750eb8b701948e (patch) | |
| tree | f1359b18d8361e1ee47a4b865145ae01d8b0a683 /parser/expr.go | |
| parent | 9e4a84f78283f9b5a972245076b26da312490ff0 (diff) | |
chore: use token helpers
Diffstat (limited to 'parser/expr.go')
| -rw-r--r-- | parser/expr.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/parser/expr.go b/parser/expr.go index f180c1f..1f15185 100644 --- a/parser/expr.go +++ b/parser/expr.go @@ -6,7 +6,6 @@ import ( "strconv" "github.com/mvertes/parscan/lang" - "github.com/mvertes/parscan/scanner" "github.com/mvertes/parscan/symbol" "github.com/mvertes/parscan/vm" ) @@ -176,8 +175,7 @@ func (p *Parser) parseExpr(in Tokens, typeStr string) (out Tokens, err error) { } ctype = typ.String() p.Symbols.Add(symbol.UnsetAddr, ctype, vm.NewValue(typ), symbol.Type, typ, p.funcScope != "") - // out = append(out, Token{Token: scanner.Token{Tok: lang.Ident, Pos: t.Pos, Str: ctype}}) - out = append(out, Token{Token: scanner.Token{Tok: lang.Ident, Pos: t.Pos, Str: ctype}}) + out = append(out, newIdent(ctype, t.Pos)) i++ case lang.Map: |
