mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
support bigint
This commit is contained in:
parent
b3952f6fed
commit
8f5c60befd
@ -9,6 +9,7 @@ var parserOptions = exports.parserOptions = {
|
|||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
plugins: [
|
plugins: [
|
||||||
'asyncGenerators',
|
'asyncGenerators',
|
||||||
|
'bigInt',
|
||||||
'classPrivateProperties',
|
'classPrivateProperties',
|
||||||
'classProperties',
|
'classProperties',
|
||||||
'decorators2',
|
'decorators2',
|
||||||
|
|||||||
@ -136,6 +136,10 @@ var nodeToValue = exports.nodeToValue = function(node) {
|
|||||||
str = nodeToValue(node.left);
|
str = nodeToValue(node.left);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Syntax.BigIntLiteral:
|
||||||
|
str = node.value;
|
||||||
|
break;
|
||||||
|
|
||||||
case Syntax.ClassDeclaration:
|
case Syntax.ClassDeclaration:
|
||||||
str = nodeToValue(node.id);
|
str = nodeToValue(node.id);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -8,6 +8,7 @@ exports.Syntax = {
|
|||||||
AssignmentExpression: 'AssignmentExpression',
|
AssignmentExpression: 'AssignmentExpression',
|
||||||
AssignmentPattern: 'AssignmentPattern',
|
AssignmentPattern: 'AssignmentPattern',
|
||||||
AwaitExpression: 'AwaitExpression',
|
AwaitExpression: 'AwaitExpression',
|
||||||
|
BigIntLiteral: 'BigIntLiteral',
|
||||||
BinaryExpression: 'BinaryExpression',
|
BinaryExpression: 'BinaryExpression',
|
||||||
BindExpression: 'BindExpression',
|
BindExpression: 'BindExpression',
|
||||||
BlockStatement: 'BlockStatement',
|
BlockStatement: 'BlockStatement',
|
||||||
|
|||||||
@ -100,6 +100,8 @@ walkers[Syntax.AwaitExpression] = function(node, parent, state, cb) {
|
|||||||
cb(node.argument, node, state);
|
cb(node.argument, node, state);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
walkers[Syntax.BigIntLiteral] = leafNode;
|
||||||
|
|
||||||
walkers[Syntax.BinaryExpression] = function(node, parent, state, cb) {
|
walkers[Syntax.BinaryExpression] = function(node, parent, state, cb) {
|
||||||
cb(node.left, node, state);
|
cb(node.left, node, state);
|
||||||
cb(node.right, node, state);
|
cb(node.right, node, state);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user