Package dk.brics.string.intermediate

Examples of dk.brics.string.intermediate.Nop


   
    /**
     * Creates an empty branch.
     */
    public AssertionBranch(Method method) {
        first = last = new Nop();
        method.addStatement(first);
    }
View Full Code Here


    public Pair<Statement, Statement> finish() {
        if (branches.size() > 0) {
            throw new IllegalStateException("A local branch was not closed. Each startBranch must have a corresponding call to endBranch");
        }
        if (firstStatement == null) {
            addStatement(new Nop());
        }
        Pair<Statement, Statement> pair = new Pair<Statement, Statement>(firstStatement, lastStatement);
        firstStatement = null;
        lastStatement = null;
        return pair;
View Full Code Here

     * See {@link ControlFlowBuilder} for a description of the branching methods.
     */
    public void startBranch() {
        // if no statement has been created, add a Nop as the start of the branch
        if (firstStatement == null) {
            addStatement(new Nop());
        }
        Statement start = lastStatement;
        Statement end = new Nop();
        branchWasUsed = false;
        branches.add(new Branching(start, end));
        method.addStatement(end);
    }
View Full Code Here

TOP

Related Classes of dk.brics.string.intermediate.Nop

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.