Class: Code::Parser::NotKeyword

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

Instance Method Summary collapse

Instance Method Details

#not_classObject



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

def not_class
  NotKeyword
end

#not_keywordObject



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

def not_keyword
  str("not")
end

#rootObject



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

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

#whitespaceObject



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

def whitespace
  Whitespace
end