29 lines
918 B
C#
29 lines
918 B
C#
using Convention.RScript.Parser;
|
|
using System.Collections;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Convention.RScript.Runner
|
|
{
|
|
public class EnterNamedSpaceRunner : IRSentenceRunner
|
|
{
|
|
public void Compile(ExpressionParser parser, RScriptSentence sentence, RScriptContext context)
|
|
{
|
|
|
|
}
|
|
|
|
[return: MaybeNull]
|
|
public object Run(ExpressionParser parser, RScriptSentence sentence, RScriptContext context)
|
|
{
|
|
context.CurrentRuntimePointer = context.NamespaceLayer[context.NamespaceLabels[sentence.content]];
|
|
return null;
|
|
}
|
|
|
|
[return: MaybeNull]
|
|
public IEnumerator RunAsync(ExpressionParser parser, RScriptSentence sentence, RScriptContext context)
|
|
{
|
|
context.CurrentRuntimePointer = context.NamespaceLayer[context.NamespaceLabels[sentence.content]];
|
|
yield break;
|
|
}
|
|
}
|
|
}
|