93fe7237e3
Neue Top-Level-API check_module(&Module) -> Vec<Diagnostic> in ailang-check, plus stabile Codes (unbound-var, type-mismatch, arity-mismatch, non-exhaustive-match, unknown-ctor-in-pattern, duplicate-def, …). CLI bekommt --json-Flag für maschinenlesbares Output, Exit 1 bei Errors. Text-Modus unverändert. E2E-Test check_json_unbound_var sichert das Format ab.
21 lines
428 B
JSON
21 lines
428 B
JSON
{
|
|
"schema": "ailang/v0",
|
|
"name": "broken_unbound",
|
|
"imports": [],
|
|
"defs": [
|
|
{
|
|
"kind": "fn",
|
|
"name": "main",
|
|
"type": {
|
|
"k": "fn",
|
|
"params": [],
|
|
"ret": { "k": "con", "name": "Int" },
|
|
"effects": []
|
|
},
|
|
"params": [],
|
|
"doc": "Referenziert eine nicht-existente Variable -> unbound-var.",
|
|
"body": { "t": "var", "name": "does_not_exist" }
|
|
}
|
|
]
|
|
}
|