feat: basic type checker skeleton
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
package wacc
|
||||
|
||||
import wacc.ast.Expr
|
||||
|
||||
enum Error {
|
||||
case DuplicateDeclaration(ident: ast.Ident)
|
||||
case UndefinedIdentifier(ident: ast.Ident, identType: renamer.IdentType)
|
||||
case FunctionParamsMismatch(expected: Int, got: Int)
|
||||
case TypeMismatch(expected: types.SemType, got: types.SemType)
|
||||
case InvalidArrayAccess(ty: types.SemType)
|
||||
case InvalidPairAccess(ty: types.SemType)
|
||||
case ReturnTypeMismatch(expected: types.SemType, got: types.SemType)
|
||||
case NonBooleanCondition(expr: Expr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user