Class: GrammarTransform Abstract
- Inherits:
-
GrammarPlugin
- Object
- GrammarPlugin
- GrammarTransform
- Defined in:
- lib/ruby_grammar_builder/grammar_plugin.rb
Overview
This class is abstract.
Subclass and override #pre_transform and/or #post_transform to implement a transformation
Direct Known Subclasses
AddEnding, BailoutTransform, FixRepeatedTagAs, ResolvePlaceholders
Instance Method Summary collapse
-
#post_transform(grammar_hash) ⇒ Hash
Performs the transformation on the whole grammar.
-
#pre_transform(pattern, options) ⇒ PatternBase, ...
Preforms the transformation on each pattern.
Methods inherited from GrammarPlugin
Instance Method Details
#post_transform(grammar_hash) ⇒ Hash
Note:
grammar_hash should not be modified
Performs the transformation on the whole grammar
87 88 89 |
# File 'lib/ruby_grammar_builder/grammar_plugin.rb', line 87 def post_transform(grammar_hash) grammar_hash end |
#pre_transform(pattern, options) ⇒ PatternBase, ...
Note:
pattern should not be modified
Preforms the transformation on each pattern
74 75 76 |
# File 'lib/ruby_grammar_builder/grammar_plugin.rb', line 74 def pre_transform(pattern, ) # rubocop:disable Lint/UnusedMethodArgument pattern end |