更新异步step
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Convention.RScript.Parser;
|
||||
using System.Collections;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Convention.RScript.Runner
|
||||
@@ -15,5 +16,14 @@ namespace Convention.RScript.Runner
|
||||
{
|
||||
return parser.Evaluate(sentence.content);
|
||||
}
|
||||
|
||||
[return: MaybeNull]
|
||||
public IEnumerator RunAsync(ExpressionParser parser, RScriptSentence sentence, RScriptContext context)
|
||||
{
|
||||
var result = parser.Evaluate(sentence.content);
|
||||
if(result is IEnumerator ir)
|
||||
yield return ir;
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user