override protected void ProcessBuiltinInvocation(MethodInvocationExpression node, BuiltinFunction function)
		{
			if (TypeSystemServices.IsQuackBuiltin(function))
				BindDuck(node);
			else
				base.ProcessBuiltinInvocation(node, function);
		}
예제 #2
0
 private static MethodInvocationExpression CreateBuiltinInvocation(LexicalInfo li, BuiltinFunction builtin)
 {
     return new MethodInvocationExpression(li) { Target = CreateBuiltinReference(builtin) };
 }
예제 #3
0
 public static ReferenceExpression CreateBuiltinReference(BuiltinFunction builtin)
 {
     return new ReferenceExpression(builtin.Name) { Entity = builtin };
 }
예제 #4
0
        private static MethodInvocationExpression CreateBuiltinInvocation(LexicalInfo li, BuiltinFunction builtin)
        {
            MethodInvocationExpression eval = new MethodInvocationExpression(li);

            eval.Target = CreateBuiltinReference(builtin);
            return(eval);
        }
예제 #5
0
        protected virtual void ProcessBuiltinInvocation(MethodInvocationExpression node, BuiltinFunction function)
        {
            switch (function.FunctionType)
            {
                case BuiltinFunctionType.Len:
                    {
                        ProcessLenInvocation(node);
                        break;
                    }

                case BuiltinFunctionType.AddressOf:
                    {
                        ProcessAddressOfInvocation(node);
                        break;
                    }

                case BuiltinFunctionType.Eval:
                    {
                        ProcessEvalInvocation(node);
                        break;
                    }

                default:
                    {
                        NotImplemented(node, "BuiltinFunction: " + function);
                        break;
                    }
            }
        }
예제 #6
0
 protected void AddBuiltin(BuiltinFunction function)
 {
     _primitives[function.Name] = function;
 }
예제 #7
0
        void OnBuiltinFunction(BuiltinFunction function, MethodInvocationExpression node)
        {
            switch (function.FunctionType)
            {
                case BuiltinFunctionType.Switch:
                    {
                        OnSwitch(node);
                        break;
                    }

                case BuiltinFunctionType.AddressOf:
                    {
                        OnAddressOf(node);
                        break;
                    }

                case BuiltinFunctionType.Eval:
                    {
                        OnEval(node);
                        break;
                    }

                case BuiltinFunctionType.InitValueType:
                    {
                        OnInitValueType(node);
                        break;
                    }

                default:
                    {
                        NotImplemented(node, "BuiltinFunction: " + function.FunctionType);
                        break;
                    }
            }
        }
예제 #8
0
		protected void AddBuiltin(BuiltinFunction function)
		{
			_primitives[function.Name] = function;
		}
예제 #9
0
 private static MethodInvocationExpression CreateBuiltinInvocation(LexicalInfo li, BuiltinFunction builtin)
 {
     return(new MethodInvocationExpression(li)
     {
         Target = CreateBuiltinReference(builtin)
     });
 }
 protected override void ProcessBuiltinInvocation(BuiltinFunction function, MethodInvocationExpression node)
 {
     if (TypeSystemServices.IsQuackBuiltin(function))
     {
         BindDuck(node);
     }
     else
     {
         base.ProcessBuiltinInvocation(function, node);
     }
 }
예제 #11
0
 private static MethodInvocationExpression CreateBuiltinInvocation(LexicalInfo li, BuiltinFunction builtin)
 {
     MethodInvocationExpression eval = new MethodInvocationExpression(li);
     eval.Target = CreateBuiltinReference(builtin);
     return eval;
 }
예제 #12
0
 public static ReferenceExpression CreateBuiltinReference(BuiltinFunction builtin)
 {
     ReferenceExpression target = new ReferenceExpression(builtin.Name);
     target.Entity = builtin;
     return target;
 }
 protected override void ProcessBuiltinInvocation(MethodInvocationExpression node, BuiltinFunction function)
 {
     if (function == UnityScript.TypeSystem.UnityScriptTypeSystem.UnityScriptEval)
     {
         EvalAnnotation.Mark(this.get_CurrentMethod());
         this.BindExpressionType(node, this.get_TypeSystemServices().ObjectType);
     }
     else if (function == UnityScript.TypeSystem.UnityScriptTypeSystem.UnityScriptTypeof)
     {
         this.ProcessTypeofBuiltin(node);
     }
     else
     {
         base.ProcessBuiltinInvocation(node, function);
     }
 }