Class: Antlr4::Runtime::RuleContextWithAltNum

Inherits:
ParserRuleContext show all
Defined in:
lib/antlr4/runtime/rule_context_with_alt_num.rb

Constant Summary

Constants inherited from ParserRuleContext

ParserRuleContext::EMPTY

Instance Attribute Summary collapse

Attributes inherited from ParserRuleContext

#children, #exception, #start, #stop

Attributes inherited from RuleContext

#invoking_state, #parent

Instance Method Summary collapse

Methods inherited from ParserRuleContext

#add_any_child, #add_child_rule_invocation, #add_child_terminal_node, #add_error_node, #child, #child_at, #child_count, #copy_from, #enter_rule, #exit_rule, #remove_last_child, #rule_context, #rule_contexts, #source_interval, #to_info_string, #token, #tokens

Methods inherited from RuleContext

#accept, #alt_number, #child, #child_count, #depth, #empty?, #payload, #rule_context, #rule_index, #set_alt_number, #source_interval, #text, #to_s, #to_s_list, #to_s_list_ctx, #to_s_recog, #to_s_recog_ctx, #to_string_tree, #to_string_tree_recog, #to_string_tree_rulenames

Methods inherited from RuleNode

#rule_context

Constructor Details

#initialize(parent = nil, invoking_state_number = nil) ⇒ RuleContextWithAltNum

Returns a new instance of RuleContextWithAltNum



6
7
8
9
# File 'lib/antlr4/runtime/rule_context_with_alt_num.rb', line 6

def initialize(parent = nil, invoking_state_number = nil)
  super(parent, invoking_state_number)
  @alt_num = ATN::INVALID_ALT_NUMBER
end

Instance Attribute Details

#alt_numObject

Returns the value of attribute alt_num



4
5
6
# File 'lib/antlr4/runtime/rule_context_with_alt_num.rb', line 4

def alt_num
  @alt_num
end