Class: Lrama::Lexer::Token::InstantiateRule
- Inherits:
-
Lrama::Lexer::Token
- Object
- Lrama::Lexer::Token
- Lrama::Lexer::Token::InstantiateRule
- Defined in:
- lib/lrama/lexer/token/instantiate_rule.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
: Array.
-
#lhs_tag ⇒ Object
readonly
: Lexer::Token::Tag?.
Attributes inherited from Lrama::Lexer::Token
#alias_name, #location, #referred, #s_value
Instance Method Summary collapse
- #args_count ⇒ Object
-
#initialize(s_value:, alias_name: nil, location: nil, args: [], lhs_tag: nil) ⇒ InstantiateRule
constructor
A new instance of InstantiateRule.
- #rule_name ⇒ Object
Methods inherited from Lrama::Lexer::Token
#==, #first_column, #first_line, #invalid_ref, #last_column, #last_line, #referred_by?, #to_s
Constructor Details
#initialize(s_value:, alias_name: nil, location: nil, args: [], lhs_tag: nil) ⇒ InstantiateRule
Returns a new instance of InstantiateRule.
12 13 14 15 16 |
# File 'lib/lrama/lexer/token/instantiate_rule.rb', line 12 def initialize(s_value:, alias_name: nil, location: nil, args: [], lhs_tag: nil) super s_value: s_value, alias_name: alias_name, location: location @args = args @lhs_tag = lhs_tag end |
Instance Attribute Details
#args ⇒ Object (readonly)
: Array
8 9 10 |
# File 'lib/lrama/lexer/token/instantiate_rule.rb', line 8 def args @args end |
#lhs_tag ⇒ Object (readonly)
: Lexer::Token::Tag?
9 10 11 |
# File 'lib/lrama/lexer/token/instantiate_rule.rb', line 9 def lhs_tag @lhs_tag end |
Instance Method Details
#args_count ⇒ Object
24 25 26 |
# File 'lib/lrama/lexer/token/instantiate_rule.rb', line 24 def args_count args.count end |
#rule_name ⇒ Object
19 20 21 |
# File 'lib/lrama/lexer/token/instantiate_rule.rb', line 19 def rule_name s_value end |