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