feat: type checker without satisfies implemented
Co-Authored-By: jt2622
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
package wacc
|
||||
|
||||
import wacc.ast.Expr
|
||||
import wacc.ast.Position
|
||||
import wacc.types._
|
||||
|
||||
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)
|
||||
case FunctionParamsMismatch(expected: Int, got: Int) // TODO not fine
|
||||
|
||||
case TypeMismatch(pos: Position, expected: SemType, got: SemType, msg: String)
|
||||
case InternalError(pos: Position, msg: String)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user