class

Obelisk::LexerState

Inherits Reference < Object

Enhanced state for regex-based lexers with advanced mutations

Constructors

new(text : String, pos : Int32 = 0, stack : Array(String) = ["root"])
Source

Instance methods

active_states
Source
add_combined_state(state : String) : Nil
Source
advance(count : Int32) : Nil
Source
at_end?

Position and text operations

Source
clear_combined_states
Source
clear_context
Source
clone
Source
combined_states
Source
context
Source
context=(context : Hash(String, String))
Source
current_include_state
Source
current_state
Source
exit_include
Source
get_context(key : String) : String | Nil
Source
has_combined_state?(state : String) : Bool
Source
in_include_state?
Source
in_state?(state : String) : Bool

State queries

Source
include_stack
Source
include_state(state : String) : Nil

Advanced state mutations

Source
pop_state
Source
pos=(pos : Int32)
Source
push_state(state : String) : Nil

Basic state operations

Source
remaining
Source
remove_combined_state(state : String) : Nil
Source
set_context(key : String, value : String) : Nil

Context management

Source
stack
Source
text
Source
text=(text : String)
Source