Module: Dhall::Parser::NonEmptyUnionTypeOrLiteral
- Defined in:
- lib/dhall/parser.rb
Instance Method Summary collapse
Instance Method Details
#value ⇒ Object
435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/dhall/parser.rb', line 435 def value key = [ :union_literal_variant_value, :union_type_or_literal_variant_type ].find { |k| captures.key?(k) } if key capture(key).value(capture(:any_label).value) else no_alts = UnionType.new(alternatives: {}) Union.from(no_alts, capture(:any_label).value, nil) end end |