class MiniLexer

Direct Known Subclasses

Defined in:

models/minilexer/minilexer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def <<(t : Tuple(Symbol, String)) #

[View source]
def <<(t : Tuple(Symbol, Char)) #

[View source]
def <<(t : Tuple(Symbol, Char | String)) #

[View source]
def find(token_type : Symbol) : Array(Token) #

[View source]
def line : Int #

[View source]
def mode : Symbol #

[View source]
def mode=(mode : Symbol) #

[View source]
def mode=(mode : Symbol) #

[View source]
def tokenize(input : String) : Array(Token) #

[View source]
def tokenize_logic(input : String) : Array(Token) #

[View source]
def tokens : Array(Token) #

[View source]
def tokens=(tokens : Array(Token)) #

[View source]
def trace(io : IO = STDERR) #

Token dump for debugging a lexer by hand. Written to STDERR, like every other Noir diagnostic: STDOUT carries the report, so a puts here would land in the middle of a -f json / -f sarif document the moment anyone called this from inside a scan. Nothing calls it today, which is exactly why the stream it writes to has to be right before someone does.


[View source]