lines
A chunk of literal code lines inside a canvas.code environment — the unit cues wrap and the unit everything else addresses. Chunks rather than line numbers, because choreography shifts line numbers: the moment a cue inserts three lines, every number below it points at the wrong line. Common indentation is stripped, so the chalk source can be indented normally.
lines

Writing with it:
#Attributes
indentIndentation levels (four spaces each) restored on assembly — the compiler dedents every literal body to its own margin, so a chunk continuing a block states its depth.
Also written:
indent-levelCan be written as shorthand: lines:valueDefault
0highlightThe continuous highlight: these lines carry a wash for as long as they are shown. For a momentary one, wrap the chunk in a
cue.highlight.Default
falseerror-linesLines to flag with the gutter’s error marker — 1-based within THIS chunk.
Also written:
error-line, errorserror-messageThe diagnostic the interpreter would give — rendered inline at the end of the chunk's first error line, the way an IDE annotates a broken line.
Also written:
diagnostic, error-noteadded-linesDiff wash: these lines carry the green added treatment — 1-based within THIS chunk.
Also written:
added-line, addedremoved-linesDiff wash: these lines carry the red removed treatment — 1-based within THIS chunk.
Also written:
removed-line, removedhiddenDeclared but not assembled.
Default
falsesetupThe chunk never displays and always executes — prepended to a run in source order, outside cue gating and hidden.
Default
falselockReserved for editable-environment rules.
Also written:
lockedDefault
false#Allowed content
Body { }Literal code lines, kept verbatim.
#Allowed in
#Examples


canvas.code{
lines{
def f(x):
}
lines{
return x * 2
}(
indent: 1
highlight: true
)
}(
language: python
)

canvas.code{
lines{
def f(x):
return undefined_name
}(
error-lines: 2
error-message: NameError: name 'undefined_name' is not defined
)
}(
language: python
)

canvas.code{
lines{
def mean(values):
total = sum(values)
}
lines{
return total / len(values)
}(
indent: 1
added-lines: 1
)
}(
language: python
)