Sha256: cb48cc7aac7bb67a4653f6d66571970ae355c0bb2723622a6ea0d946ca2b1e35
Contents?: true
Size: 774 Bytes
Versions: 21
Compression:
Stored size: 774 Bytes
Contents
class Code class Parser class Power < Language def power ::Code::Parser::Power end def statement ::Code::Parser::Negation end def whitespace ::Code::Parser::Whitespace end def whitespace? whitespace.maybe end def asterisk str("*") end def operator asterisk << asterisk end def root ( statement.aka(:left) << ( whitespace? << operator.aka(:operator) << whitespace? << power.aka(:right) ).maybe ) .aka(:power) .then do |output| output[:power][:right] ? output : output[:power][:left] end end end end end
Version data entries
21 entries across 21 versions & 3 rubygems