using Convention.RScript.Parser; using System.Diagnostics.CodeAnalysis; namespace Convention.RScript.Runner { public class ExpressionRunner : IRSentenceRunner { public void Compile(ExpressionParser parser, RScriptSentence sentence, RScriptContext context) { parser.Compile(sentence.content); } [return: MaybeNull] public object Run(ExpressionParser parser, RScriptSentence sentence, RScriptContext context) { return parser.Evaluate(sentence.content); } } }