Java 类org.yaml.snakeyaml.tokens.BlockSequenceStartToken 实例源码

项目:AndroidApktool    文件:ScannerImpl.java   
/**
 * Fetch an entry in the block style.
 * 
 * @see <a href="http://www.yaml.org/spec/1.1/#id863975"></a>
 */
private void fetchBlockEntry() {
    // Block context needs additional checks.
    if (this.flowLevel == 0) {
        // Are we allowed to start a new entry?
        if (!this.allowSimpleKey) {
            throw new ScannerException(null, null, "sequence entries are not allowed here",
                    reader.getMark());
        }

        // We may need to add BLOCK-SEQUENCE-START.
        if (addIndent(this.reader.getColumn())) {
            Mark mark = reader.getMark();
            this.tokens.add(new BlockSequenceStartToken(mark, mark));
        }
    } else {
        // It's an error for the block entry to occur in the flow
        // context,but we let the parser detect this.
    }
    // Simple keys are allowed after '-'.
    this.allowSimpleKey = true;

    // Reset possible simple key on the current level.
    removePossibleSimpleKey();

    // Add BLOCK-ENTRY.
    Mark startMark = reader.getMark();
    reader.forward();
    Mark endMark = reader.getMark();
    Token token = new BlockEntryToken(startMark, endMark);
    this.tokens.add(token);
}
项目:5zig-TIMV-Plugin    文件:ScannerImpl.java   
/**
 * Fetch an entry in the block style.
 * 
 * @see <a href="http://www.yaml.org/spec/1.1/#id863975"></a>
 */
private void fetchBlockEntry() {
    // Block context needs additional checks.
    if (this.flowLevel == 0) {
        // Are we allowed to start a new entry?
        if (!this.allowSimpleKey) {
            throw new ScannerException(null, null, "sequence entries are not allowed here",
                    reader.getMark());
        }

        // We may need to add BLOCK-SEQUENCE-START.
        if (addIndent(this.reader.getColumn())) {
            Mark mark = reader.getMark();
            this.tokens.add(new BlockSequenceStartToken(mark, mark));
        }
    } else {
        // It's an error for the block entry to occur in the flow
        // context,but we let the parser detect this.
    }
    // Simple keys are allowed after '-'.
    this.allowSimpleKey = true;

    // Reset possible simple key on the current level.
    removePossibleSimpleKey();

    // Add BLOCK-ENTRY.
    Mark startMark = reader.getMark();
    reader.forward();
    Mark endMark = reader.getMark();
    Token token = new BlockEntryToken(startMark, endMark);
    this.tokens.add(token);
}
项目:snake-yaml    文件:ScannerImpl.java   
/**
 * Fetch an entry in the block style.
 * 
 * @see <a href="http://www.yaml.org/spec/1.1/#id863975"></a>
 */
private void fetchBlockEntry() {
    // Block context needs additional checks.
    if (this.flowLevel == 0) {
        // Are we allowed to start a new entry?
        if (!this.allowSimpleKey) {
            throw new ScannerException(null, null, "sequence entries are not allowed here",
                    reader.getMark());
        }

        // We may need to add BLOCK-SEQUENCE-START.
        if (addIndent(this.reader.getColumn())) {
            Mark mark = reader.getMark();
            this.tokens.add(new BlockSequenceStartToken(mark, mark));
        }
    } else {
        // It's an error for the block entry to occur in the flow
        // context,but we let the parser detect this.
    }
    // Simple keys are allowed after '-'.
    this.allowSimpleKey = true;

    // Reset possible simple key on the current level.
    removePossibleSimpleKey();

    // Add BLOCK-ENTRY.
    Mark startMark = reader.getMark();
    reader.forward();
    Mark endMark = reader.getMark();
    Token token = new BlockEntryToken(startMark, endMark);
    this.tokens.add(token);
}
项目:SubServers-2    文件:ScannerImpl.java   
/**
 * Fetch an entry in the block style.
 * 
 * @see <a href="http://www.yaml.org/spec/1.1/#id863975"></a>
 */
