Permalink
Browse files

switch comments to use a semi-colon

  • Loading branch information...
smtlaissezfaire committed Feb 9, 2013
1 parent 00a43df commit c3250c870f59cc0b35b88f6206d1e88d02685e75
View
@@ -1,7 +1,7 @@
%lex
%%
-"//".* return "COMMENT";
+";".* return "COMMENT";
\"(\\.|[^\\"])*\" return "STRING";
\'(\\.|[^\\'])*\' return "STRING";
\s+ /* skip whitespace */
@@ -868,7 +868,7 @@ syntaxTreeToString = function(statement, formatter, options) {
formatter.append(statement.contents);
break;
case 'comment':
- formatter.append("// " + statement.contents.trim());
+ formatter.append("; " + statement.contents.trim());
break;
default:
throw new Error('unknown statement type: ' + statement.type);
@@ -363,7 +363,7 @@ vows.describe("integration spec").addBatch({
},
'it should allow comments through when compiling': function() {
- var source = '// foo bar /foo/ (bar baz quxx 17)';
+ var source = '; foo bar /foo/ (bar baz quxx 17)';
var expected = '// foo bar /foo/ (bar baz quxx 17)\n';
assert.equal(loop.compile(source), expected);
@@ -429,7 +429,7 @@ vows.describe("js to loop converter integration spec").addBatch({
'it should allow comments through': function() {
var source = '// foo bar';
- var expected = '// foo bar';
+ var expected = '; foo bar';
assert.equal(loop.reverseCompile(source, noIndentOptions), expected);
},

0 comments on commit c3250c8

Please sign in to comment.