diff options
Diffstat (limited to 'source/lexer.elna')
| -rw-r--r-- | source/lexer.elna | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/source/lexer.elna b/source/lexer.elna index 3b015ad..318d740 100644 --- a/source/lexer.elna +++ b/source/lexer.elna @@ -30,7 +30,9 @@ type finish ) ElnaLexerToken* = record - kind: ElnaLexerKind + kind: ElnaLexerKind; + start: String; (* DEPRECATED *) + position: ElnaPosition end ElnaLexerBooleanToken* = record(ElnaLexerToken) value: Bool @@ -44,15 +46,27 @@ type ElnaLexerIntegerToken* = record(ElnaLexerToken) value: Int end + TransitionAction = proc(lexer: ^Lexer; token: ^ElnaLexerToken) + (* DEPRECATED should be replaced with TransitionAction (but keeping the type name). *) + ElnaLexerAction = (none, accumulate, skip, single, eof, finalize, composite, key_id, integer, delimited) + ElnaLexerTransition = record - action: TransitionAction; + action: ElnaLexerAction; next_state: ElnaLexerState end + ElnaLexerCursor = record + state: ElnaLexerState; + start: ^Char; + finish: ^Char; + token: ^ElnaLexerToken; + position: ElnaPosition + end + BufferPosition* = record iterator: ^Char; - location: TextLocation + location: ElnaLocation end Lexer* = record input: ^FILE; |
