Class: Code::Parser::Negation

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

Instance Method Summary collapse

Instance Method Details

#exclamation_pointObject



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

def exclamation_point
  str("!")
end

#negationObject



22
23
24
# File 'lib/code/parser/negation.rb', line 22

def negation
  Negation
end

#operatorObject



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

def operator
  exclamation_point | tilde | plus
end

#plusObject



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

def plus
  str("+")
end

#rootObject



26
27
28
29
# File 'lib/code/parser/negation.rb', line 26

def root
  (operator.aka(:operator) << negation.aka(:right)).aka(:negation) |
    ChainedCall
end

#tildeObject



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

def tilde
  str("~")
end