Sha256: e40bdfc16dbf8c7802fe2bdd89510508242fb542d0d7076820551022dfa3bc4b

Contents?: true

Size: 503 Bytes

Versions: 70

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

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

      def whitespace
        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
        ) | Power
      end
    end
  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
code-ruby-0.15.5 lib/code/parser/unary_minus.rb
code-ruby-0.15.4 lib/code/parser/unary_minus.rb
code-ruby-0.15.3 lib/code/parser/unary_minus.rb
code-ruby-0.15.2 lib/code/parser/unary_minus.rb
code-ruby-0.15.0 lib/code/parser/unary_minus.rb
code-ruby-0.14.9 lib/code/parser/unary_minus.rb
code-ruby-0.14.8 lib/code/parser/unary_minus.rb
code-ruby-0.14.6 lib/code/parser/unary_minus.rb
code-ruby-0.14.5 lib/code/parser/unary_minus.rb
code-ruby-0.14.4 lib/code/parser/unary_minus.rb
code-ruby-0.14.3 lib/code/parser/unary_minus.rb
code-ruby-0.14.2 lib/code/parser/unary_minus.rb
code-ruby-0.14.1 lib/code/parser/unary_minus.rb
code-ruby-0.14.0 lib/code/parser/unary_minus.rb
code-ruby-0.13.1 lib/code/parser/unary_minus.rb
code-ruby-0.13.0 lib/code/parser/unary_minus.rb
code-ruby-0.12.0 lib/code/parser/unary_minus.rb
code-ruby-0.11.0 lib/code/parser/unary_minus.rb
code-ruby-0.10.4 lib/code/parser/unary_minus.rb
code-ruby-0.10.3 lib/code/parser/unary_minus.rb