diff --git a/gradient-parser.js b/gradient-parser.js index 50fdac1..897ace6 100644 --- a/gradient-parser.js +++ b/gradient-parser.js @@ -59,22 +59,7 @@ module.exports = (function() { } function matchListDefinitions() { - var definitions = [], - 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; + return matchListing(matchDefinition); } function matchDefinition() {