diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-19 15:19:42 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-19 15:19:42 +0100 |
commit | dae74317d84471f6a859117fcbba1cf546be8ea1 (patch) | |
tree | db8516ba8a5a208d16aaa0e6da439541dd496b94 /subex/lex.go | |
parent | 10f847acc7087317b0fbe20b7cf3307a0fafab8a (diff) | |
download | stred-go-dae74317d84471f6a859117fcbba1cf546be8ea1.tar |
Adds parsing substitute commands, though executing them currently does nothing
Diffstat (limited to 'subex/lex.go')
-rw-r--r-- | subex/lex.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/subex/lex.go b/subex/lex.go index 74bf370..0f00a99 100644 --- a/subex/lex.go +++ b/subex/lex.go @@ -22,3 +22,11 @@ func (l *StringRuneReader) Next() rune { func (l *StringRuneReader) Rewind() { l.pos -= l.width } + +func NewStringRuneReader(input string) RuneReader { + return &StringRuneReader { + input: input, + pos: 0, + width: 0, + } +} |