private void fetchBlockEntry() {
    // Block context needs additional checks.
    if (this.flowLevel == 0) {
        // Are we allowed to start a new entry?
        if (!this.allowSimpleKey) {
            throw new ScannerException(null, null, "sequence entries are not allowed here",
                    reader.getMark());
        }

        // We may need to add BLOCK-SEQUENCE-START.
        if (addIndent(this.reader.getColumn())) {
            Mark mark = reader.getMark();
            this.tokens.add(new BlockSequenceStartToken(mark, mark));
        }
    } else {
        // It's an error for the block entry to occur in the flow
        // context,but we let the parser detect this.
    }
    // Simple keys are allowed after '-'.
    this.allowSimpleKey = true;

    // Reset possible simple key on the current level.
    removePossibleSimpleKey();

    // Add BLOCK-ENTRY.
    Mark startMark = reader.getMark();
    reader.forward();
    Mark endMark = reader.getMark();
    Token token = new BlockEntryToken(startMark, endMark);
    this.tokens.add(token);
}
项目:snakeyaml    文件:ScannerImpl.java   
/**
 * Fetch an entry in the block style.
 * 
 * @see http://www.yaml.org/spec/1.1/#id863975
 */
private void fetchBlockEntry() {
    // Block context needs additional checks.
    if (this.flowLevel == 0) {
        // Are we allowed to start a new entry?
        if (!this.allowSimpleKey) {
            throw new ScannerException(null, null, "sequence entries are not allowed here",
                    reader.getMark());
        }

        // We may need to add BLOCK-SEQUENCE-START.
        if (addIndent(this.reader.getColumn())) {
            Mark mark = reader.getMark();
            this.tokens.add(new BlockSequenceStartToken(mark, mark));
        }
    } else {
        // It's an error for the block entry to occur in the flow
        // context,but we let the parser detect this.
    }
    // Simple keys are allowed after '-'.
    this.allowSimpleKey = true;

    // Reset possible simple key on the current level.
    removePossibleSimpleKey();

    // Add BLOCK-ENTRY.
    Mark startMark = reader.getMark();
    reader.forward();
    Mark endMark = reader.getMark();
    Token token = new BlockEntryToken(startMark, endMark);
    this.tokens.add(token);
}
项目:TestTheTeacher    文件:ScannerImpl.java   
/**
 * Fetch an entry in the block style.
 * 
 * @see http://www.yaml.org/spec/1.1/#id863975
 */
private void fetchBlockEntry() {
    // Block context needs additional checks.
    if (this.flowLevel == 0) {
        // Are we allowed to start a new entry?
        if (!this.allowSimpleKey) {
            throw new ScannerException(null, null, "sequence entries are not allowed here",
                    reader.getMark());
        }

        // We may need to add BLOCK-SEQUENCE-START.
        if (addIndent(this.reader.getColumn())) {
            Mark mark = reader.getMark();
            this.tokens.add(new BlockSequenceStartToken(mark, mark));
        }
    } else {
        // It's an error for the block entry to occur in the flow
        // context,but we let the parser detect this.
    }
    // Simple keys are allowed after '-'.
    this.allowSimpleKey = true;

    // Reset possible simple key on the current level.
    removePossibleSimpleKey();

    // Add BLOCK-ENTRY.
    Mark startMark = reader.getMark();
    reader.forward();
    Mark endMark = reader.getMark();
    Token token = new BlockEntryToken(startMark, endMark);
    this.tokens.add(token);
}
项目:org.openntf.domino    文件:ScannerImpl.java   
/**
 * Fetch an entry in the block style.
 * 
 * @see http://www.yaml.org/spec/1.1/#id863975
 */
private void fetchBlockEntry() {
    // Block context needs additional checks.
    if (this.flowLevel == 0) {
        // Are we allowed to start a new entry?
        if (!this.allowSimpleKey) {
            throw new ScannerException(null, null, "sequence entries are not allowed here", reader.getMark());
        }

        // We may need to add BLOCK-SEQUENCE-START.
        if (addIndent(this.reader.getColumn())) {
            Mark mark = reader.getMark();
            this.tokens.add(new BlockSequenceStartToken(mark, mark));
        }
    } else {
        // It's an error for the block entry to occur in the flow
        // context,but we let the parser detect this.
    }
    // Simple keys are allowed after '-'.
    this.allowSimpleKey = true;

    // Reset possible simple key on the current level.
    removePossibleSimpleKey();

    // Add BLOCK-ENTRY.
    Mark startMark = reader.getMark();
    reader.forward();
    Mark endMark = reader.getMark();
    Token token = new BlockEntryToken(startMark, endMark);
    this.tokens.add(token);
}