示例#1
0
		/// <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();
		}
示例#2
0
		/// <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();
		}