1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 01:05:38 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2010-08-24 05:26:51 +00:00
parent 411edba679
commit 4bb004213a
3 changed files with 12 additions and 12 deletions

View file

@ -794,7 +794,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
} else { } else {
log= ParserUtil.getParserLogService(); log= ParserUtil.getParserLogService();
} }
return ((AbstractLanguage)language).getASTTranslationUnit(fileContent, scanInfo, crf, index, options, log); return ((AbstractLanguage) language).getASTTranslationUnit(fileContent, scanInfo, crf, index, options, log);
} }
} }
return null; return null;

View file

@ -100,7 +100,7 @@ public abstract class LazyCharArray extends AbstractCharArray {
int chunkOffset= offset >> CHUNK_BITS; int chunkOffset= offset >> CHUNK_BITS;
int loffset= offset & (CHUNK_SIZE - 1); int loffset= offset & (CHUNK_SIZE - 1);
char[] data= getChunkData(chunkOffset); char[] data= getChunkData(chunkOffset);
final int canCopy = data.length-loffset; final int canCopy = data.length - loffset;
if (length <= canCopy) { if (length <= canCopy) {
System.arraycopy(data, loffset, destination, destinationPos, length); System.arraycopy(data, loffset, destination, destinationPos, length);
return; return;

View file

@ -187,7 +187,7 @@ final public class Lexer implements ITokenSequence {
public final int consumeLine(int origin) throws OffsetLimitReachedException { public final int consumeLine(int origin) throws OffsetLimitReachedException {
Token t= fToken; Token t= fToken;
Token lt= null; Token lt= null;
while(true) { while (true) {
switch(t.getType()) { switch(t.getType()) {
case IToken.tCOMPLETION: case IToken.tCOMPLETION:
if (lt != null) { if (lt != null) {
@ -222,7 +222,7 @@ final public class Lexer implements ITokenSequence {
fInsideIncludeDirective= false; fInsideIncludeDirective= false;
final Token t= fToken; final Token t= fToken;
boolean haveNL= t==null || t.getType() == tNEWLINE; boolean haveNL= t==null || t.getType() == tNEWLINE;
while(true) { while (true) {
final boolean hadNL= haveNL; final boolean hadNL= haveNL;
haveNL= false; haveNL= false;
final int start= fOffset; final int start= fOffset;
@ -337,7 +337,7 @@ final public class Lexer implements ITokenSequence {
* Computes the next token. * Computes the next token.
*/ */
private Token fetchToken() throws OffsetLimitReachedException { private Token fetchToken() throws OffsetLimitReachedException {
while(true) { while (true) {
final int start= fOffset; final int start= fOffset;
final int c= fCharPhase3; final int c= fCharPhase3;
final int d= nextCharPhase3(); final int d= nextCharPhase3();
@ -367,12 +367,12 @@ final public class Lexer implements ITokenSequence {
case 'u': case 'u':
case 'U': case 'U':
if(fOptions.fSupportUTFLiterals) { if (fOptions.fSupportUTFLiterals) {
if(d == '"') { if (d == '"') {
nextCharPhase3(); nextCharPhase3();
return stringLiteral(start, c == 'u' ? IToken.tUTF16STRING : IToken.tUTF32STRING); return stringLiteral(start, c == 'u' ? IToken.tUTF16STRING : IToken.tUTF32STRING);
} }
if(d == '\'') { if (d == '\'') {
nextCharPhase3(); nextCharPhase3();
return charLiteral(start, c == 'u' ? IToken.tUTF16CHAR : IToken.tUTF32CHAR); return charLiteral(start, c == 'u' ? IToken.tUTF16CHAR : IToken.tUTF32CHAR);
} }
@ -730,7 +730,7 @@ final public class Lexer implements ITokenSequence {
private void blockComment(final int start, final char trigger) { private void blockComment(final int start, final char trigger) {
// we can ignore line-splices, trigraphs and windows newlines when searching for the '*' // we can ignore line-splices, trigraphs and windows newlines when searching for the '*'
int pos= fEndOffset; int pos= fEndOffset;
while(isValidOffset(pos)) { while (isValidOffset(pos)) {
if (fInput.get(pos++) == trigger) { if (fInput.get(pos++) == trigger) {
fEndOffset= pos; fEndOffset= pos;
if (nextCharPhase3() == '/') { if (nextCharPhase3() == '/') {
@ -747,7 +747,7 @@ final public class Lexer implements ITokenSequence {
private void lineComment(final int start) { private void lineComment(final int start) {
int c= fCharPhase3; int c= fCharPhase3;
while(true) { while (true) {
switch (c) { switch (c) {
case END_OF_INPUT: case END_OF_INPUT:
case '\n': case '\n':
@ -1073,7 +1073,7 @@ final public class Lexer implements ITokenSequence {
return c; return c;
} }
} }
while(true); while (true);
} }
/** /**
@ -1103,7 +1103,7 @@ final public class Lexer implements ITokenSequence {
private int findEndOfLineSpliceSequence(int pos) { private int findEndOfLineSpliceSequence(int pos) {
boolean haveBackslash= true; boolean haveBackslash= true;
int result= -1; int result= -1;
loop: while(isValidOffset(pos)) { loop: while (isValidOffset(pos)) {
switch(fInput.get(pos++)) { switch(fInput.get(pos++)) {
case '\n': case '\n':
if (haveBackslash) { if (haveBackslash) {