Skip to content

Commit

Permalink
refactor: merged evaluation and checking into a single pass
Browse files Browse the repository at this point in the history
  • Loading branch information
d01c2 committed Feb 10, 2025
1 parent 4e99842 commit ff722e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/esmeta/test262/Test262.scala
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,14 @@ case class Test262(
tyCheck: Boolean,
): State =
val st = cfg.init.from(code, ast)
if (tyCheck)
if (tyCheck) {
val (finalSt, errors) = TypeChecker(st)
for { error <- errors } do {
val updated = totalErrors.getOrElse(error, Set()) + filename
totalErrors += error -> updated
}
finalSt
else
} else
Interpreter(
st = st,
log = log,
Expand Down

0 comments on commit ff722e7

Please sign in to comment.