feat: implements error messages for DuplicateDeclaration and UndefinedIdentifier errors
This commit is contained in:
@@ -38,7 +38,8 @@ def compile(contents: String): Int = {
|
||||
given ctx: typeChecker.TypeCheckerCtx = typeChecker.TypeCheckerCtx(names, errors)
|
||||
typeChecker.check(prog)
|
||||
if (errors.result.nonEmpty) {
|
||||
errors.result.foreach(println)
|
||||
given errorContent: String = contents
|
||||
errors.result.foreach(printError)
|
||||
200
|
||||
} else 0
|
||||
case Failure(msg) =>
|
||||
|
||||
Reference in New Issue
Block a user