mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Cosmetics.
This commit is contained in:
parent
fda80f2275
commit
4efa08c95d
1 changed files with 10 additions and 11 deletions
|
@ -22,28 +22,27 @@ public enum StringType {
|
||||||
WIDE("L", IToken.tLSTRING),
|
WIDE("L", IToken.tLSTRING),
|
||||||
UTF16("u", IToken.tUTF16STRING),
|
UTF16("u", IToken.tUTF16STRING),
|
||||||
UTF32("U", IToken.tUTF32STRING);
|
UTF32("U", IToken.tUTF32STRING);
|
||||||
|
|
||||||
|
|
||||||
private char[] prefix;
|
private char[] prefix;
|
||||||
private int tokenVal;
|
private int tokenVal;
|
||||||
|
|
||||||
private StringType(String prefix, int tokenVal) {
|
private StringType(String prefix, int tokenVal) {
|
||||||
this.prefix = prefix.toCharArray();
|
this.prefix = prefix.toCharArray();
|
||||||
this.tokenVal = tokenVal;
|
this.tokenVal = tokenVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public char[] getPrefix() {
|
public char[] getPrefix() {
|
||||||
return prefix;
|
return prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTokenValue() {
|
public int getTokenValue() {
|
||||||
return tokenVal;
|
return tokenVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the StringType value that represesnts the 'wider'
|
* Returns the StringType value that represents the 'wider' of the two given StringTypes.
|
||||||
* of the two given StringTypes.
|
* @throws NullPointerException if an argument is null
|
||||||
* @thows NullPointerException if an argument is null
|
|
||||||
*/
|
*/
|
||||||
public static StringType max(StringType st1, StringType st2) {
|
public static StringType max(StringType st1, StringType st2) {
|
||||||
return values()[Math.max(st1.ordinal(), st2.ordinal())];
|
return values()[Math.max(st1.ordinal(), st2.ordinal())];
|
||||||
|
@ -51,12 +50,12 @@ public enum StringType {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the StringType value for the given string literal type.
|
* Returns the StringType value for the given string literal type.
|
||||||
*
|
*
|
||||||
* @see IToken#tSTRING
|
* @see IToken#tSTRING
|
||||||
* @see IToken#tLSTRING
|
* @see IToken#tLSTRING
|
||||||
* @see IToken#tUTF16STRING
|
* @see IToken#tUTF16STRING
|
||||||
* @see IToken#tUTF32STRING
|
* @see IToken#tUTF32STRING
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException if the tokenVal does not represent a string literal
|
* @throws IllegalArgumentException if the tokenVal does not represent a string literal
|
||||||
*/
|
*/
|
||||||
public static StringType fromToken(int tokenVal) {
|
public static StringType fromToken(int tokenVal) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue