<- 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.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/subex/parse.go b/subex/parse.go
index de53e2a..746217b 100644
--- a/subex/parse.go
+++ b/subex/parse.go
@@ -159,7 +159,7 @@ func parseRepeatRange(l RuneReader) (output []ConvexRange) {
return output
}
-func parseReplacement(l RuneReader) (output []OutputContent) {
+func parseReplacement(l RuneReader) (output []OutputContentAST) {
// TODO escaping
loop: for {
r := l.Next()
@@ -173,16 +173,16 @@ func parseReplacement(l RuneReader) (output []OutputContent) {
if slot == eof {
panic("Missing slot character")
}
- output = append(output, OutputLoad{slot: slot})
+ output = append(output, OutputLoadAST{slot: slot})
case '`':
literals := parseNonStringLiteral(l)
for _, literal := range literals {
- output = append(output, OutputAtomLiteral {literal})
+ output = append(output, OutputAtomLiteralAST {literal})
}
case '"':
- output = append(output, OutputAtomLiteral {walk.NewAtomStringTerminal()})
+ output = append(output, OutputAtomLiteralAST {walk.NewAtomStringTerminal()})
default:
- output = append(output, OutputAtomLiteral{atom: walk.NewAtomStringRune(r)})
+ output = append(output, OutputAtomLiteralAST{atom: walk.NewAtomStringRune(r)})
}
}
return output
@@ -296,12 +296,12 @@ func parseSubex(l RuneReader, minPower int) SubexAST {
case '^':
replacement := parseReplacement(l)
replacement = append(
- []OutputContent{OutputAtomLiteral {walk.NewAtomStringTerminal()}},
+ []OutputContentAST{OutputAtomLiteralAST {walk.NewAtomStringTerminal()}},
replacement...
)
replacement = append(
replacement,
- OutputAtomLiteral {walk.NewAtomStringTerminal()},
+ OutputAtomLiteralAST {walk.NewAtomStringTerminal()},
)
lhs = SubexASTOutput {replacement}
case '.':
@@ -320,9 +320,9 @@ func parseSubex(l RuneReader, minPower int) SubexAST {
lhs = SubexASTCopyAtom {walk.NewAtomStringTerminal()}
case '~':
literals := parseNonStringLiteral(l)
- var replacement []OutputContent
+ var replacement []OutputContentAST
for _, literal := range literals {
- replacement = append(replacement, OutputAtomLiteral {literal})
+ replacement = append(replacement, OutputAtomLiteralAST {literal})
}
lhs = SubexASTOutput {replacement}
default: