primitives.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /** @deprecated */
  2. export enum Markers {
  3. start = '/**',
  4. nostart = '/***',
  5. delim = '*',
  6. end = '*/',
  7. }
  8. export interface BlockMarkers {
  9. start: string;
  10. nostart: string;
  11. delim: string;
  12. end: string;
  13. }
  14. export interface Block {
  15. description: string;
  16. tags: Spec[];
  17. source: Line[];
  18. problems: Problem[];
  19. }
  20. export interface Spec {
  21. tag: string;
  22. name: string;
  23. default?: string;
  24. type: string;
  25. optional: boolean;
  26. description: string;
  27. problems: Problem[];
  28. source: Line[];
  29. }
  30. export interface Line {
  31. number: number;
  32. source: string;
  33. tokens: Tokens;
  34. }
  35. export interface Tokens {
  36. start: string;
  37. delimiter: string;
  38. postDelimiter: string;
  39. tag: string;
  40. postTag: string;
  41. name: string;
  42. postName: string;
  43. type: string;
  44. postType: string;
  45. description: string;
  46. end: string;
  47. lineEnd: string;
  48. }
  49. export interface Problem {
  50. code:
  51. | 'unhandled'
  52. | 'custom'
  53. | 'source:startline'
  54. | 'spec:tag:prefix'
  55. | 'spec:type:unpaired-curlies'
  56. | 'spec:name:unpaired-brackets'
  57. | 'spec:name:empty-name'
  58. | 'spec:name:invalid-default'
  59. | 'spec:name:empty-default';
  60. message: string;
  61. line: number;
  62. critical: boolean;
  63. }