2019-02-13 17:10:39 +00:00
|
|
|
using System.Collections;
|
2018-11-27 17:38:28 +00:00
|
|
|
using System.Collections.Generic;
|
2019-02-13 15:29:58 +00:00
|
|
|
using Upsilon.Evaluator;
|
2018-11-25 18:30:18 +00:00
|
|
|
using Upsilon.Text;
|
|
|
|
|
2018-11-23 14:27:48 +00:00
|
|
|
namespace Upsilon.Binder
|
|
|
|
{
|
|
|
|
public class BoundBreakStatement : BoundStatement
|
|
|
|
{
|
2018-11-25 18:30:18 +00:00
|
|
|
public BoundBreakStatement(TextSpan span) : base(span)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-11-23 14:27:48 +00:00
|
|
|
public override BoundKind Kind => BoundKind.BoundBreakStatement;
|
2019-01-17 12:56:53 +00:00
|
|
|
|
|
|
|
public override IEnumerable<BoundNode> GetChildren()
|
|
|
|
{
|
|
|
|
yield break;
|
|
|
|
}
|
2019-02-13 15:29:58 +00:00
|
|
|
|
|
|
|
internal override void Evaluate(EvaluationScope scope, Diagnostics diagnostics, ref EvaluationState state)
|
|
|
|
{
|
|
|
|
state.HasBroken = true;
|
|
|
|
}
|
2019-02-13 17:10:39 +00:00
|
|
|
|
|
|
|
internal override IEnumerator EvaluateCoroutine(EvaluationScope scope, Diagnostics diagnostics, EvaluationState state)
|
|
|
|
{
|
|
|
|
state.HasBroken = true;
|
|
|
|
yield break;
|
|
|
|
}
|
2018-11-23 14:27:48 +00:00
|
|
|
}
|
|
|
|
}
|