mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free - Parsing still recovers and can produce multiple errors - Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import) - The single error that could occur during execution is removed for now - Removes Value::Error variant
27 lines
433 B
Typst
27 lines
433 B
Typst
// Test include statements.
|
|
|
|
---
|
|
= Document
|
|
|
|
// Include a file
|
|
#include "importable/chap1.typ"
|
|
|
|
// Expression as a file name.
|
|
#let chap2 = include "import" + "able/chap" + "2.typ"
|
|
|
|
-- _Intermission_ --
|
|
#chap2
|
|
|
|
---
|
|
{
|
|
// Error: 21-43 file not found
|
|
let x = include "importable/chap3.typ"
|
|
}
|
|
|
|
---
|
|
#include "importable/chap1.typ"
|
|
|
|
// The variables of the file should not appear in this scope.
|
|
// Error: 1-6 unknown variable
|
|
#name
|