Skip to content

Commit

Permalink
Refactoring: Comments and unnecessary breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasWienand committed Aug 22, 2024
1 parent 5a4177e commit 1807044
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Fuzzilli/Compiler/Compiler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,12 @@ public class JavaScriptCompiler {
emit(EndForOfLoop())

case .breakStatement:
// If we're in both .loop and .switch context, then the loop must be the most recent context
// (switch blocks don't propagate an outer .loop context) so we just need to check for .loop here
if contextAnalyzer.context.contains(.loop){
emit(LoopBreak())
break
} else if contextAnalyzer.context.contains(.switchBlock){
emit(SwitchBreak())
break
} else {
throw CompilerError.invalidNodeError("break statement outside of loop or switch")
}
Expand Down

0 comments on commit 1807044

Please sign in to comment.