Class: ABNF::Parser::Compiler::Option
- Inherits:
-
RuleBuilder
- Object
- RuleBuilder
- ABNF::Parser::Compiler::Option
- Defined in:
- lib/abnf/parser/compiler/option.rb
Instance Attribute Summary collapse
-
#rule ⇒ Object
Returns the value of attribute rule.
Attributes inherited from RuleBuilder
Instance Method Summary collapse
Methods inherited from RuleBuilder
Constructor Details
This class inherits a constructor from ABNF::Parser::Compiler::RuleBuilder
Instance Attribute Details
#rule ⇒ Object
Returns the value of attribute rule.
5 6 7 |
# File 'lib/abnf/parser/compiler/option.rb', line 5 def rule @rule end |
Instance Method Details
#option_stop(_) ⇒ Object
7 8 9 |
# File 'lib/abnf/parser/compiler/option.rb', line 7 def option_stop _ compiler.pop rule end |
#start_rule(token) ⇒ Object
11 12 13 14 15 |
# File 'lib/abnf/parser/compiler/option.rb', line 11 def start_rule token compiler.push Alternation do |rule| self.rule = rule end end |