irules/samples/red/RedBindingRequest.cs

31 lines
910 B
C#

using Irony.Interpreter;
using Irony.Interpreter.Ast;
namespace red
{
public class RedBindingRequest
{
private ScriptThread scriptThread;
private AstNode currentNode;
public string Symbol { get; }
public BindingRequestFlags Options { get; }
public ModuleInfo FromModule { get; }
public ScopeInfo FromScopeInfo { get; }
public bool IgnoreCase { get; }
public RedBindingRequest(ScriptThread thread, AstNode fromNode, string symbol, BindingRequestFlags flags)
{
this.scriptThread = thread;
this.currentNode = fromNode;
Symbol = symbol;
this.Options = flags;
FromModule = thread.App.DataMap.GetModule(fromNode.ModuleNode);
FromScopeInfo = thread.CurrentScope.Info;
IgnoreCase = !thread.Runtime.Language.Grammar.CaseSensitive;
}
}
}