class Noir::Lexers::Crystal

Defined in:

noir/lexers/crystal.cr

Constant Summary

BUILTIN_CLASSES = Set.new(["ArgumentError", "Array", "Atomic", "Bool", "Box", "Bytes", "Channnel", "Char", "Class", "Crystal", "Deque", "Dir", "Enum", "Enumerable", "Errno", "Exception", "Fiber", "File", "Float", "Float32", "Float64", "GC", "Hash", "Indexable", "IndexError", "Int", "Int8", "Int16", "Int32", "Int64", "Int128", "InvalidByteSequenceError", "IO", "Iterable", "Iterator", "KeyError", "Math", "Mutex", "NamedTuple", "Nil", "Number", "Object", "PartialComparable", "Pointer", "PrettyPrinter", "Proc", "Process", "Random", "Range", "Reference", "Reflect", "Regex", "SecureRandom", "Set", "Signal", "Slice", "StaticArray", "String", "Struct", "Symbol", "System", "Tuple", "TypeCastError", "UInt8", "UInt16", "UInt64", "UInt128", "Unicode", "Union", "Value", "WeakRef"] of ::String)
BUILTIN_CONSTANTS = Set.new(["ARGF", "ARGV", "PROGRAM_NAME", "STDIN", "STDOUT", "STDERR"] of ::String)
BUILTIN_MACROS = Set.new(["record", "class_getter", "class_getter?", "class_getter!", "class_setter", "class_setter?", "class_setter?", "class_property", "class_property?", "class_property!", "def_clone", "def_equals", "def_hash", "def_equals_and_hash", "delegate", "forward_missing_to", "getter", "getter?", "getter!", "setter", "setter?", "setter!", "property", "property?", "property!"] of ::String)

https://crystal-lang.org/api/0.23.1/Object.html

BUILTINS = Set.new(["abort", "at_exit", "caller", "delay", "exit", "fork", "future", "gets", "lazy", "loop", "p", "print", "printf", "puts", "raise", "rand", "read_line", "sleep", "spawn", "sprintf", "system", "debugger", "parallel", "pp", "assert"] of ::String)

https://crystal-lang.org/api/0.23.1/toplevel.html

CONSTANTS = Set.new(["true", "false", "nil", "self"] of ::String)
ID_REGEX = /[a-z_]\w*[!?]?/
KEYWORDS = Set.new(["abstract", "as", "as?", "asm", "begin", "break", "case", "do", "else", "elsif", "end", "ensure", "extend", "for", "if", "in", "include", "instance_sizeof", "is_a?", "next", "nil?", "of", "out", "pointerof", "private", "protected", "require", "rescue", "responds_to?", "return", "select", "sizeof", "struct", "super", "then", "typeof", "undef", "union", "uninitialized", "unless", "until", "when", "while", "with", "yield"] of ::String)

Instance methods inherited from class Noir::Lexer

current_state current_state, lex_all(input : String, output : Formatter) lex_all, stack : Deque(Noir::Lexer::State) stack, state(name) state

Constructor methods inherited from class Noir::Lexer

new new

Class methods inherited from class Noir::Lexer

aliases(aliases : Array(String))
aliases
aliases
, append(name, &) append, filenames(filenames : Array(String))
filenames
filenames
, mimetypes(mimetypes : Array(String))
mimetypes
mimetypes
, prepend(name, &) prepend, state(name : Symbol)
state(name : Symbol, &)
state
, tag(tag : String)
tag : String
tag
, tag? : String | Nil tag?

Class methods inherited from module Noir::Tokens

each_token(&) each_token