Class: Code::Parser::Group

Inherits:
Language show all
Defined in:
lib/code/parser/group.rb

Instance Method Summary collapse

Methods inherited from Language

<<, >>, absent, aka, #any, ignore, #inspect, maybe, parse, #parse, repeat, #str, then, #to_s, |

Instance Method Details

#closing_parenthesisObject



12
13
14
# File 'lib/code/parser/group.rb', line 12

def closing_parenthesis
  str(")")
end

#codeObject



4
5
6
# File 'lib/code/parser/group.rb', line 4

def code
  ::Code::Parser::Code
end

#opening_parenthesisObject



8
9
10
# File 'lib/code/parser/group.rb', line 8

def opening_parenthesis
  str("(")
end

#rootObject



16
17
18
19
# File 'lib/code/parser/group.rb', line 16

def root
  (opening_parenthesis << code << closing_parenthesis.maybe).aka(:group) |
    ::Code::Parser::Call
end