mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Removed one last remainder of core.model.Util in parser to unbreak 2.0 build.
This commit is contained in:
parent
32c6adb106
commit
39f8ff8c86
3 changed files with 11 additions and 7 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2003-11-06 John Camelon
|
||||||
|
Removed one last remainder of core.model.Util in parser to unbreak 2.0 build.
|
||||||
|
|
||||||
2003-11-05 John Camelon
|
2003-11-05 John Camelon
|
||||||
Fixed Bug 44838 : exception when resolving parameter references in a constructor
|
Fixed Bug 44838 : exception when resolving parameter references in a constructor
|
||||||
Fixed Bug 46165 : fields referenced in constructor chains are not called back upon
|
Fixed Bug 46165 : fields referenced in constructor chains are not called back upon
|
||||||
|
|
|
@ -18,11 +18,10 @@ import java.util.LinkedList;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.parser.IParserLogService;
|
||||||
import org.eclipse.cdt.core.parser.IProblem;
|
import org.eclipse.cdt.core.parser.IProblem;
|
||||||
import org.eclipse.cdt.core.parser.ISourceElementRequestor;
|
import org.eclipse.cdt.core.parser.ISourceElementRequestor;
|
||||||
import org.eclipse.cdt.core.parser.ast.IASTInclusion;
|
import org.eclipse.cdt.core.parser.ast.IASTInclusion;
|
||||||
import org.eclipse.cdt.internal.core.model.IDebugLogConstants;
|
|
||||||
import org.eclipse.cdt.internal.core.model.Util;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author aniefer
|
* @author aniefer
|
||||||
|
@ -32,8 +31,10 @@ import org.eclipse.cdt.internal.core.model.Util;
|
||||||
*/
|
*/
|
||||||
public class ContextStack {
|
public class ContextStack {
|
||||||
|
|
||||||
public ContextStack(){
|
private final IParserLogService log;
|
||||||
super();
|
|
||||||
|
public ContextStack( IParserLogService l ) {
|
||||||
|
log = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateContext(Reader reader, String filename, int type, IASTInclusion inclusion, ISourceElementRequestor requestor) throws ContextException {
|
public void updateContext(Reader reader, String filename, int type, IASTInclusion inclusion, ISourceElementRequestor requestor) throws ContextException {
|
||||||
|
@ -86,7 +87,7 @@ public class ContextStack {
|
||||||
try {
|
try {
|
||||||
currentContext.getReader().close();
|
currentContext.getReader().close();
|
||||||
} catch (IOException ie) {
|
} catch (IOException ie) {
|
||||||
Util.debugLog("ContextStack : Error closing reader ", IDebugLogConstants.PARSER);
|
log.traceLog("ContextStack : Error closing reader ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if( currentContext.getKind() == IScannerContext.INCLUSION )
|
if( currentContext.getKind() == IScannerContext.INCLUSION )
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class Scanner implements IScanner {
|
||||||
this.language = language;
|
this.language = language;
|
||||||
astFactory = ParserFactory.createASTFactory( mode, language );
|
astFactory = ParserFactory.createASTFactory( mode, language );
|
||||||
this.backupReader = reader;
|
this.backupReader = reader;
|
||||||
|
contextStack = new ContextStack( log );
|
||||||
try {
|
try {
|
||||||
//this is a hack to get around a sudden EOF experience
|
//this is a hack to get around a sudden EOF experience
|
||||||
contextStack.push(
|
contextStack.push(
|
||||||
|
@ -411,7 +411,7 @@ public class Scanner implements IScanner {
|
||||||
private static final String DEFINED = "defined";
|
private static final String DEFINED = "defined";
|
||||||
private static final String POUND_DEFINE = "#define ";
|
private static final String POUND_DEFINE = "#define ";
|
||||||
|
|
||||||
private ContextStack contextStack = new ContextStack();
|
private ContextStack contextStack = null;
|
||||||
private IScannerContext lastContext = null;
|
private IScannerContext lastContext = null;
|
||||||
|
|
||||||
private IScannerInfo originalConfig;
|
private IScannerInfo originalConfig;
|
||||||
|
|
Loading…
Add table
Reference in a new issue