@@ -11,7 +11,6 @@ namespace RelogicLabs.JSchema.Script;
1111
1212internal sealed class GFunction : IRFunction
1313{
14- public const string ConstraintPrefix = "@" ;
1514 public const int ConstraintMode = 1 ;
1615 public const int FutureMode = 3 ;
1716 public const int SubroutineMode = 4 ;
@@ -32,20 +31,20 @@ public GFunction(GParameter[] parameters, Evaluator body, int mode)
3231 Mode = mode ;
3332 }
3433
35- public ScopeContext Bind ( ScopeContext parentScope , List < IEValue > arguments )
34+ public ScriptScope Bind ( ScriptScope parentScope , List < IEValue > arguments )
3635 {
37- AreCompatible ( this , arguments , FUNS05 ) ;
38- var scope = new ScopeContext ( parentScope ) ;
36+ AreCompatible ( this , arguments , FNVK02 ) ;
37+ var scope = new ScriptScope ( parentScope ) ;
3938 var i = 0 ;
4039 foreach ( var p in Parameters ) scope . AddVariable ( p . Name , p . Variadic
4140 ? new GArray ( arguments . GetRange ( i ) ) : arguments [ i ++ ] ) ;
4241 return scope ;
4342 }
4443
45- public IEValue Invoke ( ScopeContext functionScope , List < IEValue > arguments )
44+ public IEValue Invoke ( ScriptScope functionScope , List < IEValue > arguments )
4645 => Invoke ( functionScope ) ;
4746
48- public IEValue Invoke ( ScopeContext functionScope )
47+ public IEValue Invoke ( ScriptScope functionScope )
4948 {
5049 var result = Body ( functionScope ) ;
5150 if ( result is GControl ctrl ) return ctrl . Value ;
0 commit comments