components/code/src/command.rules.js
// Unwind the state after an unsuccessful match.
Unwind the state after an unsuccessful match.
Unwind the state after an unsuccessful match .
function unsuccessful(state) {
		while (state.rule && !(Array.isArray(state.rule) && state.rule[state.step].ofRule)) {
			popRule(state);
		}
		if (state.rule) {
			advanceRule(state, false);
		}
	}
function unsuccessful ( state ) { while ( state . rule && ! ( Array . isArray ( state . rule ) && state . rule [ state . step ] . ofRule ) ) { popRule ( state ) ; } if ( state . rule ) { advanceRule ( state , false ) ; } }
Unwind the state after an unsuccessful match.
Unwind the state after an unsuccessful match .
// Fall back to the parent rule until you get to an optional or list rule or // until the entire stack of rules is empty. // If there is still a rule, it must be an optional or list rule. // Consider this rule a success so that we may move past it.