public void CheckExistenceOfLocalFunction(LocalFunctionReference localFunctionReference)
        {
            if (myCurrentMethods.IsEmpty())
            {
                throw CreateException($"no such local function {localFunctionReference}");
            }
            var names = myCurrentMethods.Peek().LocalMethods.Select(method => method.Id.Value).ToList();

            if (!(names.Contains(localFunctionReference.MethodId.Value)))
            {
                throw CreateException($"no such local function {localFunctionReference}. Actual names:[{ names.Join(";")}]");
            }
        }
示例#2
0
 public LocalFunctionTarget(LocalFunctionReference localFunctionReference)
 {
     TargetFunction = localFunctionReference.MethodId;
 }