From ca161b26e9b6a253837e5ec4e0cf318bd0ee7903 Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Wed, 19 Apr 2023 13:58:13 +0100 Subject: Adds the NOT operator --- subex/parse.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'subex/parse.go') 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 { -- cgit v1.2.3