Alejandro Mery
|
2ab838ea78
|
lexer: introduce NewIsInRunes() shortcut for NewIsIn()
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
05d504346e
|
lexer: extend Run() to treat io.EOF as non-error termination
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
eb9261b478
|
lexer: NewIsNot(), NewIsIn(), NewIsOneOf()
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
0098052142
|
lexer: IsSpace()
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
a02326a0a6
|
lexer: ErrUnacceptableRune and ErrNotImplemented
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
9425ba0f7c
|
lexer: introduce a Position (Line, Column) handler
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
1d62857e14
|
lexer: introduce StateFn and the basic state machine loop
v2: make the error break more explicit
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
f67d8a2443
|
lexer: introduce Error{}
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
d83b128c30
|
lexer: introduce Reader.Accept()/AcceptAll()
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
6cca2996ca
|
lexer: Implement Reader.UnreadRune() and Reader.PeekRune()
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
edcba80baa
|
lexer: fix ReadRune() to actually move the cursor
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
7230a74f49
|
lexer: runes.Reader renamed to lexer.Reader
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |