mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
parse export extensions
This commit is contained in:
parent
47005e9646
commit
cc63e98a8e
@ -13,6 +13,7 @@ var parserOptions = exports.parserOptions = {
|
||||
'decorators2',
|
||||
'doExpressions',
|
||||
'estree',
|
||||
'exportExtensions',
|
||||
'jsx',
|
||||
'objectRestSpread'
|
||||
]
|
||||
|
||||
@ -31,7 +31,9 @@ exports.Syntax = {
|
||||
ExperimentalSpreadProperty: 'ExperimentalSpreadProperty',
|
||||
ExportAllDeclaration: 'ExportAllDeclaration',
|
||||
ExportDefaultDeclaration: 'ExportDefaultDeclaration',
|
||||
ExportDefaultSpecifier: 'ExportDefaultSpecifier',
|
||||
ExportNamedDeclaration: 'ExportNamedDeclaration',
|
||||
ExportNamespaceSpecifier: 'ExportNamespaceSpecifier',
|
||||
ExportSpecifier: 'ExportSpecifier',
|
||||
ExpressionStatement: 'ExpressionStatement',
|
||||
File: 'File',
|
||||
|
||||
@ -213,6 +213,10 @@ walkers[Syntax.ExportDefaultDeclaration] = function(node, parent, state, cb) {
|
||||
}
|
||||
};
|
||||
|
||||
walkers[Syntax.ExportDefaultSpecifier] = function(node, parent, state, cb) {
|
||||
cb(node.exported, node, state);
|
||||
};
|
||||
|
||||
walkers[Syntax.ExportNamedDeclaration] = function(node, parent, state, cb) {
|
||||
var i;
|
||||
var l;
|
||||
@ -230,6 +234,10 @@ walkers[Syntax.ExportNamedDeclaration] = function(node, parent, state, cb) {
|
||||
}
|
||||
};
|
||||
|
||||
walkers[Syntax.ExportNamespaceSpecifier] = function(node, parent, state, cb) {
|
||||
cb(node.exported, node, state);
|
||||
};
|
||||
|
||||
walkers[Syntax.ExportSpecifier] = function(node, parent, state, cb) {
|
||||
if (node.exported) {
|
||||
cb(node.exported, node, state);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user