adding a block test and using PARAM_SPLAT to remove the last shift/reduce conflict

This commit is contained in:
Jeremy Ashkenas
2010-01-03 10:46:37 -05:00
parent 21a0cc83ae
commit ba3c5298f7
3 changed files with 9 additions and 7 deletions

View File

@@ -219,7 +219,8 @@ module CoffeeScript
i -= 1
tok = @tokens[i]
return if !tok
next if ['*', ','].include?(tok[0])
next if tok[0] == ','
next tok[0] = :PARAM_SPLAT if tok[0] == '*'
return if tok[0] != :IDENTIFIER
tok[0] = :PARAM
end