diff options
Diffstat (limited to 'subex/subexast.go')
-rw-r--r-- | subex/subexast.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/subex/subexast.go b/subex/subexast.go index c583245..0afd3e3 100644 --- a/subex/subexast.go +++ b/subex/subexast.go @@ -2,6 +2,7 @@ package subex import ( "fmt" + "main/walk" ) type SubexAST interface { @@ -90,10 +91,12 @@ func (ast SubexASTRepeat) compileWith(next SubexState) SubexState { return next } -type SubexASTCopyRune rune +type SubexASTCopyRune struct { + datum walk.Datum +} func (ast SubexASTCopyRune) compileWith(next SubexState) SubexState { return &SubexCopyRuneState{ - rune: rune(ast), + rune: ast.datum, next: next, } } @@ -153,7 +156,7 @@ func (ast SubexASTJoin) compileWith(next SubexState) SubexState { } type SubexASTRange struct { - parts map[rune]rune + parts map[walk.Datum]walk.Datum } func (ast SubexASTRange) compileWith(next SubexState) SubexState { return &SubexRangeState { |