override protected void ProcessBuiltinInvocation(MethodInvocationExpression node, BuiltinFunction function) { if (TypeSystemServices.IsQuackBuiltin(function)) BindDuck(node); else base.ProcessBuiltinInvocation(node, function); }
private static MethodInvocationExpression CreateBuiltinInvocation(LexicalInfo li, BuiltinFunction builtin) { return new MethodInvocationExpression(li) { Target = CreateBuiltinReference(builtin) }; }
public static ReferenceExpression CreateBuiltinReference(BuiltinFunction builtin) { return new ReferenceExpression(builtin.Name) { Entity = builtin }; }
private static MethodInvocationExpression CreateBuiltinInvocation(LexicalInfo li, BuiltinFunction builtin) { MethodInvocationExpression eval = new MethodInvocationExpression(li); eval.Target = CreateBuiltinReference(builtin); return(eval); }
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; } } }
protected void AddBuiltin(BuiltinFunction function) { _primitives[function.Name] = function; }
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; } } }
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); } }
private static MethodInvocationExpression CreateBuiltinInvocation(LexicalInfo li, BuiltinFunction builtin) { MethodInvocationExpression eval = new MethodInvocationExpression(li); eval.Target = CreateBuiltinReference(builtin); return eval; }
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); } }