Java Code Examples for com.sun.tools.javac.util.Name#getIndex()

The following examples show how to use com.sun.tools.javac.util.Name#getIndex() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Tokens.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private void enterKeyword(String s, TokenKind token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 2
Source File: Tokens.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void enterKeyword(String s, TokenKind token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 3
Source File: Tokens.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private void enterKeyword(String s, TokenKind token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 4
Source File: Keywords.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
public Token key(Name name) {
    return (name.getIndex() > maxKey) ? IDENTIFIER : key[name.getIndex()];
}
 
Example 5
Source File: Keywords.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
private void enterKeyword(String s, Token token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 6
Source File: Tokens.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void enterKeyword(String s, TokenKind token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 7
Source File: Tokens.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void enterKeyword(String s, TokenKind token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 8
Source File: Tokens.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void enterKeyword(String s, TokenKind token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 9
Source File: Tokens.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
private void enterKeyword(String s, TokenKind token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 10
Source File: Tokens.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private void enterKeyword(String s, TokenKind token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 11
Source File: Keywords.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
private void enterKeyword(String s, Token token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 12
Source File: Tokens.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void enterKeyword(String s, TokenKind token) {
    Name n = names.fromString(s);
    tokenName[token.ordinal()] = n;
    if (n.getIndex() > maxKey) maxKey = n.getIndex();
}
 
Example 13
Source File: Keywords.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
public Token key(Name name) {
    return (name.getIndex() > maxKey) ? IDENTIFIER : key[name.getIndex()];
}
 
Example 14
Source File: Tokens.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new token given a name; if the name corresponds to a token name,
 * a new token of the corresponding kind is returned; otherwise, an
 * identifier token is returned.
 */
TokenKind lookupKind(Name name) {
    return (name.getIndex() > maxKey) ? TokenKind.IDENTIFIER : key[name.getIndex()];
}
 
Example 15
Source File: Tokens.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new token given a name; if the name corresponds to a token name,
 * a new token of the corresponding kind is returned; otherwise, an
 * identifier token is returned.
 */
TokenKind lookupKind(Name name) {
    return (name.getIndex() > maxKey) ? TokenKind.IDENTIFIER : key[name.getIndex()];
}
 
Example 16
Source File: Tokens.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Create a new token given a name; if the name corresponds to a token name,
 * a new token of the corresponding kind is returned; otherwise, an
 * identifier token is returned.
 */
TokenKind lookupKind(Name name) {
    return (name.getIndex() > maxKey) ? TokenKind.IDENTIFIER : key[name.getIndex()];
}
 
Example 17
Source File: Tokens.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new token given a name; if the name corresponds to a token name,
 * a new token of the corresponding kind is returned; otherwise, an
 * identifier token is returned.
 */
TokenKind lookupKind(Name name) {
    return (name.getIndex() > maxKey) ? TokenKind.IDENTIFIER : key[name.getIndex()];
}
 
Example 18
Source File: Tokens.java    From java-n-IDE-for-Android with Apache License 2.0 2 votes vote down vote up
/**
 * Create a new token given a name; if the name corresponds to a token name,
 * a new token of the corresponding kind is returned; otherwise, an
 * identifier token is returned.
 */
TokenKind lookupKind(Name name) {
    return (name.getIndex() > maxKey) ? TokenKind.IDENTIFIER : key[name.getIndex()];
}
 
Example 19
Source File: Tokens.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new token given a name; if the name corresponds to a token name,
 * a new token of the corresponding kind is returned; otherwise, an
 * identifier token is returned.
 */
TokenKind lookupKind(Name name) {
    return (name.getIndex() > maxKey) ? TokenKind.IDENTIFIER : key[name.getIndex()];
}
 
Example 20
Source File: Tokens.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new token given a name; if the name corresponds to a token name,
 * a new token of the corresponding kind is returned; otherwise, an
 * identifier token is returned.
 */
TokenKind lookupKind(Name name) {
    return (name.getIndex() > maxKey) ? TokenKind.IDENTIFIER : key[name.getIndex()];
}