版博士V2.0程序
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

782 řádky
25 KiB

  1. // Generated by dts-bundle v0.7.3
  2. declare module "@eslint-community/regexpp" {
  3. import * as AST from "@eslint-community/regexpp/ast";
  4. import { RegExpParser } from "@eslint-community/regexpp/parser";
  5. import { RegExpValidator } from "@eslint-community/regexpp/validator";
  6. import { RegExpVisitor } from "@eslint-community/regexpp/visitor";
  7. export { AST, RegExpParser, RegExpValidator };
  8. /**
  9. * Parse a given regular expression literal then make AST object.
  10. * @param source The source code to parse.
  11. * @param options The options to parse.
  12. * @returns The AST of the regular expression.
  13. */
  14. export function parseRegExpLiteral(
  15. source: RegExp | string,
  16. options?: RegExpParser.Options
  17. ): AST.RegExpLiteral;
  18. /**
  19. * Validate a given regular expression literal.
  20. * @param source The source code to validate.
  21. * @param options The options to validate.
  22. */
  23. export function validateRegExpLiteral(
  24. source: string,
  25. options?: RegExpValidator.Options
  26. ): void;
  27. export function visitRegExpAST(
  28. node: AST.Node,
  29. handlers: RegExpVisitor.Handlers
  30. ): void;
  31. }
  32. declare module "@eslint-community/regexpp/ast" {
  33. /**
  34. * The type which includes all nodes.
  35. */
  36. export type Node = BranchNode | LeafNode;
  37. /**
  38. * The type which includes all branch nodes.
  39. */
  40. export type BranchNode =
  41. | Alternative
  42. | CapturingGroup
  43. | CharacterClass
  44. | CharacterClassRange
  45. | Group
  46. | LookaroundAssertion
  47. | Pattern
  48. | Quantifier
  49. | RegExpLiteral;
  50. /**
  51. * The type which includes all leaf nodes.
  52. */
  53. export type LeafNode =
  54. | Backreference
  55. | BoundaryAssertion
  56. | Character
  57. | CharacterSet
  58. | Flags;
  59. /**
  60. * The type which includes all atom nodes.
  61. */
  62. export type Element = Assertion | QuantifiableElement | Quantifier;
  63. /**
  64. * The type which includes all atom nodes that Quantifier node can have as children.
  65. */
  66. export type QuantifiableElement =
  67. | Backreference
  68. | CapturingGroup
  69. | Character
  70. | CharacterClass
  71. | CharacterSet
  72. | Group
  73. | LookaheadAssertion;
  74. /**
  75. * The type which includes all character class atom nodes.
  76. */
  77. export type CharacterClassElement =
  78. | Character
  79. | CharacterClassRange
  80. | EscapeCharacterSet
  81. | UnicodePropertyCharacterSet;
  82. /**
  83. * The type which defines common properties for all node types.
  84. */
  85. export interface NodeBase {
  86. /** The node type. */
  87. type: Node["type"];
  88. /** The parent node. */
  89. parent: Node["parent"];
  90. /** The 0-based index that this node starts. */
  91. start: number;
  92. /** The 0-based index that this node ends. */
  93. end: number;
  94. /** The raw text of this node. */
  95. raw: string;
  96. }
  97. /**
  98. * The root node.
  99. */
  100. export interface RegExpLiteral extends NodeBase {
  101. type: "RegExpLiteral";
  102. parent: null;
  103. pattern: Pattern;
  104. flags: Flags;
  105. }
  106. /**
  107. * The pattern.
  108. */
  109. export interface Pattern extends NodeBase {
  110. type: "Pattern";
  111. parent: RegExpLiteral | null;
  112. alternatives: Alternative[];
  113. }
  114. /**
  115. * The alternative.
  116. * E.g. `a|b`
  117. */
  118. export interface Alternative extends NodeBase {
  119. type: "Alternative";
  120. parent: CapturingGroup | Group | LookaroundAssertion | Pattern;
  121. elements: Element[];
  122. }
  123. /**
  124. * The uncapturing group.
  125. * E.g. `(?:ab)`
  126. */
  127. export interface Group extends NodeBase {
  128. type: "Group";
  129. parent: Alternative | Quantifier;
  130. alternatives: Alternative[];
  131. }
  132. /**
  133. * The capturing group.
  134. * E.g. `(ab)`, `(?<name>ab)`
  135. */
  136. export interface CapturingGroup extends NodeBase {
  137. type: "CapturingGroup";
  138. parent: Alternative | Quantifier;
  139. name: string | null;
  140. alternatives: Alternative[];
  141. references: Backreference[];
  142. }
  143. /**
  144. * The lookaround assertion.
  145. */
  146. export type LookaroundAssertion = LookaheadAssertion | LookbehindAssertion;
  147. /**
  148. * The lookahead assertion.
  149. * E.g. `(?=ab)`, `(?!ab)`
  150. */
  151. export interface LookaheadAssertion extends NodeBase {
  152. type: "Assertion";
  153. parent: Alternative | Quantifier;
  154. kind: "lookahead";
  155. negate: boolean;
  156. alternatives: Alternative[];
  157. }
  158. /**
  159. * The lookbehind assertion.
  160. * E.g. `(?<=ab)`, `(?<!ab)`
  161. */
  162. export interface LookbehindAssertion extends NodeBase {
  163. type: "Assertion";
  164. parent: Alternative;
  165. kind: "lookbehind";
  166. negate: boolean;
  167. alternatives: Alternative[];
  168. }
  169. /**
  170. * The quantifier.
  171. * E.g. `a?`, `a*`, `a+`, `a{1,2}`, `a??`, `a*?`, `a+?`, `a{1,2}?`
  172. */
  173. export interface Quantifier extends NodeBase {
  174. type: "Quantifier";
  175. parent: Alternative;
  176. min: number;
  177. max: number;
  178. greedy: boolean;
  179. element: QuantifiableElement;
  180. }
  181. /**
  182. * The character class.
  183. * E.g. `[ab]`, `[^ab]`
  184. */
  185. export interface CharacterClass extends NodeBase {
  186. type: "CharacterClass";
  187. parent: Alternative | Quantifier;
  188. negate: boolean;
  189. elements: CharacterClassElement[];
  190. }
  191. /**
  192. * The character class.
  193. * E.g. `[a-b]`
  194. */
  195. export interface CharacterClassRange extends NodeBase {
  196. type: "CharacterClassRange";
  197. parent: CharacterClass;
  198. min: Character;
  199. max: Character;
  200. }
  201. /**
  202. * The assertion.
  203. */
  204. export type Assertion = BoundaryAssertion | LookaroundAssertion;
  205. /**
  206. * The boundary assertion.
  207. */
  208. export type BoundaryAssertion = EdgeAssertion | WordBoundaryAssertion;
  209. /**
  210. * The edge boundary assertion.
  211. * E.g. `^`, `$`
  212. */
  213. export interface EdgeAssertion extends NodeBase {
  214. type: "Assertion";
  215. parent: Alternative | Quantifier;
  216. kind: "end" | "start";
  217. }
  218. /**
  219. * The word bondary assertion.
  220. * E.g. `\b`, `\B`
  221. */
  222. export interface WordBoundaryAssertion extends NodeBase {
  223. type: "Assertion";
  224. parent: Alternative | Quantifier;
  225. kind: "word";
  226. negate: boolean;
  227. }
  228. /**
  229. * The character set.
  230. */
  231. export type CharacterSet =
  232. | AnyCharacterSet
  233. | EscapeCharacterSet
  234. | UnicodePropertyCharacterSet;
  235. /**
  236. * The dot.
  237. * E.g. `.`
  238. */
  239. export interface AnyCharacterSet extends NodeBase {
  240. type: "CharacterSet";
  241. parent: Alternative | Quantifier;
  242. kind: "any";
  243. }
  244. /**
  245. * The character class escape.
  246. * E.g. `\d`, `\s`, `\w`, `\D`, `\S`, `\W`
  247. */
  248. export interface EscapeCharacterSet extends NodeBase {
  249. type: "CharacterSet";
  250. parent: Alternative | CharacterClass | Quantifier;
  251. kind: "digit" | "space" | "word";
  252. negate: boolean;
  253. }
  254. /**
  255. * The unicode property escape.
  256. * E.g. `\p{ASCII}`, `\P{ASCII}`, `\p{Script=Hiragana}`
  257. */
  258. export interface UnicodePropertyCharacterSet extends NodeBase {
  259. type: "CharacterSet";
  260. parent: Alternative | CharacterClass | Quantifier;
  261. kind: "property";
  262. key: string;
  263. value: string | null;
  264. negate: boolean;
  265. }
  266. /**
  267. * The character.
  268. * This includes escape sequences which mean a character.
  269. * E.g. `a`, `あ`, `✿`, `\x65`, `\u0065`, `\u{65}`, `\/`
  270. */
  271. export interface Character extends NodeBase {
  272. type: "Character";
  273. parent: Alternative | CharacterClass | CharacterClassRange | Quantifier;
  274. value: number;
  275. }
  276. /**
  277. * The backreference.
  278. * E.g. `\1`, `\k<name>`
  279. */
  280. export interface Backreference extends NodeBase {
  281. type: "Backreference";
  282. parent: Alternative | Quantifier;
  283. ref: number | string;
  284. resolved: CapturingGroup;
  285. }
  286. /**
  287. * The flags.
  288. */
  289. export interface Flags extends NodeBase {
  290. type: "Flags";
  291. parent: RegExpLiteral | null;
  292. dotAll: boolean;
  293. global: boolean;
  294. hasIndices: boolean;
  295. ignoreCase: boolean;
  296. multiline: boolean;
  297. sticky: boolean;
  298. unicode: boolean;
  299. }
  300. }
  301. declare module "@eslint-community/regexpp/parser" {
  302. import type {
  303. Flags,
  304. RegExpLiteral,
  305. Pattern,
  306. } from "@eslint-community/regexpp/ast";
  307. import type { EcmaVersion } from "@eslint-community/regexpp/ecma-versions";
  308. export namespace RegExpParser {
  309. /**
  310. * The options for RegExpParser construction.
  311. */
  312. interface Options {
  313. /**
  314. * The flag to disable Annex B syntax. Default is `false`.
  315. */
  316. strict?: boolean;
  317. /**
  318. * ECMAScript version. Default is `2023`.
  319. * - `2015` added `u` and `y` flags.
  320. * - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion,
  321. * and Unicode Property Escape.
  322. * - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes.
  323. * - `2022` added `d` flag.
  324. * - `2023` added more valid Unicode Property Escapes.
  325. */
  326. ecmaVersion?: EcmaVersion;
  327. }
  328. }
  329. export class RegExpParser {
  330. /**
  331. * Initialize this parser.
  332. * @param options The options of parser.
  333. */
  334. constructor(options?: RegExpParser.Options);
  335. /**
  336. * Parse a regular expression literal. E.g. "/abc/g"
  337. * @param source The source code to parse.
  338. * @param start The start index in the source code.
  339. * @param end The end index in the source code.
  340. * @returns The AST of the given regular expression.
  341. */
  342. parseLiteral(source: string, start?: number, end?: number): RegExpLiteral;
  343. /**
  344. * Parse a regular expression flags. E.g. "gim"
  345. * @param source The source code to parse.
  346. * @param start The start index in the source code.
  347. * @param end The end index in the source code.
  348. * @returns The AST of the given flags.
  349. */
  350. parseFlags(source: string, start?: number, end?: number): Flags;
  351. /**
  352. * Parse a regular expression pattern. E.g. "abc"
  353. * @param source The source code to parse.
  354. * @param start The start index in the source code.
  355. * @param end The end index in the source code.
  356. * @param uFlag The flag to set unicode mode.
  357. * @returns The AST of the given pattern.
  358. */
  359. parsePattern(
  360. source: string,
  361. start?: number,
  362. end?: number,
  363. uFlag?: boolean
  364. ): Pattern;
  365. }
  366. }
  367. declare module "@eslint-community/regexpp/validator" {
  368. import type { EcmaVersion } from "@eslint-community/regexpp/ecma-versions";
  369. export namespace RegExpValidator {
  370. /**
  371. * The options for RegExpValidator construction.
  372. */
  373. interface Options {
  374. /**
  375. * The flag to disable Annex B syntax. Default is `false`.
  376. */
  377. strict?: boolean;
  378. /**
  379. * ECMAScript version. Default is `2023`.
  380. * - `2015` added `u` and `y` flags.
  381. * - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion,
  382. * and Unicode Property Escape.
  383. * - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes.
  384. * - `2022` added `d` flag.
  385. * - `2023` added more valid Unicode Property Escapes.
  386. */
  387. ecmaVersion?: EcmaVersion;
  388. /**
  389. * A function that is called when the validator entered a RegExp literal.
  390. * @param start The 0-based index of the first character.
  391. */
  392. onLiteralEnter?: (start: number) => void;
  393. /**
  394. * A function that is called when the validator left a RegExp literal.
  395. * @param start The 0-based index of the first character.
  396. * @param end The next 0-based index of the last character.
  397. */
  398. onLiteralLeave?: (start: number, end: number) => void;
  399. /**
  400. * A function that is called when the validator found flags.
  401. * @param start The 0-based index of the first character.
  402. * @param end The next 0-based index of the last character.
  403. * @param flags.global `g` flag.
  404. * @param flags.ignoreCase `i` flag.
  405. * @param flags.multiline `m` flag.
  406. * @param flags.unicode `u` flag.
  407. * @param flags.sticky `y` flag.
  408. * @param flags.dotAll `s` flag.
  409. * @param flags.hasIndices `d` flag.
  410. */
  411. onRegExpFlags?: (
  412. start: number,
  413. end: number,
  414. flags: {
  415. global: boolean;
  416. ignoreCase: boolean;
  417. multiline: boolean;
  418. unicode: boolean;
  419. sticky: boolean;
  420. dotAll: boolean;
  421. hasIndices: boolean;
  422. }
  423. ) => void;
  424. /**
  425. * A function that is called when the validator found flags.
  426. * @param start The 0-based index of the first character.
  427. * @param end The next 0-based index of the last character.
  428. * @param global `g` flag.
  429. * @param ignoreCase `i` flag.
  430. * @param multiline `m` flag.
  431. * @param unicode `u` flag.
  432. * @param sticky `y` flag.
  433. * @param dotAll `s` flag.
  434. * @param hasIndices `d` flag.
  435. *
  436. * @deprecated Use `onRegExpFlags` instead.
  437. */
  438. onFlags?: (
  439. start: number,
  440. end: number,
  441. global: boolean,
  442. ignoreCase: boolean,
  443. multiline: boolean,
  444. unicode: boolean,
  445. sticky: boolean,
  446. dotAll: boolean,
  447. hasIndices: boolean
  448. ) => void;
  449. /**
  450. * A function that is called when the validator entered a pattern.
  451. * @param start The 0-based index of the first character.
  452. */
  453. onPatternEnter?: (start: number) => void;
  454. /**
  455. * A function that is called when the validator left a pattern.
  456. * @param start The 0-based index of the first character.
  457. * @param end The next 0-based index of the last character.
  458. */
  459. onPatternLeave?: (start: number, end: number) => void;
  460. /**
  461. * A function that is called when the validator entered a disjunction.
  462. * @param start The 0-based index of the first character.
  463. */
  464. onDisjunctionEnter?: (start: number) => void;
  465. /**
  466. * A function that is called when the validator left a disjunction.
  467. * @param start The 0-based index of the first character.
  468. * @param end The next 0-based index of the last character.
  469. */
  470. onDisjunctionLeave?: (start: number, end: number) => void;
  471. /**
  472. * A function that is called when the validator entered an alternative.
  473. * @param start The 0-based index of the first character.
  474. * @param index The 0-based index of alternatives in a disjunction.
  475. */
  476. onAlternativeEnter?: (start: number, index: number) => void;
  477. /**
  478. * A function that is called when the validator left an alternative.
  479. * @param start The 0-based index of the first character.
  480. * @param end The next 0-based index of the last character.
  481. * @param index The 0-based index of alternatives in a disjunction.
  482. */
  483. onAlternativeLeave?: (start: number, end: number, index: number) => void;
  484. /**
  485. * A function that is called when the validator entered an uncapturing group.
  486. * @param start The 0-based index of the first character.
  487. */
  488. onGroupEnter?: (start: number) => void;
  489. /**
  490. * A function that is called when the validator left an uncapturing group.
  491. * @param start The 0-based index of the first character.
  492. * @param end The next 0-based index of the last character.
  493. */
  494. onGroupLeave?: (start: number, end: number) => void;
  495. /**
  496. * A function that is called when the validator entered a capturing group.
  497. * @param start The 0-based index of the first character.
  498. * @param name The group name.
  499. */
  500. onCapturingGroupEnter?: (start: number, name: string | null) => void;
  501. /**
  502. * A function that is called when the validator left a capturing group.
  503. * @param start The 0-based index of the first character.
  504. * @param end The next 0-based index of the last character.
  505. * @param name The group name.
  506. */
  507. onCapturingGroupLeave?: (
  508. start: number,
  509. end: number,
  510. name: string | null
  511. ) => void;
  512. /**
  513. * A function that is called when the validator found a quantifier.
  514. * @param start The 0-based index of the first character.
  515. * @param end The next 0-based index of the last character.
  516. * @param min The minimum number of repeating.
  517. * @param max The maximum number of repeating.
  518. * @param greedy The flag to choose the longest matching.
  519. */
  520. onQuantifier?: (
  521. start: number,
  522. end: number,
  523. min: number,
  524. max: number,
  525. greedy: boolean
  526. ) => void;
  527. /**
  528. * A function that is called when the validator entered a lookahead/lookbehind assertion.
  529. * @param start The 0-based index of the first character.
  530. * @param kind The kind of the assertion.
  531. * @param negate The flag which represents that the assertion is negative.
  532. */
  533. onLookaroundAssertionEnter?: (
  534. start: number,
  535. kind: "lookahead" | "lookbehind",
  536. negate: boolean
  537. ) => void;
  538. /**
  539. * A function that is called when the validator left a lookahead/lookbehind assertion.
  540. * @param start The 0-based index of the first character.
  541. * @param end The next 0-based index of the last character.
  542. * @param kind The kind of the assertion.
  543. * @param negate The flag which represents that the assertion is negative.
  544. */
  545. onLookaroundAssertionLeave?: (
  546. start: number,
  547. end: number,
  548. kind: "lookahead" | "lookbehind",
  549. negate: boolean
  550. ) => void;
  551. /**
  552. * A function that is called when the validator found an edge boundary assertion.
  553. * @param start The 0-based index of the first character.
  554. * @param end The next 0-based index of the last character.
  555. * @param kind The kind of the assertion.
  556. */
  557. onEdgeAssertion?: (
  558. start: number,
  559. end: number,
  560. kind: "end" | "start"
  561. ) => void;
  562. /**
  563. * A function that is called when the validator found a word boundary assertion.
  564. * @param start The 0-based index of the first character.
  565. * @param end The next 0-based index of the last character.
  566. * @param kind The kind of the assertion.
  567. * @param negate The flag which represents that the assertion is negative.
  568. */
  569. onWordBoundaryAssertion?: (
  570. start: number,
  571. end: number,
  572. kind: "word",
  573. negate: boolean
  574. ) => void;
  575. /**
  576. * A function that is called when the validator found a dot.
  577. * @param start The 0-based index of the first character.
  578. * @param end The next 0-based index of the last character.
  579. * @param kind The kind of the character set.
  580. */
  581. onAnyCharacterSet?: (start: number, end: number, kind: "any") => void;
  582. /**
  583. * A function that is called when the validator found a character set escape.
  584. * @param start The 0-based index of the first character.
  585. * @param end The next 0-based index of the last character.
  586. * @param kind The kind of the character set.
  587. * @param negate The flag which represents that the character set is negative.
  588. */
  589. onEscapeCharacterSet?: (
  590. start: number,
  591. end: number,
  592. kind: "digit" | "space" | "word",
  593. negate: boolean
  594. ) => void;
  595. /**
  596. * A function that is called when the validator found a Unicode proerty escape.
  597. * @param start The 0-based index of the first character.
  598. * @param end The next 0-based index of the last character.
  599. * @param kind The kind of the character set.
  600. * @param key The property name.
  601. * @param value The property value.
  602. * @param negate The flag which represents that the character set is negative.
  603. */
  604. onUnicodePropertyCharacterSet?: (
  605. start: number,
  606. end: number,
  607. kind: "property",
  608. key: string,
  609. value: string | null,
  610. negate: boolean
  611. ) => void;
  612. /**
  613. * A function that is called when the validator found a character.
  614. * @param start The 0-based index of the first character.
  615. * @param end The next 0-based index of the last character.
  616. * @param value The code point of the character.
  617. */
  618. onCharacter?: (start: number, end: number, value: number) => void;
  619. /**
  620. * A function that is called when the validator found a backreference.
  621. * @param start The 0-based index of the first character.
  622. * @param end The next 0-based index of the last character.
  623. * @param ref The key of the referred capturing group.
  624. */
  625. onBackreference?: (
  626. start: number,
  627. end: number,
  628. ref: number | string
  629. ) => void;
  630. /**
  631. * A function that is called when the validator entered a character class.
  632. * @param start The 0-based index of the first character.
  633. * @param negate The flag which represents that the character class is negative.
  634. */
  635. onCharacterClassEnter?: (start: number, negate: boolean) => void;
  636. /**
  637. * A function that is called when the validator left a character class.
  638. * @param start The 0-based index of the first character.
  639. * @param end The next 0-based index of the last character.
  640. * @param negate The flag which represents that the character class is negative.
  641. */
  642. onCharacterClassLeave?: (
  643. start: number,
  644. end: number,
  645. negate: boolean
  646. ) => void;
  647. /**
  648. * A function that is called when the validator found a character class range.
  649. * @param start The 0-based index of the first character.
  650. * @param end The next 0-based index of the last character.
  651. * @param min The minimum code point of the range.
  652. * @param max The maximum code point of the range.
  653. */
  654. onCharacterClassRange?: (
  655. start: number,
  656. end: number,
  657. min: number,
  658. max: number
  659. ) => void;
  660. }
  661. }
  662. /**
  663. * The regular expression validator.
  664. */
  665. export class RegExpValidator {
  666. /**
  667. * Initialize this validator.
  668. * @param options The options of validator.
  669. */
  670. constructor(options?: RegExpValidator.Options);
  671. /**
  672. * Validate a regular expression literal. E.g. "/abc/g"
  673. * @param source The source code to validate.
  674. * @param start The start index in the source code.
  675. * @param end The end index in the source code.
  676. */
  677. validateLiteral(source: string, start?: number, end?: number): void;
  678. /**
  679. * Validate a regular expression flags. E.g. "gim"
  680. * @param source The source code to validate.
  681. * @param start The start index in the source code.
  682. * @param end The end index in the source code.
  683. */
  684. validateFlags(source: string, start?: number, end?: number): void;
  685. /**
  686. * Validate a regular expression pattern. E.g. "abc"
  687. * @param source The source code to validate.
  688. * @param start The start index in the source code.
  689. * @param end The end index in the source code.
  690. * @param uFlag The flag to set unicode mode.
  691. */
  692. validatePattern(
  693. source: string,
  694. start?: number,
  695. end?: number,
  696. uFlag?: boolean
  697. ): void;
  698. }
  699. }
  700. declare module "@eslint-community/regexpp/visitor" {
  701. import type {
  702. Alternative,
  703. Assertion,
  704. Backreference,
  705. CapturingGroup,
  706. Character,
  707. CharacterClass,
  708. CharacterClassRange,
  709. CharacterSet,
  710. Flags,
  711. Group,
  712. Node,
  713. Pattern,
  714. Quantifier,
  715. RegExpLiteral,
  716. } from "@eslint-community/regexpp/ast";
  717. /**
  718. * The visitor to walk on AST.
  719. */
  720. export class RegExpVisitor {
  721. /**
  722. * Initialize this visitor.
  723. * @param handlers Callbacks for each node.
  724. */
  725. constructor(handlers: RegExpVisitor.Handlers);
  726. /**
  727. * Visit a given node and descendant nodes.
  728. * @param node The root node to visit tree.
  729. */
  730. visit(node: Node): void;
  731. }
  732. export namespace RegExpVisitor {
  733. interface Handlers {
  734. onAlternativeEnter?: (node: Alternative) => void;
  735. onAlternativeLeave?: (node: Alternative) => void;
  736. onAssertionEnter?: (node: Assertion) => void;
  737. onAssertionLeave?: (node: Assertion) => void;
  738. onBackreferenceEnter?: (node: Backreference) => void;
  739. onBackreferenceLeave?: (node: Backreference) => void;
  740. onCapturingGroupEnter?: (node: CapturingGroup) => void;
  741. onCapturingGroupLeave?: (node: CapturingGroup) => void;
  742. onCharacterEnter?: (node: Character) => void;
  743. onCharacterLeave?: (node: Character) => void;
  744. onCharacterClassEnter?: (node: CharacterClass) => void;
  745. onCharacterClassLeave?: (node: CharacterClass) => void;
  746. onCharacterClassRangeEnter?: (node: CharacterClassRange) => void;
  747. onCharacterClassRangeLeave?: (node: CharacterClassRange) => void;
  748. onCharacterSetEnter?: (node: CharacterSet) => void;
  749. onCharacterSetLeave?: (node: CharacterSet) => void;
  750. onFlagsEnter?: (node: Flags) => void;
  751. onFlagsLeave?: (node: Flags) => void;
  752. onGroupEnter?: (node: Group) => void;
  753. onGroupLeave?: (node: Group) => void;
  754. onPatternEnter?: (node: Pattern) => void;
  755. onPatternLeave?: (node: Pattern) => void;
  756. onQuantifierEnter?: (node: Quantifier) => void;
  757. onQuantifierLeave?: (node: Quantifier) => void;
  758. onRegExpLiteralEnter?: (node: RegExpLiteral) => void;
  759. onRegExpLiteralLeave?: (node: RegExpLiteral) => void;
  760. }
  761. }
  762. }
  763. declare module "@eslint-community/regexpp/ecma-versions" {
  764. export type EcmaVersion =
  765. | 5
  766. | 2015
  767. | 2016
  768. | 2017
  769. | 2018
  770. | 2019
  771. | 2020
  772. | 2021
  773. | 2022
  774. | 2023;
  775. }