Skip to content

Commit

Permalink
removed trailing whitespace in source files
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Jun 2, 2011
1 parent 22bc54f commit a0efdac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/browser.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ CoffeeScript.load = (url, callback) ->
xhr.onreadystatechange = ->
if xhr.readyState is 4
if xhr.status in [0, 200]
CoffeeScript.run xhr.responseText
CoffeeScript.run xhr.responseText
else
throw new Error "Could not load #{url}"
callback() if callback
callback() if callback
xhr.send null

# Activate CoffeeScript in the browser by having it compile and evaluate
Expand Down
2 changes: 1 addition & 1 deletion src/grammar.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ grammar =
o 'INDEX_SOAK Index', -> extend $2, soak : yes
o 'INDEX_PROTO Index', -> extend $2, proto: yes
]

IndexValue: [
o 'Expression', -> new Index $1
o 'Slice', -> new Slice $1
Expand Down
4 changes: 2 additions & 2 deletions src/lexer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ exports.Lexer = class Lexer
regexToken: ->
return 0 if @chunk.charAt(0) isnt '/'
if match = HEREGEX.exec @chunk
length = @heregexToken match
length = @heregexToken match
@line += count match[0], '\n'
return length

Expand Down Expand Up @@ -527,7 +527,7 @@ COFFEE_ALIAS_MAP =
no : 'false'
on : 'true'
off : 'false'

COFFEE_ALIASES = (key for key of COFFEE_ALIAS_MAP)
COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat COFFEE_ALIASES

Expand Down
10 changes: 5 additions & 5 deletions src/nodes.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ exports.Block = class Block extends Base
declars = o.scope.hasDeclarations()
assigns = scope.hasAssignments
if (declars or assigns) and i
code += '\n'
code += '\n'
if declars
code += "#{@tab}var #{ scope.declaredVariables().join(', ') };\n"
if assigns
Expand Down Expand Up @@ -1076,7 +1076,7 @@ exports.Code = class Code extends Base
vars = []
exprs = []
for param in @params when param.splat
o.scope.add p.name.value, 'var', yes for p in @params when p.name.value
o.scope.add p.name.value, 'var', yes for p in @params when p.name.value
splats = new Assign new Value(new Arr(p.asReference o for p in @params)),
new Value new Literal 'arguments'
break
Expand Down Expand Up @@ -1265,7 +1265,7 @@ exports.Op = class Op extends Base

isUnary: ->
not @second

isComplex: ->
not (@isUnary() and (@operator in ['+', '-'])) or @first.isComplex()

Expand Down Expand Up @@ -1678,10 +1678,10 @@ exports.If = class If extends Base
compileStatement: (o) ->
child = del o, 'chainChild'
exeq = del o, 'isExistentialEquals'

if exeq
return new If(@condition.invert(), @elseBodyNode(), type: 'if').compile o

cond = @condition.compile o, LEVEL_PAREN
o.indent += TAB
body = @ensureBlock(@body).compile o
Expand Down

0 comments on commit a0efdac

Please sign in to comment.