class

Arborist::Apply

Inherits Reference / Object

Apply represents the application of a named rule

Constructors

new(rule_name : String)
Source

Instance methods

eval(matcher) : ParseTree | Nil

this started out as an implementation of Tratt's Algorithm 2 in section 6.4 of https://tratt.net/laurie/research/pubs/html/tratt__direct_left_recursive_parsing_expression_grammars/

Source
label(label : String) : Apply
Source
label
Source
label=(label : String | Nil)
Source
parse_tree_is_larger_than_seed_parse_tree?(parse_tree : ParseTree | Nil, seed_parse_tree : ParseTree | Nil) : Bool
Source
pop_rule_application(matcher, successfully_parsed) : ApplyCall
Source
preorder_traverse(matcher, visit : Expr -> _, visited_nodes : Set(Expr))
Source
push_rule_application(matcher, rule, pos, is_this_application_left_recursive_at_pos)
Source
rule_name
Source
syntactic_rule?
Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source