2018-11-16 13:46:12 +00:00
|
|
|
using System.Collections.Generic;
|
2018-11-25 18:30:18 +00:00
|
|
|
using Upsilon.Text;
|
2018-11-16 13:46:12 +00:00
|
|
|
|
2018-11-11 17:12:42 +00:00
|
|
|
namespace Upsilon.Binder
|
|
|
|
{
|
2018-11-12 15:21:59 +00:00
|
|
|
public class BoundScript : BoundStatement
|
2018-11-11 17:12:42 +00:00
|
|
|
{
|
2018-11-27 17:38:28 +00:00
|
|
|
public BoundScript(BoundBlockStatement statement, TextSpan span, BoundScope scope) : base(span)
|
2018-11-11 17:12:42 +00:00
|
|
|
{
|
|
|
|
Statement = statement;
|
2018-11-27 17:38:28 +00:00
|
|
|
Scope = scope;
|
2018-11-11 17:12:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public override BoundKind Kind => BoundKind.BoundScript;
|
2018-11-27 17:38:28 +00:00
|
|
|
public override IEnumerable<BoundNode> GetNodeAtPosition(int characterPosition)
|
2018-11-25 18:30:18 +00:00
|
|
|
{
|
2018-11-27 17:38:28 +00:00
|
|
|
foreach (var boundNode in Statement.GetNodeAtPosition(characterPosition)) yield return boundNode;
|
2018-11-25 18:30:18 +00:00
|
|
|
}
|
2018-11-11 17:12:42 +00:00
|
|
|
|
2018-11-16 13:46:12 +00:00
|
|
|
public BoundBlockStatement Statement { get; }
|
2018-11-27 17:38:28 +00:00
|
|
|
public BoundScope Scope { get; }
|
2018-11-11 17:12:42 +00:00
|
|
|
}
|
|
|
|
}
|