Class: Code::Parser::Code
- Inherits:
-
Language
- Object
- Language
- Code::Parser::Code
- Defined in:
- lib/code/parser/code.rb
Instance Method Summary collapse
Instance Method Details
#present ⇒ Object
18 19 20 |
# File 'lib/code/parser/code.rb', line 18 def present (whitespace? << statement << whitespace?).repeat(1) end |
#root ⇒ Object
22 23 24 |
# File 'lib/code/parser/code.rb', line 22 def root present | whitespace?.then { [] } end |
#whitespace ⇒ Object
6 7 8 |
# File 'lib/code/parser/code.rb', line 6 def whitespace Whitespace end |
#whitespace? ⇒ Boolean
10 11 12 |
# File 'lib/code/parser/code.rb', line 10 def whitespace? whitespace.maybe end |