File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11/** @import { Base } from "./productions/base.js" */
2+ /** @import { Source } from "./tokeniser.js" */
23
34/**
45 * @param {string } text
@@ -8,6 +9,10 @@ function lastLine(text) {
89 return splitted [ splitted . length - 1 ] ;
910}
1011
12+ /**
13+ * @param {string } base
14+ * @param {string } target
15+ */
1116function appendIfExist ( base , target ) {
1217 let result = base ;
1318 if ( target ) {
@@ -37,10 +42,10 @@ function contextAsText(node) {
3742 *
3843 * @typedef {ReturnType<typeof error> } WebIDLErrorData
3944 *
40- * @param {string } message error message
41- * @param {* } position
45+ * @param {Source } source
46+ * @param {number } position
4247 * @param {* } current
43- * @param {* } message
48+ * @param {string } message error message
4449 * @param {"Syntax" | "Validation" } kind error type
4550 * @param {WebIDL2ErrorOptions= } options
4651 */
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ const reserved = [
125125
126126/**
127127 * @typedef {ReturnType<typeof tokenise>[number] } Token
128+ * @typedef {Token[] & { name?: string } } Source
128129 * @param {string } str
129130 */
130131function tokenise ( str ) {
@@ -235,7 +236,7 @@ function tokenise(str) {
235236export class Tokeniser {
236237 /** @type {Base } */
237238 current ;
238- /** @type {Token[] & { name?: string } } */
239+ /** @type {Source } */
239240 source ;
240241
241242 /**
You can’t perform that action at this time.
0 commit comments