|
sammine-lang
|
Linear type checker — tracks heap-allocated pointers and enforces they are consumed (freed or moved) exactly once before scope exit. More...
#include "ast/Ast.h"#include "ast/ASTProperties.h"#include "util/Utilities.h"#include <string>#include <unordered_map>#include <vector>

Go to the source code of this file.
Classes | |
| struct | sammine_lang::AST::VarInfo |
| class | sammine_lang::AST::LinearTypeChecker |
Typedefs | |
| using | sammine_lang::AST::LinearVarMap = std::unordered_map<std::string, VarInfo> |
Enumerations | |
| enum class | VarState { Unconsumed , Consumed } |
Linear type checker — tracks heap-allocated pointers and enforces they are consumed (freed or moved) exactly once before scope exit.
Uses direct recursive dispatch via dyn_cast (no visitor pattern). Runs as a separate pass after BiTypeChecker.