Sha256: c7083cea6dd3d24557be3851098a053831d3ea9b7b97dfa2bd60d3a4a31d170c

Contents?: true

Size: 520 Bytes

Versions: 21

Compression:

Stored size: 520 Bytes

Contents

class Code
  class Parser
    class UnaryMinus < Language
      def unary_minus
        ::Code::Parser::UnaryMinus
      end

      def whitespace
        ::Code::Parser::Whitespace
      end

      def whitespace?
        whitespace.maybe
      end

      def minus
        str("-")
      end

      def operator
        minus
      end

      def root
        (operator.aka(:operator) << whitespace? << unary_minus.aka(:right)).aka(
          :unary_minus
        ) | ::Code::Parser::Power
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 3 rubygems

Version Path
template-ruby-0.5.6 lib/code/parser/unary_minus.rb
language-ruby-0.5.6 lib/code/parser/unary_minus.rb
code-ruby-0.5.6 lib/code/parser/unary_minus.rb
template-ruby-0.5.5 lib/code/parser/unary_minus.rb
language-ruby-0.5.5 lib/code/parser/unary_minus.rb
code-ruby-0.5.5 lib/code/parser/unary_minus.rb
template-ruby-0.5.4 lib/code/parser/unary_minus.rb
language-ruby-0.5.4 lib/code/parser/unary_minus.rb
code-ruby-0.5.4 lib/code/parser/unary_minus.rb
template-ruby-0.5.3 lib/code/parser/unary_minus.rb
language-ruby-0.5.3 lib/code/parser/unary_minus.rb
code-ruby-0.5.3 lib/code/parser/unary_minus.rb
template-ruby-0.5.2 lib/code/parser/unary_minus.rb
language-ruby-0.5.2 lib/code/parser/unary_minus.rb
code-ruby-0.5.2 lib/code/parser/unary_minus.rb
language-ruby-0.5.1 lib/code/parser/unary_minus.rb
template-ruby-0.5.1 lib/code/parser/unary_minus.rb
code-ruby-0.5.1 lib/code/parser/unary_minus.rb
template-ruby-0.5.0 lib/code/parser/unary_minus.rb
language-ruby-0.5.0 lib/code/parser/unary_minus.rb