Sha256: 7f9c0ea7492de1d6c0596117eed8d84a489a780d70a00260b031eb4155cdcad9
Contents?: true
Size: 585 Bytes
Versions: 12
Compression:
Stored size: 585 Bytes
Contents
class Code class Parser class Power < Parslet::Parser rule(:negation) { ::Code::Parser::Negation.new } rule(:asterisk) { str("*") } rule(:operator) { asterisk >> asterisk } rule(:space) { str(" ") } rule(:newline) { str("\n") } rule(:whitespace) { (space | newline).repeat(1) } rule(:whitespace?) { whitespace.maybe } rule(:power) do ( negation.as(:left) >> whitespace? >> operator >> whitespace? >> power.as(:right) ).as(:power) | negation end root(:power) end end end
Version data entries
12 entries across 12 versions & 2 rubygems