@Override public boolean contains(int ch) { return Character.isUnicodeIdentifierStart(ch); } };
if (!Character.isUnicodeIdentifierStart(lastChar)) { return i;
private AutocompleteResult autocomplete(String code, int caretPosition, Var clojureLoadString, String shellId) { int i = caretPosition; while (i > 0) { char c = code.charAt(i - 1); if (!Character.isUnicodeIdentifierStart(c) || "[]{}()/\\".indexOf(c) >= 0) { break; } else { i--; } } String _code = code.substring(i, caretPosition); String apropos = "(repl_%1$s/apropos \"%2$s\")"; Object o = clojureLoadString.invoke(String.format(apropos, shellId, _code)); List<String> result = new ArrayList<String>(); for (Object s : ((Collection) o)) { String whole = s.toString(); int d = whole.indexOf('/'); if (d > 0) { String woNS = whole.substring(d + 1); String ns = whole.substring(0, d); result.add(woNS); String currenClojureNS = String.format("%1$s_%2$s", beaker_clojure_ns, shellId); if (!currenClojureNS.equals(ns) && !"clojure.core".equals(ns)) result.add(whole); } else { result.add(whole); } } return new AutocompleteResult(result, i); }
public boolean isNameStartChar(int c) { return Character.isUnicodeIdentifierStart(c); } }
if (!Character.isUnicodeIdentifierStart(lastChar)) { return i;
if (!Character.isUnicodeIdentifierStart(text.charAt(lower))) { final Number number = parser.parseNumber(text, position); if (number == null) {
boolean isIdentifierStartChar(char c) { return c == '_' || Character.isUnicodeIdentifierStart( c ); } }
private static boolean isValidIdentifierStart(char start) { return Character.isUnicodeIdentifierStart(start) || start == '$' || start == '_'; }
boolean isIdentifierStartChar(char c) { return c == '_' || Character.isUnicodeIdentifierStart( c ); } }
boolean isIdentifierStartChar(char c) { return c == '_' || Character.isUnicodeIdentifierStart( c ); } }
/** * Checks if character at specified position can be identifier start. * @param position * @return true is may be identifier start, false otherwise. */ private boolean isIdentifierStartChar(int position) { if (_len >= 0 && position >= _len) { return false; } char ch = _working[position]; return Character.isUnicodeIdentifierStart(ch); }
private boolean isFirstIdChar(int ch) { return Character.isUnicodeIdentifierStart(ch); // return isAlpha(ch) || ch=='_' || Character.isLetter(ch); }
boolean isSatisfiedBy(int ch) { return Character.isUnicodeIdentifierStart(ch); } });
static boolean isAllowedWord(final char character) { return Character.isUnicodeIdentifierStart(character); }
/** * Checks if character at specified position can be identifier start. * * @param position * @return true is may be identifier start, false otherwise. */ private boolean isIdentifierStartChar(int position) { if (_len >= 0 && position >= _len) { return false; } char ch = _working[position]; return Character.isUnicodeIdentifierStart(ch) || (':' == ch); }
/** * Checks if character at current runtime position can be identifier part. * * @return true is may be identifier part, false otherwise. */ private boolean isIdentifierChar() { if (_len >= 0 && _pos >= _len) { return false; } char ch = _working[_pos]; return Character.isUnicodeIdentifierStart(ch) || Character.isDigit(ch) || (':' == ch) || ('.' == ch) || ('-' == ch); }
/** * Checks if character at current runtime position can be identifier part. * * @return true is may be identifier part, false otherwise. */ private boolean isIdentifierChar() { if (_len >= 0 && _pos >= _len) { return false; } char ch = _working[_pos]; return Character.isUnicodeIdentifierStart(ch) || Character.isDigit(ch) || Utils.isIdentifierHelperChar(ch); }
/** * Checks if character at current runtime position can be identifier part. * @return true is may be identifier part, false otherwise. */ private boolean isIdentifierChar() { if (_len >= 0 && _pos >= _len) { return false; } char ch = _working[_pos]; return Character.isUnicodeIdentifierStart(ch) || Character.isDigit(ch) || Utils.isIdentifierHelperChar(ch); }
private boolean NameStartChar_sempred(RuleContext _localctx, int predIndex) { switch (predIndex) { case 1: return Character.isUnicodeIdentifierStart(_input.LA(-1)); } return true; }
/** * Returns {@code true} if the given codepoint is an unicode identifier start or part. */ private static boolean isUnicodeIdentifier(final int codepoint, final boolean part) { return part ? Character.isUnicodeIdentifierPart (codepoint) : Character.isUnicodeIdentifierStart(codepoint); }