32 lines
845 B
C#
32 lines
845 B
C#
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<BoundNode> 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;
|
|
}
|
|
}
|
|
} |