Class: PyruParser
- Inherits:
-
Object
- Object
- PyruParser
- Defined in:
- lib/pyru_parser.rb
Overview
pyru_parser.rb
Instance Method Summary collapse
-
#initialize(tokens) ⇒ PyruParser
constructor
A new instance of PyruParser.
- #parse ⇒ Object
Constructor Details
#initialize(tokens) ⇒ PyruParser
Returns a new instance of PyruParser.
4 5 6 7 |
# File 'lib/pyru_parser.rb', line 4 def initialize(tokens) @tokens = tokens @position = 0 end |
Instance Method Details
#parse ⇒ Object
9 10 11 12 13 14 |
# File 'lib/pyru_parser.rb', line 9 def parse # Placeholder for parsing logic # You can define grammar rules and parse the tokens accordingly # For simplicity, let's just return the tokens for now @tokens end |