29 lines
942 B
C#
29 lines
942 B
C#
using System.Collections.Generic;
|
|
using Upsilon.Evaluator;
|
|
using Upsilon.Text;
|
|
|
|
namespace Upsilon.Binder
|
|
{
|
|
public class BoundScript : BoundStatement
|
|
{
|
|
public Script Script { get; }
|
|
|
|
public BoundScript(BoundBlockStatement statement, TextSpan span, BoundScope scope, string fileName, Script script) : base(span)
|
|
{
|
|
Statement = statement;
|
|
Scope = scope;
|
|
FileName = fileName;
|
|
Script = script;
|
|
}
|
|
|
|
public string FileName { get; set; }
|
|
public override BoundKind Kind => BoundKind.BoundScript;
|
|
public override IEnumerable<BoundNode> GetNodeAtPosition(int linePosition, int characterPosition)
|
|
{
|
|
foreach (var boundNode in Statement.GetNodeAtPosition(linePosition, characterPosition)) yield return boundNode;
|
|
}
|
|
|
|
public BoundBlockStatement Statement { get; }
|
|
public BoundScope Scope { get; }
|
|
}
|
|
} |