Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #365 #432

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix problem with with default function parameters
Pavel Lučivňák committed Dec 21, 2020
commit 0ff6beb27bdbdafe641664e4e4b7eb67d95920d3
544 changes: 307 additions & 237 deletions escodegen.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/comment.js
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
'use strict';

var fs = require('fs'),
esprima = require('./3rdparty/esprima-harmony.original'),
esprima = require('esprima'),
escodegen = require('./loader'),
chai = require('chai'),
expect = chai.expect;
12 changes: 12 additions & 0 deletions test/comment/array-elements.expected.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var test = [
/**
* Test 2
*/
a,
/*
* Test 1
*/
2,
// Test 3
3 + 3
];
12 changes: 12 additions & 0 deletions test/comment/array-elements.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var test = [
/**
* Test 2
*/
a,
/*
* Test 1
*/
2,
// Test 3
3+3
];
Original file line number Diff line number Diff line change
@@ -59,15 +59,3 @@ let arrowFn = () => (
b: 2
}
);
var test = [
/**
* Test 2
*/
a,
/*
* Test 1
*/
2,
// Test 3
3 + 3
];
13 changes: 0 additions & 13 deletions test/comment/comment-as-first-element-in-parenthesis-expression.js
Original file line number Diff line number Diff line change
@@ -72,16 +72,3 @@ let arrowFn = () => (
a: 1, b: 2
}
);

var test = [
/**
* Test 2
*/
a,
/*
* Test 1
*/
2,
// Test 3
3+3
];
15 changes: 15 additions & 0 deletions test/comment/method-description.expected.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class MyClass {
/**
* description
*/
foo(a, b) {
a.bar(b);
}
}
class MyClass2 {
// description
foo(a, b, c, // NOTE: ...
d = false) {
return 42;
}
}
17 changes: 17 additions & 0 deletions test/comment/method-description.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class MyClass {
/**
* description
*/
foo(a, b) {
a.bar(b);
}
}

class MyClass2 {
// description
foo(a, b, c,
// NOTE: ...
d = false) {
return 42;
}
}
6 changes: 4 additions & 2 deletions test/comment/try-block-line-comment.expected.js
Original file line number Diff line number Diff line change
@@ -4,11 +4,13 @@ finally {
}
try {
} catch (e) {
} finally {
} //
finally {
}
{
try {
} catch (e) {
} finally {
} //
finally {
}
}