/// <summary> /// Notices the analyzer that method declaration is entered. /// </summary> internal void EnterMethodDeclaration(PhpMethod/*!*/ method) { //function declared within a method is global function //=> method is only declared direct within a class declaration Debug.Assert(locationStack.Peek().Kind == Locations.TypeDecl); RoutineDeclLoc m = new RoutineDeclLoc(method, locationStack.Count); routineDeclStack.Push(m); locationStack.Push(m); EnterConditionalCode(); }
/// <summary> /// Notices the analyzer that function declaration is entered. /// </summary> internal void EnterFunctionDeclaration(PhpRoutine/*!*/ function) { Debug.Assert(function.IsFunction); RoutineDeclLoc f = new RoutineDeclLoc(function, locationStack.Count); routineDeclStack.Push(f); locationStack.Push(f); EnterConditionalCode(); }