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-1.2.5 lib/code/parser/unary_minus.rb
code-ruby-1.2.4 lib/code/parser/unary_minus.rb
code-ruby-1.2.3 lib/code/parser/unary_minus.rb
code-ruby-1.2.2 lib/code/parser/unary_minus.rb
code-ruby-1.2.1 lib/code/parser/unary_minus.rb
code-ruby-1.1.3 lib/code/parser/unary_minus.rb
code-ruby-1.1.1 lib/code/parser/unary_minus.rb
code-ruby-1.1.0 lib/code/parser/unary_minus.rb
code-ruby-1.0.0 lib/code/parser/unary_minus.rb
code-ruby-0.15.16 lib/code/parser/unary_minus.rb
code-ruby-0.15.15 lib/code/parser/unary_minus.rb
code-ruby-0.15.14 lib/code/parser/unary_minus.rb
code-ruby-0.15.13 lib/code/parser/unary_minus.rb
code-ruby-0.15.12 lib/code/parser/unary_minus.rb
code-ruby-0.15.11 lib/code/parser/unary_minus.rb
code-ruby-0.15.10 lib/code/parser/unary_minus.rb
code-ruby-0.15.9 lib/code/parser/unary_minus.rb
code-ruby-0.15.8 lib/code/parser/unary_minus.rb
code-ruby-0.15.7 lib/code/parser/unary_minus.rb
code-ruby-0.15.6 lib/code/parser/unary_minus.rb