components/code/src/command.rules.js
// Push a new rule onto the state.
Push a new rule onto the state.
Push a new rule onto the state .
function pushRule(rules, state, ruleKind) {
		if (!rules[ruleKind]) {
			throw new TypeError('Unknown rule: ' + ruleKind);
		}
		state.prevState = _extends({}, state);
		state.kind = ruleKind;
		state.name = null;
		state.type = null;
		state.rule = rules[ruleKind];
		state.step = 0;
		state.needsSeperator = false;
	}
function pushRule ( rules , state , ruleKind ) { if ( ! rules [ ruleKind ] ) { throw new TypeError ( 'Unknown rule: ' + ruleKind ) ; } state . prevState = _extends ( { } , state ) ; state . kind = ruleKind ; state . name = null ; state . type = null ; state . rule = rules [ ruleKind ] ; state . step = 0 ; state . needsSeperator = false ; }
Push a new rule onto the state.
Push a new rule onto the state .