private void defaultErrorRecovery() {
        while (hasNext()) {
            if (getCurrentTokenColumn() == 1) {
                IdlToken token = getCurrentToken();
                if (token == IdlToken.DOLLAR || token == IdlToken.IDENTIFIER
                        || token == IdlToken.AT
                        || token == IdlToken.RBRACE) {
                    return;
                }
            }
            next();
        }
    }
Captures tokens to a stack of token trees.
smithy-syntax/src/main/java/software/amazon/smithy/syntax/CapturingTokenizer.java