private void padLine(StringBuilder builder, int lineStartChar, WhitespaceOption option) { if (lineStartChar != -1 && option == WhitespaceOption.PRESERVE) { int numSpaces = stream.getCharno() - lineStartChar; for (int i = 0; i < numSpaces; i++) { builder.append(' '); } } else if (builder.length() > 0) { if (builder.charAt(builder.length() - 1) != '\n' || option == WhitespaceOption.PRESERVE) { builder.append(' '); } } }
private void padLine(StringBuilder builder, int lineStartChar, WhitespaceOption option) { if (lineStartChar != -1 && option == WhitespaceOption.PRESERVE) { int numSpaces = stream.getCharno() - lineStartChar; for (int i = 0; i < numSpaces; i++) { builder.append(' '); } } else if (builder.length() > 0) { if (builder.charAt(builder.length() - 1) != '\n' || option == WhitespaceOption.PRESERVE) { builder.append(' '); } } }
/** * Looks for a type expression at the current token and if found, * returns it. Note that this method consumes input. * * @param token The current token. * @return The type expression found or null if none. */ Node parseAndRecordTypeNode(JsDocToken token) { return parseAndRecordTypeNode(token, stream.getLineno(), stream.getCharno(), token == JsDocToken.LEFT_CURLY, false); }
/** * Looks for a type expression at the current token and if found, * returns it. Note that this method consumes input. * * @param token The current token. * @return The type expression found or null if none. */ Node parseAndRecordTypeNode(JsDocToken token) { return parseAndRecordTypeNode(token, stream.getLineno(), stream.getCharno(), token == JsDocToken.LEFT_CURLY, false); }
private void recordTypeNode(int lineno, int startCharno, Node typeAst, boolean matchingLC) { if (typeAst != null) { int endLineno = stream.getLineno(); int endCharno = stream.getCharno(); jsdocBuilder.markTypeNode( typeAst, lineno, startCharno, endLineno, endCharno, matchingLC); } }
private void recordTypeNode(int lineno, int startCharno, Node typeAst, boolean matchingLC) { if (typeAst != null) { int endLineno = stream.getLineno(); int endCharno = stream.getCharno(); jsdocBuilder.markTypeNode( typeAst, lineno, startCharno, endLineno, endCharno, matchingLC); } }
private Node reportTypeSyntaxWarning(String warning) { addTypeWarning(warning, stream.getLineno(), stream.getCharno()); return null; }
private void addTypeWarning(String messageId) { addTypeWarning(messageId, stream.getLineno(), stream.getCharno()); }
private Node reportTypeSyntaxWarning(String warning) { addTypeWarning(warning, stream.getLineno(), stream.getCharno()); return null; }
private void addTypeWarning(String messageId) { addTypeWarning(messageId, stream.getLineno(), stream.getCharno()); }
private Node newStringNode(String s) { return newStringNode(s, stream.getLineno(), stream.getCharno()); }
private void addParserWarning(String messageId) { addParserWarning(messageId, stream.getLineno(), stream.getCharno()); }
private void addParserWarning(String messageId, String messageArg) { addParserWarning(messageId, messageArg, stream.getLineno(), stream.getCharno()); }
private void addParserWarning(String messageId) { addParserWarning(messageId, stream.getLineno(), stream.getCharno()); }
private Node newStringNode(String s) { return newStringNode(s, stream.getLineno(), stream.getCharno()); }
private void addTypeWarning(String messageId, String messageArg) { addTypeWarning(messageId, messageArg, stream.getLineno(), stream.getCharno()); }
private void addParserWarning(String messageId, String messageArg) { addParserWarning(messageId, messageArg, stream.getLineno(), stream.getCharno()); }
private void addTypeWarning(String messageId, String messageArg) { addTypeWarning(messageId, messageArg, stream.getLineno(), stream.getCharno()); }
private Node newNode(Token type) { return new Node(type, stream.getLineno(), stream.getCharno()).clonePropsFrom(templateNode); }
private Node newNode(int type) { return new Node(type, stream.getLineno(), stream.getCharno()).clonePropsFrom(templateNode); }