Skip to content

Commit

Permalink
Implement attribute spread syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed Jan 8, 2016
1 parent 8d115be commit 21d856e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,8 @@ Lexer.prototype = {
if (!whitespaceRe.test(str[x])) {
// if it is a JavaScript punctuator, then assume that it is
// a part of the value
return !characterParser.isPunctuator(str[x]) || quoteRe.test(str[x]);
// also make exception for spread syntax
return /^\.\.\./.test(str.slice(x)) || !characterParser.isPunctuator(str[x]) || quoteRe.test(str[x]);
}
}
}
Expand Down

0 comments on commit 21d856e

Please sign in to comment.