Skip to content

Commit cc4ffc7

Browse files
committed
update Espree and LICENSE file
1 parent 65f3073 commit cc4ffc7

File tree

11 files changed

+727
-227
lines changed

11 files changed

+727
-227
lines changed

LICENSE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ Copyright (c) Sindre Sorhus <[email protected]>.
116116
The source code for escape-string-regexp is available at:
117117
https://github.com/sindresorhus/escape-string-regexp
118118

119-
## Esprima ##
119+
## Espree ##
120120

121-
Esprima is distributed under the BSD 2-clause license:
121+
Espree is distributed under the BSD 2-clause license:
122122

123123
> Redistribution and use in source and binary forms, with or without
124124
> modification, are permitted provided that the following conditions are met:
@@ -140,10 +140,10 @@ Esprima is distributed under the BSD 2-clause license:
140140
> (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
141141
> THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
142142
143-
Copyright (c) 2011-2013 Ariya Hidayat and other Esprima contributors.
143+
Copyright (c) 2011-2015 by the Espree contributors.
144144

145145
The source code for Esprima is available at:
146-
https://github.com/ariya/esprima
146+
https://github.com/eslint/espree
147147

148148
## events ##
149149

lib/jsdoc/src/astbuilder.js

+31-28
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,35 @@ var acceptsLeadingComments = (function() {
5353

5454
return accepts;
5555
})();
56+
var espreeOpts = {
57+
comment: true,
58+
loc: true,
59+
range: true,
60+
tokens: true,
61+
ecmaFeatures: {
62+
arrowFunctions: true,
63+
binaryLiterals: true,
64+
blockBindings: true,
65+
defaultParams: true,
66+
destructuring: true,
67+
forOf: true,
68+
generators: true,
69+
globalReturn: true,
70+
jsx: false,
71+
objectLiteralComputedProperties: true,
72+
objectLiteralDuplicateProperties: true,
73+
objectLiteralShorthandMethods: true,
74+
objectLiteralShorthandProperties: true,
75+
octalLiterals: true,
76+
regexUFlag: true,
77+
regexYFlag: true,
78+
restParams: true,
79+
spread: true,
80+
superInFunctions: true,
81+
templateStrings: true,
82+
unicodeCodePointEscapes: true
83+
}
84+
};
5685

5786
// TODO: docs
5887
function canAcceptComment(node) {
@@ -119,7 +148,7 @@ function scrubComments(comments) {
119148
// TODO: docs
120149
var AstBuilder = exports.AstBuilder = function() {};
121150

122-
function parse(source, filename, espreeOpts) {
151+
function parse(source, filename) {
123152
var ast;
124153

125154
try {
@@ -134,33 +163,7 @@ function parse(source, filename, espreeOpts) {
134163

135164
// TODO: docs
136165
AstBuilder.prototype.build = function(source, filename) {
137-
var ast;
138-
139-
var espreeOpts = {
140-
comment: true,
141-
loc: true,
142-
range: true,
143-
tokens: true,
144-
ecmaFeatures: {
145-
binaryLiterals: true,
146-
blockBindings: true,
147-
defaultParams: true,
148-
forOf: true,
149-
generators: true,
150-
jsx: false,
151-
objectLiteralComputedProperties: true,
152-
objectLiteralDuplicateProperties: true,
153-
objectLiteralShorthandMethods: true,
154-
objectLiteralShorthandProperties: true,
155-
octalLiterals: true,
156-
regexUFlag: true,
157-
regexYFlag: true,
158-
templateStrings: true,
159-
unicodeCodePointEscapes: true
160-
}
161-
};
162-
163-
ast = parse(source, filename, espreeOpts);
166+
var ast = parse(source, filename);
164167

165168
if (ast) {
166169
this._postProcess(filename, ast);

0 commit comments

Comments
 (0)