Sha256: 668a0531de8ac4418959e9d1e8d38dc2eb7d67d6e00e92b1e3afae0d7ace5483

Contents?: true

Size: 406 Bytes

Versions: 6

Compression:

Stored size: 406 Bytes

Contents

class Code
  class Parser
    class Negation < ::Code::Parser
      def parse
        if operator = match([EXCLAMATION_POINT, TILDE, PLUS])
          {
            negation: {
              operator: operator,
              statement: parse_subclass(::Code::Parser::Negation)
            }
          }
        else
          parse_subclass(::Code::Parser::Function)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
template-ruby-parser-0.1.2 lib/code/parser/negation.rb
code-ruby-parser-0.1.2 lib/code/parser/negation.rb
template-ruby-parser-0.1.1 lib/code/parser/negation.rb
code-ruby-parser-0.1.1 lib/code/parser/negation.rb
template-ruby-parser-0.1.0 lib/code/parser/negation.rb
code-ruby-parser-0.1.0 lib/code/parser/negation.rb