Sha256: 50ddf0f6d6e72f57c4624e4821cdf5526ed8baa277eeef866b895aff34e0b67f
Contents?: true
Size: 434 Bytes
Versions: 2
Compression:
Stored size: 434 Bytes
Contents
module Qrb module Syntax module Constraints def compile(var_name) constraints = {} captures[:named_constraint].each do |node| compiled = node.compile(var_name) constraints.merge!(compiled) do |k,_,_| raise Error, "Duplicate constraint name `#{k}`" end end constraints end end # module Constraints end # module Syntax end # module Qrb
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
qrb-0.2.0 | lib/qrb/syntax/constraints.rb |
qrb-0.1.0 | lib/qrb/syntax/constraints.rb |