Class: Code::Parser::NotKeyword

Inherits:
Language
  • Object
show all
Defined in:
lib/code/parser/not_keyword.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

#not_classObject



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

def not_class
  ::Code::Parser::NotKeyword
end

#not_keywordObject



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

def not_keyword
  str("not")
end

#rootObject



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

def root
  (not_keyword.aka(:operator) << whitespace << not_class.aka(:right)).aka(
    :not
  ) | ::Code::Parser::Equal
end

#whitespaceObject



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

def whitespace
  ::Code::Parser::Whitespace
end