Module: Dhall::Parser::SingleQuoteLiteral

Defined in:
lib/dhall/parser.rb

Instance Method Summary collapse

Instance Method Details

#valueObject



316
317
318
319
320
321
322
323
324
325
# File 'lib/dhall/parser.rb', line 316

def value
  chunks = capture(:single_quote_continue).value
  indent = Util.indent_size(chunks.join)

  TextLiteral.for(
    *chunks
      .chunk { |c| c != "\n" }
      .flat_map { |(line, chunk)| line ? chunk[indent..-1] : chunk }
  )
end