diff options
Diffstat (limited to 'subex')
-rw-r--r-- | subex/parse.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subex/parse.go b/subex/parse.go index 1e5e36e..24ff3d1 100644 --- a/subex/parse.go +++ b/subex/parse.go @@ -356,5 +356,9 @@ func parseSubex(l RuneReader, minPower int) SubexAST { } func Parse(l RuneReader) SubexAST { - return parseSubex(l, 0) + ast := parseSubex(l, 0) + if ast == nil { + return SubexASTEmpty{} + } + return ast } |