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



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

def not_keyword
  str("not") << separator.present
end

#rootObject



22
23
24
25
26
# File 'lib/code/parser/not_keyword.rb', line 22

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

#separatorObject



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

def separator
  Name.new.separator
end

#whitespaceObject



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

def whitespace
  Whitespace
end