Module: Dhall::Parser::PosixEnvironmentVariableCharacter

Defined in:
lib/dhall/parser.rb

Constant Summary collapse

ESCAPES =
Dhall::Import::EnvironmentVariable::ESCAPES

Instance Method Summary collapse

Instance Method Details

#valueObject



578
579
580
581
582
583
584
585
586
# File 'lib/dhall/parser.rb', line 578

def value
  if first&.string == "\\"
    ESCAPES.fetch(matches[1].string) {
      raise "Invalid escape: #{string}"
    }.encode("UTF-16BE")
  else
    string
  end
end