TRD-0002 push latest

This commit is contained in:
2024-02-23 12:49:59 -05:00
parent 5d48b5d791
commit f0f34555e4
2 changed files with 33 additions and 6 deletions

View File

@@ -194,6 +194,14 @@ namespace Axiom.Interpreter
{
SyntaxError("Encountered 'break' without 'while'");
}
if(breakStack.Count>0)
{
long codePointer = breakStack.Peek();
if(codePointer.Equals(CodePointer()))
{
SyntaxError("Unexpected break encountered.");
}
}
breakStack.Push(CodePointer());
Expect(Scanner.ScanSymbols.break1);
}