Class: Code::Parser::Multiplication

Inherits:
Operation show all
Defined in:
lib/code/parser/multiplication.rb

Instance Method Summary collapse

Methods inherited from Operation

#root, #whitespace, #whitespace?

Methods inherited from Language

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

Instance Method Details

#asteriskObject



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

def asterisk
  str("*")
end

#operatorObject



20
21
22
# File 'lib/code/parser/multiplication.rb', line 20

def operator
  asterisk | slash | percent
end

#percentObject



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

def percent
  str("%")
end

#slashObject



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

def slash
  str("/")
end

#statementObject



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

def statement
  ::Code::Parser::UnaryMinus
end