diff options
| author | Marc Vertes <mvertes@free.fr> | 2023-11-20 19:28:31 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2023-11-20 19:28:31 +0100 |
| commit | ae58deb5da1fa2ae5e461783ce592a9b962da778 (patch) | |
| tree | de1d3bf4ce4ceea9c7386d191aecb6801b407ca0 /parser/expr.go | |
| parent | 6a0490257bf235d011004bc303306f617ac6ea31 (diff) | |
parser: add pointer support (work in progress)
This is incomplete because the scalar variables are not addressable
right now. To be addressable they must be represented as reflect
values, not interfaces.
Diffstat (limited to 'parser/expr.go')
| -rw-r--r-- | parser/expr.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parser/expr.go b/parser/expr.go index 207f38b..806fd75 100644 --- a/parser/expr.go +++ b/parser/expr.go @@ -42,7 +42,7 @@ func (p *Parser) ParseExpr(in Tokens) (out Tokens, err error) { case lang.Int, lang.String: out = append(out, t) vl++ - case lang.Define, lang.Add, lang.Sub, lang.Assign, lang.Equal, lang.Greater, lang.Less, lang.Mul, lang.Land, lang.Lor, lang.Shl, lang.Shr, lang.Not: + case lang.Define, lang.Add, lang.Sub, lang.Assign, lang.Equal, lang.Greater, lang.Less, lang.Mul, lang.Land, lang.Lor, lang.Shl, lang.Shr, lang.Not, lang.And: if i == 0 || in[i-1].Id.IsOperator() { // An operator preceded by an operator or no token is unary. t.Id = lang.UnaryOp[t.Id] |
