Sha256: 4aa72c68c526e9fe22b5b5c1af47f2b5ce3ee3b469611ee01406b949ca4f0ab1

Contents?: true

Size: 474 Bytes

Versions: 6

Compression:

Stored size: 474 Bytes

Contents

class Code
  class Parser
    class NotKeyword < Parslet::Parser
      rule(:defined) { ::Code::Parser::Defined.new }

      rule(:not_keyword) { str("not") }

      rule(:operator) { not_keyword }

      rule(:space) { str(" ") }
      rule(:newline) { str("\n") }
      rule(:whitespace) { (space | newline).repeat(1) }

      rule(:not_rule) do
        (not_keyword >> whitespace >> not_rule).as(:not_keyword) | defined
      end

      root(:not_rule)
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
code-ruby-0.2.4 lib/code/parser/not_keyword.rb
template-ruby-0.2.4 lib/code/parser/not_keyword.rb
template-ruby-0.2.3 lib/code/parser/not_keyword.rb
template-ruby-0.2.2 lib/code/parser/not_keyword.rb
template-ruby-0.2.1 lib/code/parser/not_keyword.rb
template-ruby-0.2.0 lib/code/parser/not_keyword.rb