Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jashkenas/coffeescript into 2
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth committed Dec 27, 2016
2 parents f0e884d + 0a6aeef commit 5cf8256
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions lib/coffee-script/nodes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/nodes.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,8 @@ exports.Op = class Op extends Base

compileFloorDivision: (o) ->
floor = new Value new IdentifierLiteral('Math'), [new Access new PropertyName 'floor']
div = new Op '/', @first, @second
second = if @second.isComplex() then new Parens @second else @second
div = new Op '/', @first, second
new Call(floor, [div]).compileToFragments o

compileModulo: (o) ->
Expand Down
2 changes: 1 addition & 1 deletion test/error_messages.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ test "#3795: invalid escapes", ->
assertErrorFormat '''
///a \\u002 0 space///
''', '''
[stdin]:1:6: error: invalid escape sequence \\u002
[stdin]:1:6: error: invalid escape sequence \\u002 \n\
///a \\u002 0 space///
^\^^^^^
'''
Expand Down
2 changes: 1 addition & 1 deletion test/operators.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ test "floor division operator", ->

test "floor division operator compound assignment", ->
a = 7
a //= 2
a //= 1 + 1
eq 3, a

test "modulo operator", ->
Expand Down

0 comments on commit 5cf8256

Please sign in to comment.