Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

EscapedNewline (Escaped Newline)

Escaped newline in indented strings. Constructor of Antiquoted.

Definition

EscapedNewline

Fields

None (nullary constructor).

Description

EscapedNewline represents a backslash-newline sequence (\ followed by newline) in an indented string (''...''). It allows splitting a long logical line across multiple physical lines without inserting a newline in the resulting string.

Nix Source ↔ AST

# Nix
''
  this is a \
  continued line
''

# AST (part of Indented parts)
{
  "tag": "EscapedNewline"
}

The resulting string content is "this is a continued line" (no newline between “a” and “continued”).

Nix Library Access

syntax.mkEscapedNewline