@aiready/core 0.23.2 → 0.23.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/parser-factory.test.d.ts +1 -1
- package/dist/__tests__/parser-factory.test.js +62 -50
- package/dist/__tests__/python-parser.test.d.ts +1 -1
- package/dist/__tests__/python-parser.test.js +111 -109
- package/dist/__tests__/scoring.test.d.ts +1 -1
- package/dist/__tests__/scoring.test.js +193 -176
- package/dist/chunk-3YI4IS3D.mjs +191 -173
- package/dist/chunk-5HIXDC3X.mjs +273 -251
- package/dist/chunk-5V3L53AE.mjs +805 -0
- package/dist/chunk-CKVKHN3G.mjs +228 -211
- package/dist/chunk-COHIBX3Q.mjs +213 -195
- package/dist/chunk-CWRCDSKZ.mjs +91 -82
- package/dist/chunk-D3D3NCRR.mjs +147 -129
- package/dist/chunk-HCFYP7UD.mjs +805 -0
- package/dist/chunk-HFLFBA6F.mjs +79 -72
- package/dist/chunk-HKSARRCD.mjs +66 -58
- package/dist/chunk-JJ5JL5FX.mjs +91 -82
- package/dist/chunk-KDSTXVLQ.mjs +724 -0
- package/dist/chunk-KI7XORTN.mjs +91 -82
- package/dist/chunk-LTMHFNFK.mjs +690 -0
- package/dist/chunk-LTNXTXRI.mjs +228 -211
- package/dist/chunk-M22BXHBR.mjs +805 -0
- package/dist/chunk-MH3A3LX6.mjs +200 -182
- package/dist/chunk-NGHT7JOG.mjs +697 -0
- package/dist/chunk-OQ6IGDXG.mjs +147 -129
- package/dist/chunk-QAFB3HXQ.mjs +181 -165
- package/dist/chunk-QQBKXHLU.mjs +678 -0
- package/dist/chunk-RDHYGES7.mjs +678 -0
- package/dist/chunk-SWTDBVYJ.mjs +228 -213
- package/dist/chunk-UIWL5JQB.mjs +79 -72
- package/dist/chunk-UQGI67WR.mjs +79 -72
- package/dist/chunk-UTZOO4XO.mjs +147 -131
- package/dist/chunk-X4F46I5L.mjs +213 -195
- package/dist/chunk-XKK7YHPX.mjs +204 -186
- package/dist/chunk-YCA4FTEK.mjs +190 -172
- package/dist/chunk-ZSZRRTJM.mjs +719 -0
- package/dist/client-BgmiMoil.d.mts +1344 -0
- package/dist/client-BgmiMoil.d.ts +1344 -0
- package/dist/client-BxGrPuuN.d.mts +1191 -0
- package/dist/client-BxGrPuuN.d.ts +1191 -0
- package/dist/client-D-cn9ydj.d.mts +1136 -0
- package/dist/client-D-cn9ydj.d.ts +1136 -0
- package/dist/client-D9seCH4K.d.mts +1334 -0
- package/dist/client-D9seCH4K.d.ts +1334 -0
- package/dist/client-DIXIh7rw.d.mts +1193 -0
- package/dist/client-DIXIh7rw.d.ts +1193 -0
- package/dist/client-DVHXWOHw.d.mts +1245 -0
- package/dist/client-DVHXWOHw.d.ts +1245 -0
- package/dist/client.d.mts +2 -1098
- package/dist/client.d.ts +2 -1098
- package/dist/client.js +23 -43
- package/dist/client.mjs +3 -25
- package/dist/index.d.mts +325 -103
- package/dist/index.d.ts +325 -103
- package/dist/index.js +307 -324
- package/dist/index.mjs +283 -306
- package/dist/parsers/parser-factory.d.ts +45 -45
- package/dist/parsers/parser-factory.js +86 -84
- package/dist/parsers/python-parser.d.ts +33 -28
- package/dist/parsers/python-parser.js +224 -222
- package/dist/parsers/typescript-parser.d.ts +15 -10
- package/dist/parsers/typescript-parser.js +223 -197
- package/dist/scoring.d.ts +59 -49
- package/dist/scoring.js +129 -127
- package/dist/types/language.d.ts +104 -93
- package/dist/types/language.js +23 -23
- package/dist/types.d.ts +105 -87
- package/dist/types.js +1 -1
- package/dist/utils/ast-parser.d.ts +42 -33
- package/dist/utils/ast-parser.js +159 -162
- package/dist/utils/cli-helpers.d.ts +27 -10
- package/dist/utils/cli-helpers.js +45 -43
- package/dist/utils/config.d.ts +8 -3
- package/dist/utils/config.js +67 -69
- package/dist/utils/file-scanner.d.ts +1 -1
- package/dist/utils/file-scanner.js +80 -76
- package/dist/utils/metrics.d.ts +1 -1
- package/dist/utils/metrics.js +2 -2
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Parses Python files using tree-sitter-python for accurate AST parsing
|
|
5
5
|
*/
|
|
6
|
-
import { Language, ParseError
|
|
6
|
+
import { Language, ParseError } from '../types/language';
|
|
7
7
|
/**
|
|
8
8
|
* Python Parser implementation
|
|
9
9
|
*
|
|
@@ -12,230 +12,232 @@ import { Language, ParseError, } from '../types/language';
|
|
|
12
12
|
* is properly configured.
|
|
13
13
|
*/
|
|
14
14
|
export class PythonParser {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
constructor() {
|
|
16
|
+
this.language = Language.Python;
|
|
17
|
+
this.extensions = ['.py'];
|
|
18
|
+
this.parser = null;
|
|
19
|
+
this.initialized = false;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Initialize the tree-sitter parser
|
|
23
|
+
* This is async because tree-sitter WASM needs to be loaded
|
|
24
|
+
*/
|
|
25
|
+
async initialize() {
|
|
26
|
+
if (this.initialized) return;
|
|
27
|
+
try {
|
|
28
|
+
// TODO: Initialize tree-sitter-python
|
|
29
|
+
// const Parser = await import('web-tree-sitter');
|
|
30
|
+
// await Parser.init();
|
|
31
|
+
// this.parser = new Parser();
|
|
32
|
+
// const Python = await Parser.Language.load('tree-sitter-python.wasm');
|
|
33
|
+
// this.parser.setLanguage(Python);
|
|
34
|
+
this.initialized = true;
|
|
35
|
+
} catch (error) {
|
|
36
|
+
throw new Error(`Failed to initialize Python parser: ${error.message}`);
|
|
20
37
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
}
|
|
39
|
+
parse(code, filePath) {
|
|
40
|
+
// TODO: Implement when tree-sitter is configured
|
|
41
|
+
// For now, return a basic parse with regex-based extraction
|
|
42
|
+
try {
|
|
43
|
+
const imports = this.extractImportsRegex(code, filePath);
|
|
44
|
+
const exports = this.extractExportsRegex(code, filePath);
|
|
45
|
+
return {
|
|
46
|
+
exports,
|
|
47
|
+
imports,
|
|
48
|
+
language: Language.Python,
|
|
49
|
+
warnings: [
|
|
50
|
+
'Python parsing is currently using regex-based extraction. Tree-sitter support coming soon.',
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
} catch (error) {
|
|
54
|
+
throw new ParseError(
|
|
55
|
+
`Failed to parse Python file ${filePath}: ${error.message}`,
|
|
56
|
+
filePath
|
|
57
|
+
);
|
|
40
58
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
}
|
|
60
|
+
getNamingConventions() {
|
|
61
|
+
// PEP 8 naming conventions
|
|
62
|
+
return {
|
|
63
|
+
// snake_case for variables and functions
|
|
64
|
+
variablePattern: /^[a-z_][a-z0-9_]*$/,
|
|
65
|
+
functionPattern: /^[a-z_][a-z0-9_]*$/,
|
|
66
|
+
// PascalCase for classes
|
|
67
|
+
classPattern: /^[A-Z][a-zA-Z0-9]*$/,
|
|
68
|
+
// UPPER_CASE for constants
|
|
69
|
+
constantPattern: /^[A-Z][A-Z0-9_]*$/,
|
|
70
|
+
// Python special methods and common exceptions
|
|
71
|
+
exceptions: [
|
|
72
|
+
'__init__',
|
|
73
|
+
'__str__',
|
|
74
|
+
'__repr__',
|
|
75
|
+
'__name__',
|
|
76
|
+
'__main__',
|
|
77
|
+
'__file__',
|
|
78
|
+
'__doc__',
|
|
79
|
+
'__all__',
|
|
80
|
+
'__version__',
|
|
81
|
+
'__author__',
|
|
82
|
+
'__dict__',
|
|
83
|
+
'__class__',
|
|
84
|
+
'__module__',
|
|
85
|
+
'__bases__',
|
|
86
|
+
],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
canHandle(filePath) {
|
|
90
|
+
return filePath.toLowerCase().endsWith('.py');
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Regex-based import extraction (temporary implementation)
|
|
94
|
+
*/
|
|
95
|
+
extractImportsRegex(code, filePath) {
|
|
96
|
+
const imports = [];
|
|
97
|
+
const lines = code.split('\n');
|
|
98
|
+
// Match: import module
|
|
99
|
+
// Match: import module as alias
|
|
100
|
+
// Match: from module import name
|
|
101
|
+
// Match: from module import name1, name2
|
|
102
|
+
// Match: from module import *
|
|
103
|
+
const importRegex = /^\s*import\s+([a-zA-Z0-9_., ]+)/;
|
|
104
|
+
const fromImportRegex = /^\s*from\s+([a-zA-Z0-9_.]+)\s+import\s+(.+)/;
|
|
105
|
+
lines.forEach((line, idx) => {
|
|
106
|
+
// Skip comments
|
|
107
|
+
if (line.trim().startsWith('#')) return;
|
|
108
|
+
// Handle "import module"
|
|
109
|
+
const importMatch = line.match(importRegex);
|
|
110
|
+
if (importMatch) {
|
|
111
|
+
const modules = importMatch[1]
|
|
112
|
+
.split(',')
|
|
113
|
+
.map((m) => m.trim().split(' as ')[0]);
|
|
114
|
+
modules.forEach((module) => {
|
|
115
|
+
imports.push({
|
|
116
|
+
source: module,
|
|
117
|
+
specifiers: [module],
|
|
118
|
+
loc: {
|
|
119
|
+
start: { line: idx + 1, column: 0 },
|
|
120
|
+
end: { line: idx + 1, column: line.length },
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
// Handle "from module import ..."
|
|
127
|
+
const fromMatch = line.match(fromImportRegex);
|
|
128
|
+
if (fromMatch) {
|
|
129
|
+
const module = fromMatch[1];
|
|
130
|
+
const imports_str = fromMatch[2];
|
|
131
|
+
// Handle "from module import *"
|
|
132
|
+
if (imports_str.trim() === '*') {
|
|
133
|
+
imports.push({
|
|
134
|
+
source: module,
|
|
135
|
+
specifiers: ['*'],
|
|
136
|
+
loc: {
|
|
137
|
+
start: { line: idx + 1, column: 0 },
|
|
138
|
+
end: { line: idx + 1, column: line.length },
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
return;
|
|
56
142
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
// Python special methods and common exceptions
|
|
69
|
-
exceptions: [
|
|
70
|
-
'__init__',
|
|
71
|
-
'__str__',
|
|
72
|
-
'__repr__',
|
|
73
|
-
'__name__',
|
|
74
|
-
'__main__',
|
|
75
|
-
'__file__',
|
|
76
|
-
'__doc__',
|
|
77
|
-
'__all__',
|
|
78
|
-
'__version__',
|
|
79
|
-
'__author__',
|
|
80
|
-
'__dict__',
|
|
81
|
-
'__class__',
|
|
82
|
-
'__module__',
|
|
83
|
-
'__bases__',
|
|
84
|
-
],
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
canHandle(filePath) {
|
|
88
|
-
return filePath.toLowerCase().endsWith('.py');
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Regex-based import extraction (temporary implementation)
|
|
92
|
-
*/
|
|
93
|
-
extractImportsRegex(code, filePath) {
|
|
94
|
-
const imports = [];
|
|
95
|
-
const lines = code.split('\n');
|
|
96
|
-
// Match: import module
|
|
97
|
-
// Match: import module as alias
|
|
98
|
-
// Match: from module import name
|
|
99
|
-
// Match: from module import name1, name2
|
|
100
|
-
// Match: from module import *
|
|
101
|
-
const importRegex = /^\s*import\s+([a-zA-Z0-9_., ]+)/;
|
|
102
|
-
const fromImportRegex = /^\s*from\s+([a-zA-Z0-9_.]+)\s+import\s+(.+)/;
|
|
103
|
-
lines.forEach((line, idx) => {
|
|
104
|
-
// Skip comments
|
|
105
|
-
if (line.trim().startsWith('#'))
|
|
106
|
-
return;
|
|
107
|
-
// Handle "import module"
|
|
108
|
-
const importMatch = line.match(importRegex);
|
|
109
|
-
if (importMatch) {
|
|
110
|
-
const modules = importMatch[1].split(',').map(m => m.trim().split(' as ')[0]);
|
|
111
|
-
modules.forEach(module => {
|
|
112
|
-
imports.push({
|
|
113
|
-
source: module,
|
|
114
|
-
specifiers: [module],
|
|
115
|
-
loc: {
|
|
116
|
-
start: { line: idx + 1, column: 0 },
|
|
117
|
-
end: { line: idx + 1, column: line.length },
|
|
118
|
-
},
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
// Handle "from module import ..."
|
|
124
|
-
const fromMatch = line.match(fromImportRegex);
|
|
125
|
-
if (fromMatch) {
|
|
126
|
-
const module = fromMatch[1];
|
|
127
|
-
const imports_str = fromMatch[2];
|
|
128
|
-
// Handle "from module import *"
|
|
129
|
-
if (imports_str.trim() === '*') {
|
|
130
|
-
imports.push({
|
|
131
|
-
source: module,
|
|
132
|
-
specifiers: ['*'],
|
|
133
|
-
loc: {
|
|
134
|
-
start: { line: idx + 1, column: 0 },
|
|
135
|
-
end: { line: idx + 1, column: line.length },
|
|
136
|
-
},
|
|
137
|
-
});
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
// Handle "from module import name1, name2"
|
|
141
|
-
const specifiers = imports_str
|
|
142
|
-
.split(',')
|
|
143
|
-
.map(s => s.trim().split(' as ')[0]);
|
|
144
|
-
imports.push({
|
|
145
|
-
source: module,
|
|
146
|
-
specifiers,
|
|
147
|
-
loc: {
|
|
148
|
-
start: { line: idx + 1, column: 0 },
|
|
149
|
-
end: { line: idx + 1, column: line.length },
|
|
150
|
-
},
|
|
151
|
-
});
|
|
152
|
-
}
|
|
143
|
+
// Handle "from module import name1, name2"
|
|
144
|
+
const specifiers = imports_str
|
|
145
|
+
.split(',')
|
|
146
|
+
.map((s) => s.trim().split(' as ')[0]);
|
|
147
|
+
imports.push({
|
|
148
|
+
source: module,
|
|
149
|
+
specifiers,
|
|
150
|
+
loc: {
|
|
151
|
+
start: { line: idx + 1, column: 0 },
|
|
152
|
+
end: { line: idx + 1, column: line.length },
|
|
153
|
+
},
|
|
153
154
|
});
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
return imports;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Regex-based export extraction (temporary implementation)
|
|
161
|
+
*
|
|
162
|
+
* Python doesn't have explicit exports like JavaScript.
|
|
163
|
+
* We extract:
|
|
164
|
+
* - Functions defined at module level (def)
|
|
165
|
+
* - Classes defined at module level (class)
|
|
166
|
+
* - Variables in __all__ list
|
|
167
|
+
*/
|
|
168
|
+
extractExportsRegex(code, filePath) {
|
|
169
|
+
const exports = [];
|
|
170
|
+
const lines = code.split('\n');
|
|
171
|
+
// Extract functions: def function_name(
|
|
172
|
+
const functionRegex = /^def\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/;
|
|
173
|
+
// Extract classes: class ClassName
|
|
174
|
+
const classRegex = /^class\s+([a-zA-Z_][a-zA-Z0-9_]*)/;
|
|
175
|
+
// Extract from __all__
|
|
176
|
+
const allRegex = /__all__\s*=\s*\[([^\]]+)\]/;
|
|
177
|
+
let inClass = false;
|
|
178
|
+
let classIndent = 0;
|
|
179
|
+
lines.forEach((line, idx) => {
|
|
180
|
+
const indent = line.search(/\S/);
|
|
181
|
+
// Track if we're inside a class (for filtering out methods)
|
|
182
|
+
if (line.match(classRegex)) {
|
|
183
|
+
inClass = true;
|
|
184
|
+
classIndent = indent;
|
|
185
|
+
} else if (inClass && indent <= classIndent && line.trim()) {
|
|
186
|
+
inClass = false;
|
|
187
|
+
}
|
|
188
|
+
// Skip if inside a class (methods are not module-level exports)
|
|
189
|
+
if (inClass) {
|
|
190
|
+
// But do extract the class itself
|
|
191
|
+
const classMatch = line.match(classRegex);
|
|
192
|
+
if (classMatch) {
|
|
193
|
+
exports.push({
|
|
194
|
+
name: classMatch[1],
|
|
195
|
+
type: 'class',
|
|
196
|
+
loc: {
|
|
197
|
+
start: { line: idx + 1, column: indent },
|
|
198
|
+
end: { line: idx + 1, column: line.length },
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
// Extract functions (only at module level)
|
|
205
|
+
const funcMatch = line.match(functionRegex);
|
|
206
|
+
if (funcMatch && indent === 0) {
|
|
207
|
+
const name = funcMatch[1];
|
|
208
|
+
// Skip private functions (starting with _) unless in __all__
|
|
209
|
+
if (!name.startsWith('_') || name.startsWith('__')) {
|
|
210
|
+
exports.push({
|
|
211
|
+
name,
|
|
212
|
+
type: 'function',
|
|
213
|
+
loc: {
|
|
214
|
+
start: { line: idx + 1, column: 0 },
|
|
215
|
+
end: { line: idx + 1, column: line.length },
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// Extract from __all__
|
|
221
|
+
const allMatch = line.match(allRegex);
|
|
222
|
+
if (allMatch) {
|
|
223
|
+
const names = allMatch[1]
|
|
224
|
+
.split(',')
|
|
225
|
+
.map((n) => n.trim().replace(/['"]/g, ''));
|
|
226
|
+
names.forEach((name) => {
|
|
227
|
+
if (name && !exports.find((e) => e.name === name)) {
|
|
228
|
+
exports.push({
|
|
229
|
+
name,
|
|
230
|
+
type: 'variable',
|
|
231
|
+
loc: {
|
|
232
|
+
start: { line: idx + 1, column: 0 },
|
|
233
|
+
end: { line: idx + 1, column: line.length },
|
|
234
|
+
},
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
237
|
});
|
|
238
|
-
|
|
239
|
-
}
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
return exports;
|
|
241
|
+
}
|
|
240
242
|
}
|
|
241
|
-
//# sourceMappingURL=python-parser.js.map
|
|
243
|
+
//# sourceMappingURL=python-parser.js.map
|
|
@@ -3,15 +3,20 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Parses TypeScript and JavaScript files using @typescript-eslint/typescript-estree
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Language,
|
|
8
|
+
LanguageParser,
|
|
9
|
+
ParseResult,
|
|
10
|
+
NamingConvention,
|
|
11
|
+
} from '../types/language';
|
|
7
12
|
export declare class TypeScriptParser implements LanguageParser {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
readonly language = Language.TypeScript;
|
|
14
|
+
readonly extensions: string[];
|
|
15
|
+
parse(code: string, filePath: string): ParseResult;
|
|
16
|
+
getNamingConventions(): NamingConvention;
|
|
17
|
+
canHandle(filePath: string): boolean;
|
|
18
|
+
private extractImports;
|
|
19
|
+
private extractExports;
|
|
20
|
+
private extractFromDeclaration;
|
|
16
21
|
}
|
|
17
|
-
//# sourceMappingURL=typescript-parser.d.ts.map
|
|
22
|
+
//# sourceMappingURL=typescript-parser.d.ts.map
|