private static boolean isIdentifier(String s) { if (s == null || s.length() <= 0 || !isIdentStart(s.charAt(0))) return false; for (int i = 1; i < s.length(); i++) { if (!isIdentChar(s.charAt(i))) return false; } return true; }
private static boolean isIdentifier(String s) { if (s.isEmpty() || !isIdentStart(s.charAt(0))) return false; for (int i = 1; i < s.length(); i++) { if (!isIdentChar(s.charAt(i))) return false; } return true; }
private static boolean isIdentifier(String s) { if (s == null || s.length() <= 0 || !isIdentStart(s.charAt(0))) return false; for (int i = 1; i < s.length(); i++) { if (!isIdentChar(s.charAt(i))) return false; } return true; }
private static boolean isIdentifier(String s) { if (s.isEmpty() || !isIdentStart(s.charAt(0))) return false; for (int i = 1; i < s.length(); i++) { if (!isIdentChar(s.charAt(i))) return false; } return true; }
private static boolean isSymbolLocal(String s, char c, int length) { if (!isIdentStart(c)) return false; boolean localID = (c >= 'a' && c <= 'z'); int last = 1; for (; last < length; last++) { char d = s.charAt(last); if (!isIdentChar(d)) break; } if (last == length) return true; if (localID && last == length - 1) { char d = s.charAt(last); return d == '!' || d == '?' || d == '='; } return false; }
private static boolean isSymbolLocal(String s, char c, int length) { if (!isIdentStart(c)) return false; boolean localID = (c >= 'a' && c <= 'z'); int last = 1; for (; last < length; last++) { char d = s.charAt(last); if (!isIdentChar(d)) break; } if (last == length) return true; if (localID && last == length - 1) { char d = s.charAt(last); return d == '!' || d == '?' || d == '='; } return false; }
private static boolean isSymbolLocal(String s, char c, int length) { if (!isIdentStart(c)) return false; boolean localID = (c >= 'a' && c <= 'z'); int last = 1; for (; last < length; last++) { char d = s.charAt(last); if (!isIdentChar(d)) break; } if (last == length) return true; if (localID && last == length - 1) { char d = s.charAt(last); return d == '!' || d == '?' || d == '='; } return false; }
private static boolean isSymbolLocal(String s, char c, int length) { if (!isIdentStart(c)) return false; boolean localID = (c >= 'a' && c <= 'z'); int last = 1; for (; last < length; last++) { char d = s.charAt(last); if (!isIdentChar(d)) break; } if (last == length) return true; if (localID && last == length - 1) { char d = s.charAt(last); return d == '!' || d == '?' || d == '='; } return false; }