diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2024-05-02 21:45:45 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2024-05-02 21:45:45 +0100 |
commit | b434fe4e14f6dcc8d1d7433a29351b8e8ea77d37 (patch) | |
tree | 50b7e54713d23c965f6ffc23d9feeecd1dd60301 /subex/parse.go | |
parent | 22ccb0c370cf2690f1b1a80fe003e05c6ba5e5ed (diff) | |
download | stred-go-main.tar |
Diffstat (limited to 'subex/parse.go')
-rw-r--r-- | subex/parse.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/subex/parse.go b/subex/parse.go index 9a7a75c..e91008a 100644 --- a/subex/parse.go +++ b/subex/parse.go @@ -520,6 +520,17 @@ func parseSubex(l RuneReader, minPower int, inType Type) (lhs SubexAST, outType } else { lhs = SubexASTCopyAnyValue{} } + case ',': + switch inType { + case ValueType: + outType = inType + lhs = SubexASTCopyAnySimpleValue{} + case RuneType: + outType = inType + lhs = SubexASTCopyRune{','} + default: + panic("Invalid inType") + } case '?': outType = inType lhs = SubexASTCopyBool{} |