Added "Task Tags" functionality (TODO,...)
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / parser / UnitParser.java
index d8a0199..3a40512 100644 (file)
@@ -1,6 +1,5 @@
 package net.sourceforge.phpdt.internal.compiler.parser;
 
-import java.util.Stack;
 
 import net.sourceforge.phpdt.core.IJavaModelMarker;
 import net.sourceforge.phpdt.core.compiler.IProblem;
@@ -8,7 +7,6 @@ import net.sourceforge.phpdt.internal.compiler.CompilationResult;
 import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit;
 import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation;
 import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter;
-import net.sourceforge.phpdt.internal.compiler.util.Util;
 import net.sourceforge.phpeclipse.internal.compiler.ast.CompilationUnitDeclaration;
 import net.sourceforge.phpeclipse.internal.compiler.ast.ConstructorDeclaration;
 import net.sourceforge.phpeclipse.internal.compiler.ast.FieldDeclaration;
@@ -28,9 +26,9 @@ import org.eclipse.core.runtime.CoreException;
 public class UnitParser extends Parser {
 
   public UnitParser(ProblemReporter problemReporter) { //, boolean optimizeStringLiterals, boolean assertMode) {
-    super();
+    super(problemReporter);
     nestedMethod = new int[30];
-    this.problemReporter = problemReporter;
+    
     //         this.optimizeStringLiterals = optimizeStringLiterals;
     //         this.assertMode = assertMode;
     //         this.initializeScanner();
@@ -209,41 +207,7 @@ public class UnitParser extends Parser {
 
     }
   }
-  protected CompilationUnitDeclaration endParse(int act) {
-
-    this.lastAct = act;
 
-    if (currentElement != null) {
-      currentElement.topElement().updateParseTree();
-      if (VERBOSE_RECOVERY) {
-        System.out.print(Util.bind("parser.syntaxRecovery")); //$NON-NLS-1$
-        System.out.println("--------------------------"); //$NON-NLS-1$
-        System.out.println(compilationUnit);
-        System.out.println("----------------------------------"); //$NON-NLS-1$
-      }
-    } else {
-      if (diet & VERBOSE_RECOVERY) {
-        System.out.print(Util.bind("parser.regularParse")); //$NON-NLS-1$
-        System.out.println("--------------------------"); //$NON-NLS-1$
-        System.out.println(compilationUnit);
-        System.out.println("----------------------------------"); //$NON-NLS-1$
-      }
-    }
-    if (scanner.recordLineSeparator) {
-      compilationUnit.compilationResult.lineSeparatorPositions = scanner.getLineEnds();
-    }
-    if (scanner.taskTags != null) {
-      for (int i = 0; i < scanner.foundTaskCount; i++) {
-        problemReporter().task(
-          new String(scanner.foundTaskTags[i]),
-          new String(scanner.foundTaskMessages[i]),
-          scanner.foundTaskPriorities[i] == null ? null : new String(scanner.foundTaskPriorities[i]),
-          scanner.foundTaskPositions[i][0],
-          scanner.foundTaskPositions[i][1]);
-      }
-    }
-    return compilationUnit;
-  }
 
   // A P I