mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
Cosmetics.
This commit is contained in:
parent
be1435ad0a
commit
389a1ff92b
6 changed files with 21 additions and 26 deletions
|
@ -17,9 +17,7 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTPreprocessorMacroDefinition extends
|
||||
IASTPreprocessorStatement, IASTNameOwner {
|
||||
|
||||
public interface IASTPreprocessorMacroDefinition extends IASTPreprocessorStatement, IASTNameOwner {
|
||||
/**
|
||||
* <code>MACRO_NAME</code> describes the relationship between a macro
|
||||
* definition and it's name.
|
||||
|
@ -44,7 +42,6 @@ public interface IASTPreprocessorMacroDefinition extends
|
|||
*/
|
||||
public IASTFileLocation getExpansionLocation();
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this macro definition occurs in active code.
|
||||
* @since 5.1
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.core.index;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
|
||||
|
@ -23,7 +22,6 @@ import org.eclipse.core.runtime.CoreException;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IIndexMacro extends IMacroBinding, IIndexBinding {
|
||||
|
||||
IIndexMacro[] EMPTY_INDEX_MACRO_ARRAY = new IIndexMacro[0];
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,13 +11,12 @@
|
|||
package org.eclipse.cdt.core.index;
|
||||
|
||||
/**
|
||||
* Represents a binding for all macros with the same name. When you try to adapt a macro binding in an index
|
||||
* you'll get the container as a result.
|
||||
* Represents a binding for all macros with the same name. When you try to adapt a macro binding
|
||||
* in an index you'll get the container as a result.
|
||||
* @since 5.0
|
||||
*
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IIndexMacroContainer extends IIndexBinding {
|
||||
|
||||
}
|
||||
|
|
|
@ -1250,6 +1250,7 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable {
|
|||
condEndOffset= lexer.consumeLine(ORIGIN_PREPROCESSOR_DIRECTIVE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (headerName == null || headerName.length == 0) {
|
||||
if (active) {
|
||||
handleProblem(IProblem.PREPROCESSOR_INVALID_DIRECTIVE,
|
||||
|
@ -1288,8 +1289,8 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable {
|
|||
fAllIncludedFiles.add(path);
|
||||
ILocationCtx ctx= fLocationMap.pushInclusion(poundOffset, nameOffsets[0], nameOffsets[1],
|
||||
condEndOffset, source, path, headerName, userInclude, isHeuristic, fi.isSource());
|
||||
ScannerContext fctx= new ScannerContext(ctx, fCurrentContext, new Lexer(source,
|
||||
fLexOptions, this, this));
|
||||
ScannerContext fctx= new ScannerContext(ctx, fCurrentContext,
|
||||
new Lexer(source, fLexOptions, this, this));
|
||||
fctx.setFoundOnPath(fi.getFoundOnPath(), includeDirective);
|
||||
fCurrentContext= fctx;
|
||||
}
|
||||
|
|
|
@ -22,14 +22,17 @@ import org.eclipse.cdt.core.parser.OffsetLimitReachedException;
|
|||
final class ScannerContext {
|
||||
enum BranchKind {eIf, eElif, eElse, eEnd}
|
||||
enum CodeState {eActive, eParseInactive, eSkipInactive}
|
||||
|
||||
final static class Conditional {
|
||||
private final CodeState fInitialState;
|
||||
private BranchKind fLast;
|
||||
private boolean fTakeElse= true;
|
||||
|
||||
Conditional(CodeState state) {
|
||||
fInitialState= state;
|
||||
fLast= BranchKind.eIf;
|
||||
}
|
||||
|
||||
boolean canHaveActiveBranch(boolean withinExpansion) {
|
||||
return fTakeElse && isActive(withinExpansion);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
* Andrew Ferguson (Symbian)
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.core.pdom.db;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
|
@ -260,7 +259,6 @@ public class ShortString implements IString {
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public int compareCompatibleWithIgnoreCase(IString string) throws CoreException {
|
||||
if (string instanceof ShortString)
|
||||
return compareCompatibleWithIgnoreCase((ShortString)string);
|
||||
|
@ -270,7 +268,6 @@ public class ShortString implements IString {
|
|||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
|
||||
public int compareCompatibleWithIgnoreCase(ShortString other) throws CoreException {
|
||||
Chunk chunk1 = db.getChunk(record);
|
||||
Chunk chunk2 = other.db.getChunk(other.record);
|
||||
|
|
Loading…
Add table
Reference in a new issue