finally got the function/object/variable assignment indentation straightened out, I think

This commit is contained in:
Jeremy Ashkenas
2009-12-17 23:45:24 -05:00
parent 67bb49ed04
commit a50446a0ca
2 changed files with 3 additions and 3 deletions

View File

@@ -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