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',
|
||||
plugins: [
|
||||
'asyncGenerators',
|
||||
'bigInt',
|
||||
'classPrivateProperties',
|
||||
'classProperties',
|
||||
'decorators2',
|
||||
|
||||
@ -136,6 +136,10 @@ var nodeToValue = exports.nodeToValue = function(node) {
|
||||
str = nodeToValue(node.left);
|
||||
break;
|
||||
|
||||
case Syntax.BigIntLiteral:
|
||||
str = node.value;
|
||||
break;
|
||||
|
||||
case Syntax.ClassDeclaration:
|
||||
str = nodeToValue(node.id);
|
||||
break;
|
||||
|
||||
@ -8,6 +8,7 @@ exports.Syntax = {
|
||||
AssignmentExpression: 'AssignmentExpression',
|
||||
AssignmentPattern: 'AssignmentPattern',
|
||||
AwaitExpression: 'AwaitExpression',
|
||||
BigIntLiteral: 'BigIntLiteral',
|
||||
BinaryExpression: 'BinaryExpression',
|
||||
BindExpression: 'BindExpression',
|
||||
BlockStatement: 'BlockStatement',
|
||||
|
||||
@ -100,6 +100,8 @@ walkers[Syntax.AwaitExpression] = function(node, parent, state, cb) {
|
||||
cb(node.argument, node, state);
|
||||
};
|
||||
|
||||
walkers[Syntax.BigIntLiteral] = leafNode;
|
||||
|
||||
walkers[Syntax.BinaryExpression] = function(node, parent, state, cb) {
|
||||
cb(node.left, node, state);
|
||||
cb(node.right, node, state);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user