Sha256: 29f922c169eaad43d36b632c60142f3cb41f8afc5884f4135c4e0a7656e241a4
Contents?: true
Size: 579 Bytes
Versions: 10
Compression:
Stored size: 579 Bytes
Contents
# frozen_string_literal: true module Unparser class Emitter # Emitter for in pattern nodes class MatchPattern < self handle :match_pattern children :target, :pattern # Modern ast format emits `match_pattern` # node on single line pre 3.0, but 3.0+ uses `match_pattern_p` SYMBOL = if RUBY_VERSION < '3.0' ' in ' else ' => ' end private def dispatch visit(target) write(SYMBOL) visit(pattern) end end # MatchPattern end # Emitter end # Unparser
Version data entries
10 entries across 10 versions & 2 rubygems