Renderingen-US

Experimental through version 1. Version 0 was alpha. This is the first language release: the interface is relatively stable, not frozen. Nothing is promised stable until version 2.

block-string

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Block string literals with embedded quotes and newlines.

Aliases: «...»

Syntax: «<text>»

Category#

literal

Examples#

radix/corpus/reference/existing-home/block-string/block-string.fab (canonical · existing-home)#

Block string literals with embedded quotes and newlines.

# =============================================================================
# block-string — Block string literals with embedded quotes and newlines.
# =============================================================================
#
# What this teaches:
#   • block string literals with `«...»` — embed quotes and newlines without escaping
#   • multiline content in a single literal value
#
# Common mistakes:
#   • Using triple-quote """...""" or ❝...❞ instead of «...» — block strings use guillemets only.
#
# See also: string, string
# =============================================================================

# literalia/block-string — « ... » literals
#
# GRAMMAR:
#   blockStringLit :← '«' ... '»'
#
# EXPECTED OUTPUT:
#   he said "salve", line one

main {
    let string quote ← «he said "salve"»
    print quote
    let string multiline ← «line one
still line one»
    print multiline.slice(0, 8)
}

Expected output:

he said "salve"
line one