Module: Dhall::Parser::NonEmptyUnionTypeOrLiteral
- Defined in:
- lib/dhall/parser.rb
Instance Method Summary collapse
Instance Method Details
#value ⇒ Object
393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/dhall/parser.rb', line 393 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 |