Refactor
This commit is contained in:
parent
6e4fec9218
commit
a55f942895
1 changed files with 1 additions and 16 deletions
|
@ -59,22 +59,7 @@ module.exports = (function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchListDefinitions() {
|
function matchListDefinitions() {
|
||||||
var definitions = [],
|
return matchListing(matchDefinition);
|
||||||
currentDefinition = matchDefinition();
|
|
||||||
|
|
||||||
if (currentDefinition) {
|
|
||||||
definitions.push(currentDefinition);
|
|
||||||
while (scan(tokens.comma)) {
|
|
||||||
currentDefinition = matchDefinition();
|
|
||||||
if (currentDefinition) {
|
|
||||||
definitions.push(currentDefinition);
|
|
||||||
} else {
|
|
||||||
error('One extra comma');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return definitions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchDefinition() {
|
function matchDefinition() {
|
||||||
|
|
Loading…
Reference in a new issue