53 "let value = add(1, 2);\n");
58 const auto *
module = parser.parse_module();
59 if (module ==
nullptr)
61 std::cerr <<
"Parse failed: no module produced\n";
66 sema.analyze_module(module);
69 std::cout <<
'\n' <<
sema.dump_symbols();
72 std::cout <<
"\nDiagnostics:\n";
Recursive-descent parser for the compiler-support MVP grammar.
Name-resolution and basic semantic checks for the compiler-support MVP.
Arena-backed ownership context for AST nodes.
Recursive-descent parser that produces an AST in Compiler_Ast_Context.
Name-resolution and basic semantic checker for the MVP AST.
Diagnostic accumulator and renderer.
void render_plain(std::ostream &out) const
Renders all diagnostics as deterministic plain text.
bool has_errors() const noexcept
Returns whether any error or fatal diagnostic was emitted.
size_t size() const noexcept
Returns the number of stored diagnostics.
Stores source files and resolves offsets into human-readable data.
Source_File_Id add_virtual_file(const std::string &name, const std::string &text)
Registers an in-memory source file.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
std::string compiler_dump_module(const Compiler_Module *module)
Dumps a parsed module in a deterministic text format.