BreakStatement
using CLanguage.Compiler;
using CLanguage.Interpreter;
using System.Runtime.CompilerServices;
namespace CLanguage.Syntax
{
public class BreakStatement : Statement
{
public override bool AlwaysReturns => false;
[System.Runtime.CompilerServices.NullableContext(1)]
protected override void DoEmit(EmitContext ec)
{
if (ec.Loop != null)
ec.Emit(OpCode.Jump, ec.Loop.BreakLabel);
else
ec.Report.Error(139, "No enclosing loop out of which to break");
}
}
}