Sha256: b48e7ff50a68f4b45b988400b2a3921b1eb56f84c85fa91421d98f3e2241c804

Contents?: true

Size: 565 Bytes

Versions: 14

Compression:

Stored size: 565 Bytes

Contents

class Code
  class Parser
    class NotKeyword < ::Code::Parser
      def parse
        previous_cursor = cursor

        if match(NOT_KEYWORD)
          comments = parse_comments
          right = parse_subclass(::Code::Parser::NotKeyword)

          if right
            { not: { right: right, comments: comments }.compact }
          else
            @cursor = previous_cursor
            buffer!
            parse_subclass(::Code::Parser::Equal)
          end
        else
          parse_subclass(::Code::Parser::Equal)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
template-ruby-parser-0.1.6 lib/code/parser/not_keyword.rb
code-ruby-parser-0.1.6 lib/code/parser/not_keyword.rb
template-ruby-parser-0.1.5 lib/code/parser/not_keyword.rb
code-ruby-parser-0.1.5 lib/code/parser/not_keyword.rb
template-ruby-parser-0.1.4 lib/code/parser/not_keyword.rb
code-ruby-parser-0.1.4 lib/code/parser/not_keyword.rb
template-ruby-parser-0.1.3 lib/code/parser/not_keyword.rb
code-ruby-parser-0.1.3 lib/code/parser/not_keyword.rb
template-ruby-parser-0.1.2 lib/code/parser/not_keyword.rb
code-ruby-parser-0.1.2 lib/code/parser/not_keyword.rb
template-ruby-parser-0.1.1 lib/code/parser/not_keyword.rb
code-ruby-parser-0.1.1 lib/code/parser/not_keyword.rb
template-ruby-parser-0.1.0 lib/code/parser/not_keyword.rb
code-ruby-parser-0.1.0 lib/code/parser/not_keyword.rb