Sha256: fd35c8bbaa5dc4c34d4685e38852e5c1f319655d8917aefe7379818022dfbe3a
Contents?: true
Size: 946 Bytes
Versions: 14
Compression:
Stored size: 946 Bytes
Contents
module Furnace::AST class MatcherDSL SpecialAny = MatcherSpecial.new(:any) SpecialSkip = MatcherSpecial.new(:skip) SpecialEach = MatcherSpecial.define(:each) SpecialEither = MatcherSpecial.define(:either) SpecialEitherMulti = MatcherSpecial.define(:either_multi) SpecialMaybe = MatcherSpecial.define(:maybe) def any SpecialAny end def skip SpecialSkip end def each SpecialEach end def either SpecialEither end def either_multi SpecialEitherMulti end def maybe SpecialMaybe end def map(name) ->(hash) { MatcherSpecial.new(:map, [name, hash]) } end def capture(name) MatcherSpecial.new(:capture, name) end def capture_rest(name) MatcherSpecial.new(:capture_rest, name) end def backref(name) MatcherSpecial.new(:backref, name) end end end
Version data entries
14 entries across 14 versions & 1 rubygems