From dae74317d84471f6a859117fcbba1cf546be8ea1 Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Wed, 19 Apr 2023 15:19:42 +0100 Subject: Adds parsing substitute commands, though executing them currently does nothing --- subex/lex.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'subex/lex.go') 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, + } +} -- cgit v1.2.3