Merge branch 'master' of git://github.com/Tesco/coffee-script
This commit is contained in:
commit
e17567866a
2
Cakefile
2
Cakefile
|
@ -1,5 +1,5 @@
|
|||
fs: require 'fs'
|
||||
helpers: require('./lib/helpers').helpers
|
||||
{helpers}: require('./lib/helpers')
|
||||
CoffeeScript: require './lib/coffee-script'
|
||||
{spawn, exec}: require('child_process')
|
||||
|
||||
|
|
2
README
2
README
|
@ -50,7 +50,7 @@
|
|||
Mathieu D'Amours (matehat)
|
||||
Chris Hoffman (cehoffman)
|
||||
Jason Huggins (hugs)
|
||||
Tim Jones (Tesco)
|
||||
Timothy Jones (Tesco)
|
||||
Chris Lloyd (chrislloyd)
|
||||
Matt Lyon (mattly)
|
||||
Jeff Olson (olsonjeffery)
|
||||
|
|
|
@ -129,9 +129,7 @@
|
|||
// the ordinary **Assign** is that these allow numbers and strings as keys.
|
||||
AssignObj: [o("Identifier", function() {
|
||||
return new ValueNode($1);
|
||||
}), o("AlphaNumeric", function() {
|
||||
return new ValueNode($1);
|
||||
}), o("Identifier ASSIGN Expression", function() {
|
||||
}), o("AlphaNumeric"), o("Identifier ASSIGN Expression", function() {
|
||||
return new AssignNode(new ValueNode($1), $3, 'object');
|
||||
}), o("AlphaNumeric ASSIGN Expression", function() {
|
||||
return new AssignNode(new ValueNode($1), $3, 'object');
|
||||
|
|
|
@ -752,6 +752,9 @@
|
|||
join = '';
|
||||
}
|
||||
indent = prop instanceof CommentNode ? '' : this.idt(1);
|
||||
if (!(prop instanceof AssignNode || prop instanceof CommentNode)) {
|
||||
prop = new AssignNode(prop, prop, 'object');
|
||||
}
|
||||
return indent + prop.compile(o) + join;
|
||||
}).call(this));
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ case 46:this.$ = new AssignNode($$[$0-3+1-1], $$[$0-3+3-1]);
|
|||
break;
|
||||
case 47:this.$ = new ValueNode($$[$0-1+1-1]);
|
||||
break;
|
||||
case 48:this.$ = new ValueNode($$[$0-1+1-1]);
|
||||
case 48:this.$ = $$[$0-1+1-1];
|
||||
break;
|
||||
case 49:this.$ = new AssignNode(new ValueNode($$[$0-3+1-1]), $$[$0-3+3-1], 'object');
|
||||
break;
|
||||
|
|
|
@ -148,7 +148,7 @@ grammar: {
|
|||
# the ordinary **Assign** is that these allow numbers and strings as keys.
|
||||
AssignObj: [
|
||||
o "Identifier", -> new ValueNode $1
|
||||
o "AlphaNumeric", -> new ValueNode $1
|
||||
o "AlphaNumeric"
|
||||
o "Identifier ASSIGN Expression", -> new AssignNode new ValueNode($1), $3, 'object'
|
||||
o "AlphaNumeric ASSIGN Expression", -> new AssignNode new ValueNode($1), $3, 'object'
|
||||
o "Comment"
|
||||
|
|
|
@ -542,6 +542,7 @@ exports.ObjectNode: class ObjectNode extends BaseNode
|
|||
join: "\n" if (prop is last_noncom) or (prop instanceof CommentNode)
|
||||
join: '' if i is @properties.length - 1
|
||||
indent: if prop instanceof CommentNode then '' else @idt 1
|
||||
prop: new AssignNode prop, prop, 'object' unless prop instanceof AssignNode or prop instanceof CommentNode
|
||||
indent + prop.compile(o) + join
|
||||
props: props.join('')
|
||||
inner: if props then '\n' + props + '\n' + @idt() else ''
|
||||
|
|
Loading…
Reference in New Issue