@ts-ast-parser/comment
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -22,3 +22,3 @@ import { descriptionLine, serializeDescription } from './description.js'; | ||
terminal(TokenKind.AtSign), | ||
terminal(TokenKind.AsciiWord, { serializable: true }), | ||
terminal(TokenKind.AsciiWord, { serializable: true }), // <tag_name> | ||
optional(terminal(TokenKind.Spaces)), | ||
@@ -46,3 +46,2 @@ optional(type()), | ||
return { | ||
// eslint-disable-next-line sonarjs/cognitive-complexity | ||
next(token) { | ||
@@ -91,3 +90,2 @@ const symbol = symbols[pos]; | ||
}, | ||
// eslint-disable-next-line sonarjs/cognitive-complexity | ||
serialize() { | ||
@@ -94,0 +92,0 @@ if (pos <= 4) { |
@@ -31,3 +31,2 @@ import { oneOrMore } from './one-or-more.js'; | ||
} | ||
// eslint-disable-next-line sonarjs/cognitive-complexity | ||
export function descriptionLine(options) { | ||
@@ -68,3 +67,2 @@ const symbols = [ | ||
return { | ||
// eslint-disable-next-line sonarjs/cognitive-complexity | ||
next(token) { | ||
@@ -136,3 +134,2 @@ tokens.push(token); | ||
} | ||
// eslint-disable-next-line sonarjs/cognitive-complexity | ||
export function serializeDescription(parts) { | ||
@@ -139,0 +136,0 @@ const result = []; |
@@ -55,3 +55,2 @@ import { optional } from './optional.js'; | ||
return { | ||
// eslint-disable-next-line sonarjs/cognitive-complexity | ||
next(token) { | ||
@@ -146,3 +145,2 @@ const symbol = symbols[pos]; | ||
return { | ||
// eslint-disable-next-line sonarjs/cognitive-complexity | ||
next(token) { | ||
@@ -149,0 +147,0 @@ const symbol = symbols[pos]; |
@@ -22,3 +22,2 @@ /** | ||
return { | ||
// eslint-disable-next-line sonarjs/cognitive-complexity | ||
next(token) { | ||
@@ -25,0 +24,0 @@ for (let i = 0; i < branches.length; i++) { |
@@ -14,3 +14,2 @@ /** | ||
return { | ||
// eslint-disable-next-line sonarjs/cognitive-complexity | ||
next(token) { | ||
@@ -17,0 +16,0 @@ tokens.push(token); |
@@ -100,2 +100,57 @@ /** | ||
constructor(kind, lexeme, multiple, line, start, end) { | ||
/** | ||
* The kind of token | ||
*/ | ||
Object.defineProperty(this, "_kind", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
/** | ||
* Whether this token can be merged with continuous tokens of the same kind | ||
*/ | ||
Object.defineProperty(this, "_multiple", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
/** | ||
* The starting index into the associated text. | ||
*/ | ||
Object.defineProperty(this, "_start", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
/** | ||
* The doc comment "line" number that this Token was extracted from. | ||
*/ | ||
Object.defineProperty(this, "_line", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
/** | ||
* The sequence of characters in the source code | ||
* that matched the pattern associated with the token. | ||
*/ | ||
Object.defineProperty(this, "_lexeme", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
/** | ||
* The (non-inclusive) ending index into the associated text. | ||
*/ | ||
Object.defineProperty(this, "_end", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
this._kind = kind; | ||
@@ -102,0 +157,0 @@ this._lexeme = lexeme; |
{ | ||
"name": "@ts-ast-parser/comment", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"author": "Jordi Marimon Palarea", | ||
@@ -39,7 +39,7 @@ "description": "Parses documentation comments", | ||
"engines": { | ||
"node": "^16.0.0 || ^18.0.0 || ^20.0.0" | ||
"node": "18.x || 20.x || 21.x" | ||
}, | ||
"dependencies": { | ||
"tslib": "^2.6.1" | ||
"tslib": "^2.6.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116578
1873
Updatedtslib@^2.6.2