<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/parse.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2023-04-20 15:31:05 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2023-04-20 15:31:05 +0100
commit9bffe238bd97d1dc606c84f2dfc4c73c99b36eea (patch)
treeda8501c35300d7b09db986db6f933e4fda6be454 /subex/parse.go
parent79ac135cee306cbcfa4b73f1b7c0b404712fee7b (diff)
downloadstred-go-9bffe238bd97d1dc606c84f2dfc4c73c99b36eea.tar
Properly exports all SubexASTs
Diffstat (limited to 'subex/parse.go')
-rw-r--r--subex/parse.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/subex/parse.go b/subex/parse.go
index 4b1aa6e..5675ae0 100644
--- a/subex/parse.go
+++ b/subex/parse.go
@@ -305,7 +305,7 @@ func parseSubex(l RuneReader, minPower int) SubexAST {
}
lhs = SubexASTOutput {replacement}
default:
- lhs = SubexASTCopyAtom{atom: walk.StringAtom(r)}
+ lhs = SubexASTCopyAtom{Atom: walk.StringAtom(r)}
}
loop: for {
if minPower <= 0 {
@@ -319,8 +319,8 @@ func parseSubex(l RuneReader, minPower int) SubexAST {
switch {
case r == '{' && minPower <= 8:
lhs = SubexASTRepeat {
- content: lhs,
- acceptable: parseRepeatRange(l),
+ Content: lhs,
+ Acceptable: parseRepeatRange(l),
}
case r == '+' && minPower <= 8:
lhs = SubexASTSum {lhs}
@@ -338,8 +338,8 @@ func parseSubex(l RuneReader, minPower int) SubexAST {
panic("Missing slot character")
}
lhs = SubexASTStore{
- match: lhs,
- slot: slot,
+ Match: lhs,
+ Slot: slot,
}
case r == '|' && minPower <= 4:
rhs := parseSubex(l, 5)
@@ -353,8 +353,8 @@ func parseSubex(l RuneReader, minPower int) SubexAST {
panic("Missing subex after ;")
}
lhs = SubexASTJoin{
- content: lhs,
- delimiter: rhs,
+ Content: lhs,
+ Delimiter: rhs,
}
default:
l.Rewind()