解离出Runner
This commit is contained in:
14
DoRunner/ExpressionRunner.cs
Normal file
14
DoRunner/ExpressionRunner.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Convention.RScript.Parser;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Convention.RScript.Runner
|
||||
{
|
||||
public class ExpressionRunner : IRSentenceRunner
|
||||
{
|
||||
[return: MaybeNull]
|
||||
public object Run(ExpressionParser parser, RScriptSentence sentence, RScriptContext context)
|
||||
{
|
||||
return parser.Evaluate(sentence.content);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user