diff --git a/src/main/kotlin/br/com/pnp/semantic/PnpContext.kt b/src/main/kotlin/br/com/pnp/semantic/PnpContext.kt index 58e90f7..4d6e77e 100644 --- a/src/main/kotlin/br/com/pnp/semantic/PnpContext.kt +++ b/src/main/kotlin/br/com/pnp/semantic/PnpContext.kt @@ -463,6 +463,10 @@ class PnpContext(val analyser: Analyser) : PnpBaseListener() { } ?: throw UnknownSemanticException(ctx.start) } + override fun exitWhileBlock(ctx: PnpParser.WhileBlockContext) { + analyser.endScope() + } + // endregion // region type validation