Package com.asakusafw.utils.java.internal.parser.javadoc.ir

Examples of com.asakusafw.utils.java.internal.parser.javadoc.ir.JavadocTokenKind


        int eoc = JavadocScannerUtil.countUntilCommentEnd(scanner, true, 0);
        if (eoc >= 0) {
            throw new IllegalEndOfCommentException(scanner.lookahead(0).getLocation(), null);
        }

        JavadocTokenKind kind = scanner.lookahead(0).getKind();
        int index = scanner.getIndex();
        try {
            JavadocBlockInfo info;
            if (kind == JavadocTokenKind.AT) {
                info = fetchStandAloneBlock(scanner, scanner.getTokens());
View Full Code Here


        return blocks;
    }

    private static JavadocBlockInfo fetchStandAloneBlock(JavadocScanner scanner, List<JavadocToken> tokens) {
        JavadocToken first = scanner.lookahead(0);
        JavadocTokenKind kind = first.getKind();
        if (kind == JavadocTokenKind.EOF) {
            return null;
        }
        if (kind != JavadocTokenKind.AT) {
            throw new AssertionError(MessageFormat.format(
View Full Code Here

        offset += JavadocScannerUtil.countWhile(EnumSet.of(JavadocTokenKind.ASTERISK), scanner, offset);

        // 最初の表示可能文字までジャンプ
        offset += JavadocScannerUtil.countUntilNextPrintable(scanner, offset);

        JavadocTokenKind kind = scanner.lookahead(offset).getKind();
        if (kind == JavadocTokenKind.AT || kind == JavadocTokenKind.EOF) {
            // 概要ブロックが空の場合はnull
            scanner.consume(offset);
            return null;
        } else {
View Full Code Here

    public List<IrDocFragment> fetchRestFragments(JavadocScanner scanner) throws JavadocParseException {
        int index = scanner.getIndex();
        try {
            ArrayList<IrDocFragment> fragments = new ArrayList<IrDocFragment>();
            while (true) {
                JavadocTokenKind la = scanner.lookahead(0).getKind();
                if (la == JavadocTokenKind.LINE_BREAK) {
                    int count = JavadocScannerUtil.countUntilNextPrintable(scanner, 0);
                    scanner.consume(count);
                } else if (la == JavadocTokenKind.LEFT_BRACE) {
                    JavadocBlockInfo info = JavadocBlockParserUtil.fetchBlockInfo(scanner);
View Full Code Here

            int start) {

        // カーソルを改行文字へ
        int offset = 0;
        while (true) {
            JavadocTokenKind kind = scanner.lookahead(start + offset).getKind();
            if (kind == JavadocTokenKind.LEFT_BRACE) {
                offset++;
                JavadocTokenKind la = scanner.lookahead(start + offset).getKind();
                if (la == JavadocTokenKind.AT) {
                    offset++;
                    offset += countUntil(S_RIGHT_BRACE, scanner, start + offset);
                }
            } else if (kind == JavadocTokenKind.LINE_BREAK) {
                offset += countUntilNextPrintable(scanner, start + offset);
                JavadocTokenKind la = scanner.lookahead(start + offset).getKind();
                if (la == JavadocTokenKind.AT) {
                    return offset;
                }
            } else if (kind == JavadocTokenKind.EOF) {
                return offset;
View Full Code Here

        }
        int offset = 1;
        boolean sawAster = (token.getKind() == JavadocTokenKind.ASTERISK);
        while (true) {
            JavadocToken la = scanner.lookahead(start + offset);
            JavadocTokenKind kind = la.getKind();
            if (kind == JavadocTokenKind.EOF) {
                return (returnMinusIfMissing ? -1 : offset);
            } else if (sawAster && kind == JavadocTokenKind.SLASH) {
                offset--;
                return offset;
View Full Code Here

            int start,
            boolean breakOnFound) {
        int offset = 0;
        while (true) {
            JavadocToken token = scanner.lookahead(start + offset);
            JavadocTokenKind kind = token.getKind();
            if (
                    kind == JavadocTokenKind.EOF
                    || kinds.contains(kind) == breakOnFound) {
                return offset;
            } else {
View Full Code Here

    public static int countUntilNextPrintable(JavadocScanner scanner, int start) {
        int offset = 0;
        while (true) {
            offset += countWhile(S_WHITE_SPACES, scanner, start + offset);
            JavadocToken token = scanner.lookahead(start + offset);
            JavadocTokenKind kind = token.getKind();
            if (kind == JavadocTokenKind.EOF) {
                return offset;
            } else if (kind != JavadocTokenKind.LINE_BREAK) {
                return offset;
            }
View Full Code Here

        }
        int offset = 0;
        while (true) {
            offset += JavadocScannerUtil.countUntil(S_TEXT_DELIM, scanner,
                offset);
            JavadocTokenKind kind = scanner.lookahead(offset).getKind();
            if (kind == LEFT_BRACE) {
                JavadocToken la = scanner.lookahead(offset + 1);
                if (la.getKind() == JavadocTokenKind.AT) {
                    break;
                }
View Full Code Here

        int blockEnd = JavadocScannerUtil.countUntil(S_INLINE_BLOCK_DELIM,
            scanner,
            offset);

        JavadocToken token = scanner.lookahead(offset + blockEnd);
        JavadocTokenKind kind = token.getKind();

        // 次のブロックの開始を検出すると、このブロックは長さ0になる
        if (kind == LEFT_BRACE) {
            blockEnd = 0;
        }
View Full Code Here

TOP

Related Classes of com.asakusafw.utils.java.internal.parser.javadoc.ir.JavadocTokenKind

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.