<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'subex/parse.go')
-rw-r--r--subex/parse.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/subex/parse.go b/subex/parse.go
index fa98ecc..9602a4b 100644
--- a/subex/parse.go
+++ b/subex/parse.go
@@ -293,6 +293,18 @@ func parseSubex(l RuneReader, minPower int, inType Type, outType Type) SubexAST
panic("Missing matching ~")
}
lhs = SubexASTEnterString {lhs}
+ case '@':
+ if !accept(l, "(") {
+ panic("Missing ( after @")
+ }
+ lhs = parseSubex(l, 0, ValueType, ValueType)
+ if !accept(l, ")") {
+ panic("Missing matching )")
+ }
+ if !accept(l, "@") {
+ panic("Missing matching ~")
+ }
+ lhs = SubexASTEnterArray {lhs}
// TODO
// case '[':
// rangeParts := parseRangeSubex(l)