*******************************************************************************/
package net.sourceforge.phpdt.internal.compiler;
-import net.sourceforge.phpdt.core.compiler.CharOperation;
import net.sourceforge.phpdt.core.compiler.IProblem;
import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit;
+import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions;
import net.sourceforge.phpdt.internal.compiler.parser.UnitParser;
import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation;
import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter;
import net.sourceforge.phpeclipse.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.core.runtime.CoreException;
-
/*
* A document element parser extracts structural information
public DocumentElementParser(
final IDocumentElementRequestor requestor,
- IProblemFactory problemFactory) {
-// CompilerOptions options) {
+ IProblemFactory problemFactory,
+ CompilerOptions options) {
super(new ProblemReporter(
DefaultErrorHandlingPolicies.exitAfterAllProblems(),
-// options,
+ options,
problemFactory) {
public void record(IProblem problem, CompilationResult unitResult) {
requestor.acceptProblem(problem);
// options.sourceLevel >= CompilerOptions.JDK1_4);
this.requestor = requestor;
intArrayStack = new int[30][];
-// this.options = options;
+ this.options = options;
}
/**
public void initialize() {
//positionning the parser for a new compilation unit
//avoiding stack reallocation and all that....
- super.initialize();
+ super.initialize(false);
intArrayPtr = -1;
}
/**
scanner.resetTo(0, regionSource.length);
scanner.setSource(regionSource);
parse();
- } catch (CoreException e) {
- e.printStackTrace();
} catch (AbortCompilation ex) {
}
}