mirror of
https://github.com/documentationjs/documentation.git
synced 2026-02-01 14:53:07 +00:00
Fix references to esprima
This commit is contained in:
parent
1f57c55e10
commit
4671799331
@ -76,7 +76,7 @@ module.exports = function () {
|
||||
var path = comment.context.ast;
|
||||
|
||||
/*
|
||||
* Deal with an oddity of esprima: the jsdoc comment is attached to a different
|
||||
* Deal with an oddity of espree: the jsdoc comment is attached to a different
|
||||
* node in the two expressions `a.b = c` vs `a.b = function () {}`.
|
||||
*/
|
||||
if (n.ExpressionStatement.check(path.node) &&
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var doctrine = require('doctrine'),
|
||||
esprima = require('esprima'),
|
||||
espree = require('espree'),
|
||||
through = require('through'),
|
||||
types = require('ast-types'),
|
||||
extend = require('extend');
|
||||
@ -41,7 +41,7 @@ function commentShebang(code) {
|
||||
module.exports = function () {
|
||||
return through(function (data) {
|
||||
var code = commentShebang(data.source),
|
||||
ast = esprima.parse(code, {
|
||||
ast = espree.parse(code, {
|
||||
loc: true,
|
||||
attachComment: true
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user