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))) #

[View source]

Instance Method Detail

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

[View source]
def advance #

[View source]
def binary #

[View source]
def hex #

[View source]
def identifier #

[View source]
def is_alpha(c : Char) #

[View source]
def is_alpha_numeric(c : Char) #

[View source]
def is_at_end #

[View source]
def labels : Array(Tuple(String, UInt8 | UInt16, Bool)) #

[View source]
def labels=(labels : Array(Tuple(String, UInt8 | UInt16, Bool))) #

[View source]
def match(expected : Char) #

[View source]
def number #

[View source]
def peek #

[View source]
def peek_next #

[View source]
def scan_token(just_labels : Bool) #

[View source]
def scan_tokens(just_labels : Bool = false) #

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

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

[View source]