public override void OnMethodInvocationExpression(MethodInvocationExpression node) { base.OnMethodInvocationExpression(node); if (this.IsConstructorInvocation(node)) { base.EnsureDocumentInitialized(node); node.set_LexicalInfo(BooExtensions.AsLexicalInfo(base.doc.FindPrevious(node.get_LexicalInfo(), 'n'), node.get_LexicalInfo().get_FileName())); } }
protected override void ProcessMethodInvocation(MethodInvocationExpression node, IMethod method) { base.ProcessMethodInvocation(node, method); if (UtilitiesModule.IsPossibleStartCoroutineInvocationForm(node)) { UnityScript.TypeSystem.UnityScriptTypeSystem unityScriptTypeSystem = this.UnityScriptTypeSystem; if (unityScriptTypeSystem.IsScriptType(method.get_DeclaringType()) && unityScriptTypeSystem.IsGenerator(method)) { if (this.get_CurrentMethod().get_IsStatic()) { this.get_Warnings().Add(UnityScriptWarnings.CannotStartCoroutineFromStaticFunction(node.get_LexicalInfo(), method.get_Name())); } else { node.get_ParentNode().Replace(node, this.get_CodeBuilder().CreateMethodInvocation(this.get_CodeBuilder().CreateSelfReference(node.get_LexicalInfo(), this.get_CurrentType()), this._StartCoroutine, node)); } } } }