diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-19 13:58:13 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-19 13:58:13 +0100 |
commit | ca161b26e9b6a253837e5ec4e0cf318bd0ee7903 (patch) | |
tree | c3863c145024fd1124943e1eab525230c3236aaa /subex/parse.go | |
parent | d3d17484012dc603ae326bec419cff990898e6a0 (diff) | |
download | stred-go-ca161b26e9b6a253837e5ec4e0cf318bd0ee7903.tar |
Adds the NOT operator
Diffstat (limited to 'subex/parse.go')
-rw-r--r-- | subex/parse.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/subex/parse.go b/subex/parse.go index f5316c9..8b3a553 100644 --- a/subex/parse.go +++ b/subex/parse.go @@ -242,6 +242,8 @@ func parseSubex(l *RuneReader, minPower int) SubexAST { lhs = SubexASTNegate {lhs} case r == '/' && minPower <= 8: lhs = SubexASTReciprocal {lhs} + case r == '!' && minPower <= 8: + lhs = SubexASTNot {lhs} case r == '$' && minPower <= 8: slot := l.next() if slot == eof { |