class

Syntax::Lexer

Inherits Reference < Object

Constructors

new(string, string_pool : StringPool | Nil = nil)
Source

Class methods

ident?(name)
Source
ident_part?(char)
Source
ident_start?(char)
Source
setter?(name)
Source

Instance methods

char_to_hex(char, &)
Source
check_heredoc_end(delimiter_state)
Source
check_heredoc_start
Source
check_ident_or_keyword(symbol, start)
Source
check_macro_opening_keyword(beginning_of_line)
Source
closing_char(char = current_char)
Source
column_number
Source
column_number=(column_number : Int32)
Source
comments_enabled=(comments_enabled : Bool)
Source
comments_enabled?
Source
consume_braced_unicode_escape(allow_spaces = false)
Source
consume_char_unicode_escape
Source
consume_comment(start_pos)
Source
consume_doc
Source
consume_loc_pragma
Source
consume_newlines
Source
consume_non_braced_unicode_escape
Source
consume_octal_escape(char)
Source
consume_string_hex_escape
Source
consume_string_unicode_brace_escape
Source
consume_string_unicode_escape
Source
consume_whitespace
Source
count_whitespace=(count_whitespace : Bool)
Source
count_whitespace?
Source
current_char
Source
current_pos
Source
current_pos=(pos)
Source
delimited_pair(kind : Token::DelimiterKind, string_nest, string_end, start, allow_escapes = true, advance = true)
Source
doc_enabled=(doc_enabled : Bool)
Source
doc_enabled?
Source
expected_hexacimal_character_in_unicode_escape
Source
filename=(filename : String | Syntax::VirtualFile | Nil)
Source
handle_slash_r_slash_n_or_slash_n
Source
heredocs

Heredocs pushed when found. Should be processed when encountering a newline

Source
ident_part_or_end?(char)
Source
incr_column_number(d = 1)
Source
incr_line_number(column_number = 1)
Source
line_number
Source
line_number=(line_number : Int32)
Source
lookahead(preserve_token_on_fail = false, &)
Source
macro_expansion_pragmas
Source
macro_expansion_pragmas=(macro_expansion_pragmas : Hash(Int32, Array(LocPragma)) | Nil)
Source
next_char(token_type)
Source
next_char
Source
next_char_and_symbol(value)
Source
next_char_check_line
Source
next_char_no_column_increment
Source
next_macro_token(macro_state, skip_whitespace)
Source
next_string_array_token
Source
next_string_token(delimiter_state)
Source
next_string_token_noescape(delimiter_state)
Source
next_token
Source
next_token_never_a_symbol
Source
next_token_skip_space
Source
next_token_skip_space_or_newline
Source
next_token_skip_statement_end
Source
peek_ahead
Source
peek_next_char
Source
peek_not_ident_part_or_end_next_char
Source
pop_location
Source
push_location
Source
raise(message, token : Token, size = nil)
Source
raise(message, location : Location)
Source
raise(message, line_number = @line_number, column_number = @column_number, filename = @filename)
Source
raise_unterminated_quoted(delimiter_state)
Source
raise_value_doesnt_fit_in(type, start, pos_before_suffix, alternative)
Source
raise_value_doesnt_fit_in(type, start, pos_before_suffix)
Source
reader
Source
reset_token
Source
scan_ident(start)
Source
set_location(filename : String | Syntax::VirtualFile | Nil, line_number : Int32, column_number : Int32)
Source
set_token_raw_from_start(start)
Source
skip_comment
Source
skip_macro_whitespace
Source
skip_space
Source
skip_space_or_newline
Source
skip_statement_end
Source
slash_is_not_regex!
Source
slash_is_regex!
Source
slash_is_regex=(slash_is_regex : Bool)
Source
slash_is_regex?
Source
slice_range(start_pos, end_pos)
Source
slice_range(start_pos)
Source
string
Source
string_range(start_pos, end_pos)
Source
string_range(start_pos)
Source
string_range_from_pool(start_pos, end_pos)
Source
string_range_from_pool(start_pos)
Source
string_token_escape_value(value)
Source
symbol(value)
Source
token
Source
token_end_location
Source
unknown_token
Source
wants_def_or_macro_name=(wants_def_or_macro_name : Bool)
Source
wants_def_or_macro_name?
Source
wants_raw=(wants_raw : Bool)
Source
wants_raw?
Source
wants_symbol
Source
wants_symbol=(wants_symbol : Bool)
Source

Macros

gen_check_int_fits_in_size(type, method, size, number_size, raw_number_string, start, pos_before_suffix, negative)
Source

Nested types