diff options
Diffstat (limited to 'subex/parse.go')
-rw-r--r-- | subex/parse.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/subex/parse.go b/subex/parse.go index 8b3a553..d6ef995 100644 --- a/subex/parse.go +++ b/subex/parse.go @@ -109,7 +109,7 @@ func parseReplacement(l *RuneReader) (output []OutputContent) { case '@', '~', '#': output = append(output, OutputAtomLiteral{atom: parseTerminatorAtomLiteral(r, l)}) default: - output = append(output, OutputAtomLiteral{atom: r}) + output = append(output, OutputAtomLiteral{atom: walk.StringAtom(r)}) } } return output @@ -143,10 +143,10 @@ func parseRangeSubex(l *RuneReader) map[walk.Atom]walk.Atom { fromsEnd = fromsStart } for i := fromsStart; i <= fromsEnd; i += 1 { - froms = append(froms, i) + froms = append(froms, walk.StringAtom(i)) } } else { - froms = append(froms, fromsStart) + froms = append(froms, walk.StringAtom(fromsStart)) } } if len(froms) == 0 { @@ -173,10 +173,10 @@ func parseRangeSubex(l *RuneReader) map[walk.Atom]walk.Atom { tosEnd = tosStart } for i := tosStart; i <= tosEnd; i += 1 { - tos = append(tos, i) + tos = append(tos, walk.StringAtom(i)) } } else { - tos = append(tos, tosStart) + tos = append(tos, walk.StringAtom(tosStart)) } } } else { @@ -217,7 +217,7 @@ func parseSubex(l *RuneReader, minPower int) SubexAST { case '@', '#', '~': lhs = SubexASTCopyAtom{atom: parseTerminatorAtomLiteral(r, l)} default: - lhs = SubexASTCopyAtom{atom: r} + lhs = SubexASTCopyAtom{atom: walk.StringAtom(r)} } loop: for { if minPower <= 0 { |