mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
Cosmetics.
This commit is contained in:
parent
e726c3d217
commit
1e9ebf883d
2 changed files with 8 additions and 12 deletions
|
@ -6,8 +6,8 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.parser;
|
package org.eclipse.cdt.core.parser;
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ package org.eclipse.cdt.core.parser;
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface IToken {
|
public interface IToken {
|
||||||
|
|
||||||
// getters
|
// getters
|
||||||
public int getType();
|
public int getType();
|
||||||
public String getImage();
|
public String getImage();
|
||||||
|
@ -27,19 +26,17 @@ public interface IToken {
|
||||||
public IToken getNext();
|
public IToken getNext();
|
||||||
|
|
||||||
public void setNext(IToken t);
|
public void setNext(IToken t);
|
||||||
public void setType(int i);
|
public void setType(int i);
|
||||||
|
|
||||||
|
|
||||||
// Token types
|
// Token types
|
||||||
int FIRST_RESERVED_PREPROCESSOR= -200;
|
int FIRST_RESERVED_PREPROCESSOR= -200;
|
||||||
int LAST_RESERVED_PREPROCESSOR= -101;
|
int LAST_RESERVED_PREPROCESSOR= -101;
|
||||||
int FIRST_RESERVED_SCANNER= -100;
|
int FIRST_RESERVED_SCANNER= -100;
|
||||||
int LAST_RESERVED_SCANNER= -1;
|
int LAST_RESERVED_SCANNER= -1;
|
||||||
|
|
||||||
/** @since 5.2 */
|
/** @since 5.2 */
|
||||||
int t_PRAGMA = 5200;
|
int t_PRAGMA = 5200;
|
||||||
|
|
||||||
|
|
||||||
int tIDENTIFIER = 1;
|
int tIDENTIFIER = 1;
|
||||||
int tINTEGER = 2;
|
int tINTEGER = 2;
|
||||||
int tCOLONCOLON = 3;
|
int tCOLONCOLON = 3;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.parser.scanner;
|
package org.eclipse.cdt.internal.core.parser.scanner;
|
||||||
|
|
||||||
|
@ -48,14 +48,13 @@ public class Token implements IToken, Cloneable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public int getLength() {
|
final public int getLength() {
|
||||||
return fEndOffset-fOffset;
|
return fEndOffset - fOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public IToken getNext() {
|
final public IToken getNext() {
|
||||||
return fNextToken;
|
return fNextToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public void setType(int kind) {
|
final public void setType(int kind) {
|
||||||
|
@ -73,8 +72,8 @@ public class Token implements IToken, Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shiftOffset(int shift) {
|
public void shiftOffset(int shift) {
|
||||||
fOffset+= shift;
|
fOffset += shift;
|
||||||
fEndOffset+= shift;
|
fEndOffset += shift;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue