driftdetect-core 0.3.0 → 0.4.0
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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/parsers/tree-sitter/index.d.ts +5 -0
- package/dist/parsers/tree-sitter/index.d.ts.map +1 -1
- package/dist/parsers/tree-sitter/index.js +16 -0
- package/dist/parsers/tree-sitter/index.js.map +1 -1
- package/dist/parsers/tree-sitter/java-loader.d.ts +50 -0
- package/dist/parsers/tree-sitter/java-loader.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/java-loader.js +161 -0
- package/dist/parsers/tree-sitter/java-loader.js.map +1 -0
- package/dist/parsers/tree-sitter/php-loader.d.ts +50 -0
- package/dist/parsers/tree-sitter/php-loader.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/php-loader.js +164 -0
- package/dist/parsers/tree-sitter/php-loader.js.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-java-parser.d.ts +90 -0
- package/dist/parsers/tree-sitter/tree-sitter-java-parser.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-java-parser.js +298 -0
- package/dist/parsers/tree-sitter/tree-sitter-java-parser.js.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-php-parser.d.ts +177 -0
- package/dist/parsers/tree-sitter/tree-sitter-php-parser.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-php-parser.js +585 -0
- package/dist/parsers/tree-sitter/tree-sitter-php-parser.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree-sitter PHP Parser
|
|
3
|
+
*
|
|
4
|
+
* Full PHP parser using tree-sitter-php for semantic extraction.
|
|
5
|
+
* Extracts namespaces, use statements, classes, interfaces, traits,
|
|
6
|
+
* enums, methods, properties, and attributes from PHP source files.
|
|
7
|
+
*
|
|
8
|
+
* Supports PHP 8+ features including attributes, enums, and readonly properties.
|
|
9
|
+
*
|
|
10
|
+
* @requirements PHP/Laravel Language Support
|
|
11
|
+
*/
|
|
12
|
+
import { isPhpTreeSitterAvailable, createPhpParser, getPhpLoadingError, } from './php-loader.js';
|
|
13
|
+
// ============================================
|
|
14
|
+
// Parser Class
|
|
15
|
+
// ============================================
|
|
16
|
+
/**
|
|
17
|
+
* PHP parser using tree-sitter-php.
|
|
18
|
+
*/
|
|
19
|
+
export class TreeSitterPhpParser {
|
|
20
|
+
parser = null;
|
|
21
|
+
initError = null;
|
|
22
|
+
/**
|
|
23
|
+
* Check if the parser is available.
|
|
24
|
+
*/
|
|
25
|
+
isAvailable() {
|
|
26
|
+
return isPhpTreeSitterAvailable();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get the initialization error if parser is not available.
|
|
30
|
+
*/
|
|
31
|
+
getError() {
|
|
32
|
+
return this.initError ?? getPhpLoadingError();
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Initialize the parser.
|
|
36
|
+
*/
|
|
37
|
+
initialize() {
|
|
38
|
+
if (this.parser) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
if (!isPhpTreeSitterAvailable()) {
|
|
42
|
+
this.initError = getPhpLoadingError() ?? 'tree-sitter-php not available';
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
this.parser = createPhpParser();
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
this.initError = error instanceof Error ? error.message : 'Failed to create PHP parser';
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Parse PHP source code and extract semantic information.
|
|
56
|
+
*/
|
|
57
|
+
parse(source, _filePath) {
|
|
58
|
+
if (!this.parser && !this.initialize()) {
|
|
59
|
+
return this.createErrorResult(this.initError ?? 'Parser not initialized');
|
|
60
|
+
}
|
|
61
|
+
if (!this.parser) {
|
|
62
|
+
return this.createErrorResult('Parser not available');
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
const tree = this.parser.parse(source);
|
|
66
|
+
const rootNode = tree.rootNode;
|
|
67
|
+
// Extract semantic information
|
|
68
|
+
const namespace = this.extractNamespace(rootNode);
|
|
69
|
+
const useStatements = this.extractUseStatements(rootNode);
|
|
70
|
+
const namespaceName = namespace?.name ?? null;
|
|
71
|
+
const classes = this.extractClasses(rootNode, namespaceName);
|
|
72
|
+
const interfaces = this.extractInterfaces(rootNode, namespaceName);
|
|
73
|
+
const traits = this.extractTraits(rootNode, namespaceName);
|
|
74
|
+
const enums = this.extractEnums(rootNode, namespaceName);
|
|
75
|
+
const ast = this.convertToAST(rootNode, source);
|
|
76
|
+
return {
|
|
77
|
+
success: true,
|
|
78
|
+
language: 'php',
|
|
79
|
+
ast,
|
|
80
|
+
errors: [],
|
|
81
|
+
namespace,
|
|
82
|
+
useStatements,
|
|
83
|
+
classes,
|
|
84
|
+
interfaces,
|
|
85
|
+
traits,
|
|
86
|
+
enums,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
return this.createErrorResult(error instanceof Error ? error.message : 'Parse error');
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// ============================================
|
|
94
|
+
// Extraction Methods
|
|
95
|
+
// ============================================
|
|
96
|
+
extractNamespace(root) {
|
|
97
|
+
const nsNode = this.findChildByType(root, 'namespace_definition');
|
|
98
|
+
if (!nsNode)
|
|
99
|
+
return null;
|
|
100
|
+
const nameNode = this.findChildByType(nsNode, 'namespace_name') ??
|
|
101
|
+
this.findChildByType(nsNode, 'qualified_name');
|
|
102
|
+
if (!nameNode)
|
|
103
|
+
return null;
|
|
104
|
+
return {
|
|
105
|
+
name: nameNode.text,
|
|
106
|
+
startPosition: this.toPosition(nsNode.startPosition),
|
|
107
|
+
endPosition: this.toPosition(nsNode.endPosition),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
extractUseStatements(root) {
|
|
111
|
+
const statements = [];
|
|
112
|
+
this.findNodesOfType(root, 'namespace_use_declaration', (node) => {
|
|
113
|
+
const useClause = this.findChildByType(node, 'namespace_use_clause');
|
|
114
|
+
if (!useClause)
|
|
115
|
+
return;
|
|
116
|
+
const nameNode = this.findChildByType(useClause, 'qualified_name') ??
|
|
117
|
+
this.findChildByType(useClause, 'namespace_name');
|
|
118
|
+
if (!nameNode)
|
|
119
|
+
return;
|
|
120
|
+
const aliasNode = this.findChildByType(useClause, 'namespace_aliasing_clause');
|
|
121
|
+
const alias = aliasNode ? this.findChildByType(aliasNode, 'name')?.text ?? null : null;
|
|
122
|
+
// Determine type (class, function, const)
|
|
123
|
+
let type = 'class';
|
|
124
|
+
for (const child of node.children) {
|
|
125
|
+
if (child.text === 'function')
|
|
126
|
+
type = 'function';
|
|
127
|
+
else if (child.text === 'const')
|
|
128
|
+
type = 'const';
|
|
129
|
+
}
|
|
130
|
+
statements.push({
|
|
131
|
+
fqn: nameNode.text,
|
|
132
|
+
alias,
|
|
133
|
+
type,
|
|
134
|
+
startPosition: this.toPosition(node.startPosition),
|
|
135
|
+
endPosition: this.toPosition(node.endPosition),
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
return statements;
|
|
139
|
+
}
|
|
140
|
+
extractClasses(root, namespace) {
|
|
141
|
+
const classes = [];
|
|
142
|
+
this.findNodesOfType(root, 'class_declaration', (node) => {
|
|
143
|
+
const classInfo = this.parseClass(node, namespace);
|
|
144
|
+
if (classInfo)
|
|
145
|
+
classes.push(classInfo);
|
|
146
|
+
});
|
|
147
|
+
return classes;
|
|
148
|
+
}
|
|
149
|
+
parseClass(node, namespace) {
|
|
150
|
+
const nameNode = this.findChildByType(node, 'name');
|
|
151
|
+
if (!nameNode)
|
|
152
|
+
return null;
|
|
153
|
+
const name = nameNode.text;
|
|
154
|
+
const fqn = namespace ? `${namespace}\\${name}` : name;
|
|
155
|
+
// Extract modifiers
|
|
156
|
+
let isAbstract = false;
|
|
157
|
+
let isFinal = false;
|
|
158
|
+
let isReadonly = false;
|
|
159
|
+
for (const child of node.children) {
|
|
160
|
+
if (child.type === 'abstract_modifier')
|
|
161
|
+
isAbstract = true;
|
|
162
|
+
if (child.type === 'final_modifier')
|
|
163
|
+
isFinal = true;
|
|
164
|
+
if (child.type === 'readonly_modifier')
|
|
165
|
+
isReadonly = true;
|
|
166
|
+
}
|
|
167
|
+
// Extract extends
|
|
168
|
+
let extendsClass = null;
|
|
169
|
+
const extendsNode = this.findChildByType(node, 'base_clause');
|
|
170
|
+
if (extendsNode) {
|
|
171
|
+
const extName = this.findChildByType(extendsNode, 'qualified_name') ??
|
|
172
|
+
this.findChildByType(extendsNode, 'name');
|
|
173
|
+
extendsClass = extName?.text ?? null;
|
|
174
|
+
}
|
|
175
|
+
// Extract implements
|
|
176
|
+
const implementsList = [];
|
|
177
|
+
const implementsNode = this.findChildByType(node, 'class_interface_clause');
|
|
178
|
+
if (implementsNode) {
|
|
179
|
+
this.findNodesOfType(implementsNode, 'qualified_name', (n) => {
|
|
180
|
+
implementsList.push(n.text);
|
|
181
|
+
});
|
|
182
|
+
this.findNodesOfType(implementsNode, 'name', (n) => {
|
|
183
|
+
if (!implementsList.includes(n.text)) {
|
|
184
|
+
implementsList.push(n.text);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
// Extract body
|
|
189
|
+
const bodyNode = this.findChildByType(node, 'declaration_list');
|
|
190
|
+
const { properties, methods, traits } = bodyNode
|
|
191
|
+
? this.extractClassBody(bodyNode)
|
|
192
|
+
: { properties: [], methods: [], traits: [] };
|
|
193
|
+
// Extract attributes
|
|
194
|
+
const attributes = this.extractAttributes(node);
|
|
195
|
+
return {
|
|
196
|
+
name,
|
|
197
|
+
fqn,
|
|
198
|
+
namespace,
|
|
199
|
+
extends: extendsClass,
|
|
200
|
+
implements: implementsList,
|
|
201
|
+
traits,
|
|
202
|
+
isAbstract,
|
|
203
|
+
isFinal,
|
|
204
|
+
isReadonly,
|
|
205
|
+
properties,
|
|
206
|
+
methods,
|
|
207
|
+
attributes,
|
|
208
|
+
startPosition: this.toPosition(node.startPosition),
|
|
209
|
+
endPosition: this.toPosition(node.endPosition),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
extractClassBody(bodyNode) {
|
|
213
|
+
const properties = [];
|
|
214
|
+
const methods = [];
|
|
215
|
+
const traits = [];
|
|
216
|
+
for (const child of bodyNode.children) {
|
|
217
|
+
if (child.type === 'property_declaration') {
|
|
218
|
+
const prop = this.parseProperty(child);
|
|
219
|
+
if (prop)
|
|
220
|
+
properties.push(prop);
|
|
221
|
+
}
|
|
222
|
+
else if (child.type === 'method_declaration') {
|
|
223
|
+
const method = this.parseMethod(child);
|
|
224
|
+
if (method)
|
|
225
|
+
methods.push(method);
|
|
226
|
+
}
|
|
227
|
+
else if (child.type === 'use_declaration') {
|
|
228
|
+
// Trait use
|
|
229
|
+
this.findNodesOfType(child, 'qualified_name', (n) => traits.push(n.text));
|
|
230
|
+
this.findNodesOfType(child, 'name', (n) => {
|
|
231
|
+
if (!traits.includes(n.text))
|
|
232
|
+
traits.push(n.text);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return { properties, methods, traits };
|
|
237
|
+
}
|
|
238
|
+
parseProperty(node) {
|
|
239
|
+
// Extract visibility and modifiers
|
|
240
|
+
let visibility = 'public';
|
|
241
|
+
let isStatic = false;
|
|
242
|
+
let isReadonly = false;
|
|
243
|
+
for (const child of node.children) {
|
|
244
|
+
if (child.type === 'visibility_modifier') {
|
|
245
|
+
visibility = child.text;
|
|
246
|
+
}
|
|
247
|
+
if (child.type === 'static_modifier')
|
|
248
|
+
isStatic = true;
|
|
249
|
+
if (child.type === 'readonly_modifier')
|
|
250
|
+
isReadonly = true;
|
|
251
|
+
}
|
|
252
|
+
// Extract type
|
|
253
|
+
const typeNode = this.findChildByType(node, 'type');
|
|
254
|
+
const type = typeNode?.text ?? null;
|
|
255
|
+
// Extract property element
|
|
256
|
+
const propElement = this.findChildByType(node, 'property_element');
|
|
257
|
+
if (!propElement)
|
|
258
|
+
return null;
|
|
259
|
+
const varNode = this.findChildByType(propElement, 'variable_name');
|
|
260
|
+
if (!varNode)
|
|
261
|
+
return null;
|
|
262
|
+
const name = varNode.text.replace(/^\$/, '');
|
|
263
|
+
// Extract default value
|
|
264
|
+
const initNode = this.findChildByType(propElement, 'property_initializer');
|
|
265
|
+
const defaultValue = initNode?.text ?? null;
|
|
266
|
+
const attributes = this.extractAttributes(node);
|
|
267
|
+
return {
|
|
268
|
+
name,
|
|
269
|
+
visibility,
|
|
270
|
+
isStatic,
|
|
271
|
+
isReadonly,
|
|
272
|
+
type,
|
|
273
|
+
defaultValue,
|
|
274
|
+
attributes,
|
|
275
|
+
startPosition: this.toPosition(node.startPosition),
|
|
276
|
+
endPosition: this.toPosition(node.endPosition),
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
parseMethod(node) {
|
|
280
|
+
const nameNode = this.findChildByType(node, 'name');
|
|
281
|
+
if (!nameNode)
|
|
282
|
+
return null;
|
|
283
|
+
let visibility = 'public';
|
|
284
|
+
let isStatic = false;
|
|
285
|
+
let isAbstract = false;
|
|
286
|
+
let isFinal = false;
|
|
287
|
+
for (const child of node.children) {
|
|
288
|
+
if (child.type === 'visibility_modifier') {
|
|
289
|
+
visibility = child.text;
|
|
290
|
+
}
|
|
291
|
+
if (child.type === 'static_modifier')
|
|
292
|
+
isStatic = true;
|
|
293
|
+
if (child.type === 'abstract_modifier')
|
|
294
|
+
isAbstract = true;
|
|
295
|
+
if (child.type === 'final_modifier')
|
|
296
|
+
isFinal = true;
|
|
297
|
+
}
|
|
298
|
+
// Extract parameters
|
|
299
|
+
const paramsNode = this.findChildByType(node, 'formal_parameters');
|
|
300
|
+
const parameters = paramsNode ? this.extractParameters(paramsNode) : [];
|
|
301
|
+
// Extract return type
|
|
302
|
+
const returnTypeNode = this.findChildByType(node, 'return_type');
|
|
303
|
+
const returnType = returnTypeNode?.text?.replace(/^:\s*/, '') ?? null;
|
|
304
|
+
const attributes = this.extractAttributes(node);
|
|
305
|
+
return {
|
|
306
|
+
name: nameNode.text,
|
|
307
|
+
visibility,
|
|
308
|
+
isStatic,
|
|
309
|
+
isAbstract,
|
|
310
|
+
isFinal,
|
|
311
|
+
parameters,
|
|
312
|
+
returnType,
|
|
313
|
+
attributes,
|
|
314
|
+
startPosition: this.toPosition(node.startPosition),
|
|
315
|
+
endPosition: this.toPosition(node.endPosition),
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
extractParameters(paramsNode) {
|
|
319
|
+
const params = [];
|
|
320
|
+
for (const child of paramsNode.children) {
|
|
321
|
+
if (child.type === 'simple_parameter' || child.type === 'property_promotion_parameter') {
|
|
322
|
+
const param = this.parseParameter(child);
|
|
323
|
+
if (param)
|
|
324
|
+
params.push(param);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return params;
|
|
328
|
+
}
|
|
329
|
+
parseParameter(node) {
|
|
330
|
+
const varNode = this.findChildByType(node, 'variable_name');
|
|
331
|
+
if (!varNode)
|
|
332
|
+
return null;
|
|
333
|
+
const name = varNode.text.replace(/^\$/, '');
|
|
334
|
+
// Type
|
|
335
|
+
const typeNode = this.findChildByType(node, 'type');
|
|
336
|
+
const type = typeNode?.text ?? null;
|
|
337
|
+
// Default value
|
|
338
|
+
const defaultNode = this.findChildByType(node, 'default_value');
|
|
339
|
+
const defaultValue = defaultNode?.text?.replace(/^=\s*/, '') ?? null;
|
|
340
|
+
// Modifiers
|
|
341
|
+
let isVariadic = false;
|
|
342
|
+
let isByReference = false;
|
|
343
|
+
let isPromoted = node.type === 'property_promotion_parameter';
|
|
344
|
+
let visibility = null;
|
|
345
|
+
for (const child of node.children) {
|
|
346
|
+
if (child.type === 'variadic_parameter')
|
|
347
|
+
isVariadic = true;
|
|
348
|
+
if (child.type === 'reference_modifier')
|
|
349
|
+
isByReference = true;
|
|
350
|
+
if (child.type === 'visibility_modifier') {
|
|
351
|
+
visibility = child.text;
|
|
352
|
+
isPromoted = true;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
const attributes = this.extractAttributes(node);
|
|
356
|
+
return {
|
|
357
|
+
name,
|
|
358
|
+
type,
|
|
359
|
+
defaultValue,
|
|
360
|
+
isVariadic,
|
|
361
|
+
isByReference,
|
|
362
|
+
isPromoted,
|
|
363
|
+
visibility,
|
|
364
|
+
attributes,
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
extractInterfaces(root, namespace) {
|
|
368
|
+
const interfaces = [];
|
|
369
|
+
this.findNodesOfType(root, 'interface_declaration', (node) => {
|
|
370
|
+
const nameNode = this.findChildByType(node, 'name');
|
|
371
|
+
if (!nameNode)
|
|
372
|
+
return;
|
|
373
|
+
const name = nameNode.text;
|
|
374
|
+
const fqn = namespace ? `${namespace}\\${name}` : name;
|
|
375
|
+
// Extract extends
|
|
376
|
+
const extendsList = [];
|
|
377
|
+
const extendsNode = this.findChildByType(node, 'base_clause');
|
|
378
|
+
if (extendsNode) {
|
|
379
|
+
this.findNodesOfType(extendsNode, 'qualified_name', (n) => extendsList.push(n.text));
|
|
380
|
+
this.findNodesOfType(extendsNode, 'name', (n) => {
|
|
381
|
+
if (!extendsList.includes(n.text))
|
|
382
|
+
extendsList.push(n.text);
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
// Extract methods
|
|
386
|
+
const bodyNode = this.findChildByType(node, 'declaration_list');
|
|
387
|
+
const methods = [];
|
|
388
|
+
if (bodyNode) {
|
|
389
|
+
for (const child of bodyNode.children) {
|
|
390
|
+
if (child.type === 'method_declaration') {
|
|
391
|
+
const method = this.parseMethod(child);
|
|
392
|
+
if (method)
|
|
393
|
+
methods.push(method);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
interfaces.push({
|
|
398
|
+
name,
|
|
399
|
+
fqn,
|
|
400
|
+
namespace,
|
|
401
|
+
extends: extendsList,
|
|
402
|
+
methods,
|
|
403
|
+
attributes: this.extractAttributes(node),
|
|
404
|
+
startPosition: this.toPosition(node.startPosition),
|
|
405
|
+
endPosition: this.toPosition(node.endPosition),
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
return interfaces;
|
|
409
|
+
}
|
|
410
|
+
extractTraits(root, namespace) {
|
|
411
|
+
const traits = [];
|
|
412
|
+
this.findNodesOfType(root, 'trait_declaration', (node) => {
|
|
413
|
+
const nameNode = this.findChildByType(node, 'name');
|
|
414
|
+
if (!nameNode)
|
|
415
|
+
return;
|
|
416
|
+
const name = nameNode.text;
|
|
417
|
+
const fqn = namespace ? `${namespace}\\${name}` : name;
|
|
418
|
+
const bodyNode = this.findChildByType(node, 'declaration_list');
|
|
419
|
+
const bodyResult = bodyNode
|
|
420
|
+
? this.extractClassBody(bodyNode)
|
|
421
|
+
: { properties: [], methods: [], traits: [] };
|
|
422
|
+
traits.push({
|
|
423
|
+
name,
|
|
424
|
+
fqn,
|
|
425
|
+
namespace,
|
|
426
|
+
properties: bodyResult.properties,
|
|
427
|
+
methods: bodyResult.methods,
|
|
428
|
+
attributes: this.extractAttributes(node),
|
|
429
|
+
startPosition: this.toPosition(node.startPosition),
|
|
430
|
+
endPosition: this.toPosition(node.endPosition),
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
return traits;
|
|
434
|
+
}
|
|
435
|
+
extractEnums(root, namespace) {
|
|
436
|
+
const enums = [];
|
|
437
|
+
this.findNodesOfType(root, 'enum_declaration', (node) => {
|
|
438
|
+
const nameNode = this.findChildByType(node, 'name');
|
|
439
|
+
if (!nameNode)
|
|
440
|
+
return;
|
|
441
|
+
const name = nameNode.text;
|
|
442
|
+
const fqn = namespace ? `${namespace}\\${name}` : name;
|
|
443
|
+
// Backing type
|
|
444
|
+
let backingType = null;
|
|
445
|
+
const backingNode = this.findChildByType(node, 'enum_declaration_list');
|
|
446
|
+
if (backingNode) {
|
|
447
|
+
const typeNode = this.findChildByType(backingNode, 'primitive_type');
|
|
448
|
+
if (typeNode?.text === 'string')
|
|
449
|
+
backingType = 'string';
|
|
450
|
+
else if (typeNode?.text === 'int')
|
|
451
|
+
backingType = 'int';
|
|
452
|
+
}
|
|
453
|
+
// Implements
|
|
454
|
+
const implementsList = [];
|
|
455
|
+
const implementsNode = this.findChildByType(node, 'class_interface_clause');
|
|
456
|
+
if (implementsNode) {
|
|
457
|
+
this.findNodesOfType(implementsNode, 'qualified_name', (n) => implementsList.push(n.text));
|
|
458
|
+
}
|
|
459
|
+
// Cases and methods
|
|
460
|
+
const cases = [];
|
|
461
|
+
const methods = [];
|
|
462
|
+
const bodyNode = this.findChildByType(node, 'enum_declaration_list') ??
|
|
463
|
+
this.findChildByType(node, 'declaration_list');
|
|
464
|
+
if (bodyNode) {
|
|
465
|
+
for (const child of bodyNode.children) {
|
|
466
|
+
if (child.type === 'enum_case') {
|
|
467
|
+
const caseNameNode = this.findChildByType(child, 'name');
|
|
468
|
+
const caseValueNode = this.findChildByType(child, 'integer') ??
|
|
469
|
+
this.findChildByType(child, 'string');
|
|
470
|
+
if (caseNameNode) {
|
|
471
|
+
cases.push({
|
|
472
|
+
name: caseNameNode.text,
|
|
473
|
+
value: caseValueNode?.text ?? null,
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
else if (child.type === 'method_declaration') {
|
|
478
|
+
const method = this.parseMethod(child);
|
|
479
|
+
if (method)
|
|
480
|
+
methods.push(method);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
enums.push({
|
|
485
|
+
name,
|
|
486
|
+
fqn,
|
|
487
|
+
namespace,
|
|
488
|
+
backingType,
|
|
489
|
+
implements: implementsList,
|
|
490
|
+
cases,
|
|
491
|
+
methods,
|
|
492
|
+
attributes: this.extractAttributes(node),
|
|
493
|
+
startPosition: this.toPosition(node.startPosition),
|
|
494
|
+
endPosition: this.toPosition(node.endPosition),
|
|
495
|
+
});
|
|
496
|
+
});
|
|
497
|
+
return enums;
|
|
498
|
+
}
|
|
499
|
+
extractAttributes(node) {
|
|
500
|
+
const attributes = [];
|
|
501
|
+
// Look for attribute_list nodes before the declaration
|
|
502
|
+
for (const child of node.children) {
|
|
503
|
+
if (child.type === 'attribute_list' || child.type === 'attribute_group') {
|
|
504
|
+
this.findNodesOfType(child, 'attribute', (attrNode) => {
|
|
505
|
+
const nameNode = this.findChildByType(attrNode, 'qualified_name') ??
|
|
506
|
+
this.findChildByType(attrNode, 'name');
|
|
507
|
+
if (!nameNode)
|
|
508
|
+
return;
|
|
509
|
+
const args = [];
|
|
510
|
+
const argsNode = this.findChildByType(attrNode, 'arguments');
|
|
511
|
+
if (argsNode) {
|
|
512
|
+
for (const argChild of argsNode.children) {
|
|
513
|
+
if (argChild.type === 'argument') {
|
|
514
|
+
args.push(argChild.text);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
attributes.push({
|
|
519
|
+
name: nameNode.text.split('\\').pop() ?? nameNode.text,
|
|
520
|
+
fqn: nameNode.text.includes('\\') ? nameNode.text : null,
|
|
521
|
+
arguments: args,
|
|
522
|
+
startPosition: this.toPosition(attrNode.startPosition),
|
|
523
|
+
endPosition: this.toPosition(attrNode.endPosition),
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
return attributes;
|
|
529
|
+
}
|
|
530
|
+
// ============================================
|
|
531
|
+
// Utility Methods
|
|
532
|
+
// ============================================
|
|
533
|
+
convertToAST(node, source) {
|
|
534
|
+
const rootNode = this.convertNode(node);
|
|
535
|
+
return {
|
|
536
|
+
rootNode,
|
|
537
|
+
text: source,
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
convertNode(node) {
|
|
541
|
+
const children = [];
|
|
542
|
+
for (const child of node.children) {
|
|
543
|
+
children.push(this.convertNode(child));
|
|
544
|
+
}
|
|
545
|
+
return {
|
|
546
|
+
type: node.type,
|
|
547
|
+
text: node.text,
|
|
548
|
+
children,
|
|
549
|
+
startPosition: this.toPosition(node.startPosition),
|
|
550
|
+
endPosition: this.toPosition(node.endPosition),
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
toPosition(point) {
|
|
554
|
+
return { row: point.row, column: point.column };
|
|
555
|
+
}
|
|
556
|
+
findChildByType(node, type) {
|
|
557
|
+
for (const child of node.children) {
|
|
558
|
+
if (child.type === type)
|
|
559
|
+
return child;
|
|
560
|
+
}
|
|
561
|
+
return null;
|
|
562
|
+
}
|
|
563
|
+
findNodesOfType(node, type, callback) {
|
|
564
|
+
if (node.type === type)
|
|
565
|
+
callback(node);
|
|
566
|
+
for (const child of node.children) {
|
|
567
|
+
this.findNodesOfType(child, type, callback);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
createErrorResult(message) {
|
|
571
|
+
return {
|
|
572
|
+
success: false,
|
|
573
|
+
language: 'php',
|
|
574
|
+
ast: null,
|
|
575
|
+
errors: [{ message, position: { row: 0, column: 0 } }],
|
|
576
|
+
namespace: null,
|
|
577
|
+
useStatements: [],
|
|
578
|
+
classes: [],
|
|
579
|
+
interfaces: [],
|
|
580
|
+
traits: [],
|
|
581
|
+
enums: [],
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
//# sourceMappingURL=tree-sitter-php-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-sitter-php-parser.js","sourceRoot":"","sources":["../../../src/parsers/tree-sitter/tree-sitter-php-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAwIzB,+CAA+C;AAC/C,eAAe;AACf,+CAA+C;AAE/C;;GAEG;AACH,MAAM,OAAO,mBAAmB;IACt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C,QAAQ,EAAE,CAAC;YAClC,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAEO,iBAAiB,CAAC,OAAe;QACvC,OAAO;YACL,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,KAAK;YACf,GAAG,EAAE,IAAI;YACT,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtD,SAAS,EAAE,IAAI;YACf,aAAa,EAAE,EAAE;YACjB,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "driftdetect-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Core pattern detection and analysis engine for Drift",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
"typescript": "^5.3.0"
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
|
-
"tree-sitter-python": "^0.21.0"
|
|
46
|
+
"tree-sitter-python": "^0.21.0",
|
|
47
|
+
"tree-sitter-java": "^0.21.0",
|
|
48
|
+
"tree-sitter-php": "^0.22.0"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
51
|
"@types/minimatch": "^5.1.2",
|