public CsLanguage(Properties properties) { super("C#", "cs", new CsTokenizer(), ".cs"); setProperties(properties); }
@Override public final void setProperties(Properties properties) { CsTokenizer tokenizer = (CsTokenizer) getTokenizer(); tokenizer.setProperties(properties); } }
private int getTokenFromLine(StringBuilder token, int loc) { for (int j = loc; j < this.currentLine.length(); j++) { char tok = this.currentLine.charAt(j); if (!Character.isWhitespace(tok) && !ignoreCharacter(tok)) { if (isString(tok)) { if (token.length() > 0) { return j; // we need to now parse the string as a seperate token. } else { // we are at the start of a string return parseString(token, j, tok); } } else { token.append(tok); } } else { if (token.length() > 0) { return j; } } loc = j; } return loc + 1; }
while (loc < currentLine.length()) { StringBuilder token = new StringBuilder(); loc = getTokenFromLine(token, loc); } else if (!namespaceRead && "using".equals(token.toString())) { importLine = true; } else if (token.length() > 0 && !isIgnorableString(token.toString())) { if ("namespace".equals(token.toString())) { namespaceRead = true;
loc = this.parseString(token, loc, stringDelimiter);
@Override public final void setProperties(Properties properties) { CsTokenizer tokenizer = (CsTokenizer) getTokenizer(); tokenizer.setProperties(properties); } }
public CsLanguage(Properties properties) { super("C#", "cs", new CsTokenizer(), ".cs"); setProperties(properties); }