Skip to content

Commit

Permalink
wip entity state serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
G3Kappa committed Jan 17, 2024
1 parent 64e6a78 commit 5b02e32
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Ergo/Runtime/ErgoVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,14 @@ protected virtual void CleanUp()
SuccessToSolution();
SubstitutionMap.Pool.Release(Environment);
}

public Op ParseAndCompileQuery(string query, CompilerFlags flags = CompilerFlags.Default)
{
if (KB.Scope.Parse<Query>(query).TryGetValue(out var q))
return CompileQuery(q, flags);
return Ops.Fail;
}

public Op CompileQuery(Query query, CompilerFlags flags = CompilerFlags.Default)
{
var exps = GetQueryExpansions(query, flags);
Expand Down

0 comments on commit 5b02e32

Please sign in to comment.