using System.Collections; using System.Collections.Generic; using Upsilon.Evaluator; using Upsilon.Text; namespace Upsilon.Binder { public class BoundBreakStatement : BoundStatement { public BoundBreakStatement(TextSpan span) : base(span) { } public override BoundKind Kind => BoundKind.BoundBreakStatement; public override IEnumerable GetChildren() { yield break; } internal override void Evaluate(EvaluationScope scope, Diagnostics diagnostics, ref EvaluationState state) { state.HasBroken = true; } internal override IEnumerator EvaluateCoroutine(EvaluationScope scope, Diagnostics diagnostics, EvaluationState state) { state.HasBroken = true; yield break; } } }