class CPU::Scanner

Overview

The scanner for parsing

Defined in:

cr6502/parser/scanner.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(source : String, line : Int32, labels : Array(Tuple(String, UInt16 | UInt8, Bool))) #

Instance Method Detail

def add_token(type : TokenType, literal : Int32 | Nil = nil) #

def advance #

def binary #

def hex #

def identifier #

def is_alpha(c : Char) #

def is_alpha_numeric(c : Char) #

def is_at_end #

def labels : Array(Tuple(String, UInt8 | UInt16, Bool)) #

def labels=(labels : Array(Tuple(String, UInt8 | UInt16, Bool))) #

def match(expected : Char) #

def number #

def peek #

def peek_next #

def scan_token(just_labels : Bool) #

def scan_tokens(just_labels : Bool = false) #

def tokens : Array(Token) #

def tokens=(tokens : Array(Token)) #