mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
finally got the function/object/variable assignment indentation straightened out, I think
This commit is contained in:
@@ -220,7 +220,7 @@ module CoffeeScript
|
||||
name = @variable.compile(indent, scope) if @variable.respond_to?(:compile)
|
||||
last = @variable.respond_to?(:last) ? @variable.last : name
|
||||
opts = opts.merge({:assign => name, :last_assign => last})
|
||||
value = @value.compile(indent + TAB, scope, opts)
|
||||
value = @value.compile(indent, scope, opts)
|
||||
return "#{@variable}: #{value}" if @context == :object
|
||||
return "#{name} = #{value}" if @variable.properties?
|
||||
defined = scope.find(name)
|
||||
@@ -296,7 +296,7 @@ module CoffeeScript
|
||||
end
|
||||
|
||||
def compile(indent, scope, opts={})
|
||||
props = @properties.map {|p| indent + TAB + p.compile(indent, scope) }.join(",\n")
|
||||
props = @properties.map {|p| indent + TAB + p.compile(indent + TAB, scope) }.join(",\n")
|
||||
"{\n#{props}\n#{indent}}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user