Class: Code::Parser::Group

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

Instance Method Summary collapse

Instance Method Details

#closing_parenthesisObject



14
15
16
# File 'lib/code/parser/group.rb', line 14

def closing_parenthesis
  str(")")
end

#codeObject



6
7
8
# File 'lib/code/parser/group.rb', line 6

def code
  Code
end

#opening_parenthesisObject



10
11
12
# File 'lib/code/parser/group.rb', line 10

def opening_parenthesis
  str("(")
end

#rootObject



18
19
20
21
# File 'lib/code/parser/group.rb', line 18

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