Arborist::Apply
Inherits Reference / Object
Apply represents the application of a named rule
Constructors
new(rule_name : String)
SourceInstance 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/
label(label : String) : Apply
Sourcelabel
Sourcelabel=(label : String | Nil)
Sourceparse_tree_is_larger_than_seed_parse_tree?(parse_tree : ParseTree | Nil, seed_parse_tree : ParseTree | Nil) : Bool
Sourcepop_rule_application(matcher, successfully_parsed) : ApplyCall
Sourcepreorder_traverse(matcher, visit : Expr -> _, visited_nodes : Set(Expr))
Sourcepush_rule_application(matcher, rule, pos, is_this_application_left_recursive_at_pos)
Sourcerule_name
Sourcesyntactic_rule?
Sourceto_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.