mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
removing the nearly-unused notion of 'operation sensitive'
This commit is contained in:
parent
55cac23976
commit
7b0a235c71
2 changed files with 2 additions and 12 deletions
|
@ -58,7 +58,7 @@
|
|||
var closure, top;
|
||||
this.options = merge(o || {});
|
||||
this.tab = o.indent;
|
||||
if (!(this.operation_sensitive())) {
|
||||
if (!(this instanceof ValueNode)) {
|
||||
del(this.options, 'operation');
|
||||
}
|
||||
top = this.top_sensitive() ? this.options.top : del(this.options, 'top');
|
||||
|
@ -155,9 +155,6 @@
|
|||
BaseNode.prototype.top_sensitive = function top_sensitive() {
|
||||
return false;
|
||||
};
|
||||
BaseNode.prototype.operation_sensitive = function operation_sensitive() {
|
||||
return false;
|
||||
};
|
||||
return BaseNode;
|
||||
}).call(this);
|
||||
//### Expressions
|
||||
|
@ -340,9 +337,6 @@
|
|||
this.children.push(prop);
|
||||
return this;
|
||||
};
|
||||
ValueNode.prototype.operation_sensitive = function operation_sensitive() {
|
||||
return true;
|
||||
};
|
||||
ValueNode.prototype.has_properties = function has_properties() {
|
||||
return !!this.properties.length;
|
||||
};
|
||||
|
|
|
@ -45,7 +45,7 @@ exports.BaseNode: class BaseNode
|
|||
compile: (o) ->
|
||||
@options: merge o or {}
|
||||
@tab: o.indent
|
||||
del @options, 'operation' unless @operation_sensitive()
|
||||
del @options, 'operation' unless this instanceof ValueNode
|
||||
top: if @top_sensitive() then @options.top else del @options, 'top'
|
||||
closure: @is_statement() and not @is_pure_statement() and not top and
|
||||
not @options.returns and not (this instanceof CommentNode) and
|
||||
|
@ -103,7 +103,6 @@ exports.BaseNode: class BaseNode
|
|||
is_statement: -> false
|
||||
is_pure_statement: -> false
|
||||
top_sensitive: -> false
|
||||
operation_sensitive: -> false
|
||||
|
||||
#### Expressions
|
||||
|
||||
|
@ -247,9 +246,6 @@ exports.ValueNode: class ValueNode extends BaseNode
|
|||
@children.push(prop)
|
||||
this
|
||||
|
||||
operation_sensitive: ->
|
||||
true
|
||||
|
||||
has_properties: ->
|
||||
!!@properties.length
|
||||
|
||||
|
|
Loading…
Reference in a new issue