mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
ok optimistic parsing going
This commit is contained in:
parent
8a1986a923
commit
f8b9c8b583
9 changed files with 1509 additions and 1317 deletions
|
@ -60,3 +60,23 @@ var regexMap = {
|
|||
exports.instantCommands = instantCommands;
|
||||
exports.parse = util.genParseCommand(regexMap, 'processSandboxCommand');
|
||||
|
||||
// optimistically parse some level and level builder commands; we do this
|
||||
// so you can enter things like "level intro1; show goal" and not
|
||||
// have it barf. when the
|
||||
// command fires the event, it will check if there is a listener and if not throw
|
||||
// an error
|
||||
|
||||
// note: these are getters / setters because the require kills us
|
||||
exports.getOptimisticLevelParse = function() {
|
||||
return util.genParseCommand(
|
||||
require('../level').regexMap,
|
||||
'processLevelCommand'
|
||||
);
|
||||
};
|
||||
|
||||
exports.getOptimisticLevelBuilderParse = function() {
|
||||
return util.genParseCommand(
|
||||
require('../level/builder').regexMap,
|
||||
'processLevelBuilderCommand'
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue