gitnexus 1.3.3 → 1.3.4
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/cli/ai-context.js +23 -52
- package/dist/cli/analyze.js +4 -1
- package/dist/cli/index.js +1 -0
- package/dist/cli/mcp.js +11 -22
- package/dist/cli/serve.d.ts +1 -0
- package/dist/cli/serve.js +2 -1
- package/dist/cli/setup.js +2 -2
- package/dist/cli/wiki.js +6 -2
- package/dist/config/supported-languages.d.ts +2 -1
- package/dist/config/supported-languages.js +1 -1
- package/dist/core/embeddings/embedder.js +40 -1
- package/dist/core/graph/types.d.ts +2 -0
- package/dist/core/ingestion/entry-point-scoring.js +26 -1
- package/dist/core/ingestion/framework-detection.d.ts +12 -4
- package/dist/core/ingestion/framework-detection.js +105 -5
- package/dist/core/ingestion/import-processor.js +77 -0
- package/dist/core/ingestion/parsing-processor.js +50 -8
- package/dist/core/ingestion/process-processor.js +7 -1
- package/dist/core/ingestion/tree-sitter-queries.d.ts +1 -0
- package/dist/core/ingestion/tree-sitter-queries.js +361 -282
- package/dist/core/ingestion/utils.js +6 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +3 -0
- package/dist/core/ingestion/workers/parse-worker.js +191 -0
- package/dist/core/kuzu/csv-generator.js +4 -2
- package/dist/core/kuzu/kuzu-adapter.d.ts +9 -0
- package/dist/core/kuzu/kuzu-adapter.js +68 -9
- package/dist/core/kuzu/schema.d.ts +6 -6
- package/dist/core/kuzu/schema.js +8 -0
- package/dist/core/tree-sitter/parser-loader.js +2 -0
- package/dist/core/wiki/generator.js +2 -2
- package/dist/mcp/local/local-backend.js +25 -13
- package/dist/mcp/server.d.ts +9 -0
- package/dist/mcp/server.js +13 -2
- package/dist/mcp/staleness.js +2 -2
- package/dist/server/api.d.ts +7 -5
- package/dist/server/api.js +145 -127
- package/dist/server/mcp-http.d.ts +13 -0
- package/dist/server/mcp-http.js +100 -0
- package/package.json +2 -1
- package/skills/gitnexus-cli.md +82 -0
- package/skills/{debugging.md → gitnexus-debugging.md} +12 -8
- package/skills/{exploring.md → gitnexus-exploring.md} +10 -7
- package/skills/gitnexus-guide.md +64 -0
- package/skills/{impact-analysis.md → gitnexus-impact-analysis.md} +14 -11
- package/skills/{refactoring.md → gitnexus-refactoring.md} +15 -7
|
@@ -78,6 +78,29 @@ async function loadGoModulePath(repoRoot) {
|
|
|
78
78
|
}
|
|
79
79
|
return null;
|
|
80
80
|
}
|
|
81
|
+
async function loadComposerConfig(repoRoot) {
|
|
82
|
+
try {
|
|
83
|
+
const composerPath = path.join(repoRoot, 'composer.json');
|
|
84
|
+
const raw = await fs.readFile(composerPath, 'utf-8');
|
|
85
|
+
const composer = JSON.parse(raw);
|
|
86
|
+
const psr4Raw = composer.autoload?.['psr-4'] ?? {};
|
|
87
|
+
const psr4Dev = composer['autoload-dev']?.['psr-4'] ?? {};
|
|
88
|
+
const merged = { ...psr4Raw, ...psr4Dev };
|
|
89
|
+
const psr4 = new Map();
|
|
90
|
+
for (const [ns, dir] of Object.entries(merged)) {
|
|
91
|
+
const nsNorm = ns.replace(/\\+$/, '');
|
|
92
|
+
const dirNorm = dir.replace(/\\/g, '/').replace(/\/+$/, '');
|
|
93
|
+
psr4.set(nsNorm, dirNorm);
|
|
94
|
+
}
|
|
95
|
+
if (isDev) {
|
|
96
|
+
console.log(`📦 Loaded ${psr4.size} PSR-4 mappings from composer.json`);
|
|
97
|
+
}
|
|
98
|
+
return { psr4 };
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
81
104
|
// ============================================================================
|
|
82
105
|
// IMPORT PATH RESOLUTION
|
|
83
106
|
// ============================================================================
|
|
@@ -98,6 +121,8 @@ const EXTENSIONS = [
|
|
|
98
121
|
'.go',
|
|
99
122
|
// Rust
|
|
100
123
|
'.rs', '/mod.rs',
|
|
124
|
+
// PHP
|
|
125
|
+
'.php', '.phtml',
|
|
101
126
|
];
|
|
102
127
|
/**
|
|
103
128
|
* Try to match a path (with extensions) against the known file set.
|
|
@@ -447,6 +472,39 @@ function resolveGoPackage(importPath, goModule, normalizedFileList, allFileList)
|
|
|
447
472
|
return matches;
|
|
448
473
|
}
|
|
449
474
|
// ============================================================================
|
|
475
|
+
// PHP PSR-4 IMPORT RESOLUTION
|
|
476
|
+
// ============================================================================
|
|
477
|
+
/**
|
|
478
|
+
* Resolve a PHP use-statement import path using PSR-4 mappings.
|
|
479
|
+
* e.g. "App\Http\Controllers\UserController" -> "app/Http/Controllers/UserController.php"
|
|
480
|
+
*/
|
|
481
|
+
function resolvePhpImport(importPath, composerConfig, allFiles, normalizedFileList, allFileList, index) {
|
|
482
|
+
// Normalize: replace backslashes with forward slashes
|
|
483
|
+
const normalized = importPath.replace(/\\/g, '/');
|
|
484
|
+
// Try PSR-4 resolution if composer.json was found
|
|
485
|
+
if (composerConfig) {
|
|
486
|
+
// Sort namespaces by length descending (longest match wins)
|
|
487
|
+
const sorted = [...composerConfig.psr4.entries()].sort((a, b) => b[0].length - a[0].length);
|
|
488
|
+
for (const [nsPrefix, dirPrefix] of sorted) {
|
|
489
|
+
const nsPrefixSlash = nsPrefix.replace(/\\/g, '/');
|
|
490
|
+
if (normalized.startsWith(nsPrefixSlash + '/') || normalized === nsPrefixSlash) {
|
|
491
|
+
const remainder = normalized.slice(nsPrefixSlash.length).replace(/^\//, '');
|
|
492
|
+
const filePath = dirPrefix + (remainder ? '/' + remainder : '') + '.php';
|
|
493
|
+
if (allFiles.has(filePath))
|
|
494
|
+
return filePath;
|
|
495
|
+
if (index) {
|
|
496
|
+
const result = index.getInsensitive(filePath);
|
|
497
|
+
if (result)
|
|
498
|
+
return result;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
// Fallback: suffix matching (works without composer.json)
|
|
504
|
+
const pathParts = normalized.split('/').filter(Boolean);
|
|
505
|
+
return suffixResolve(pathParts, normalizedFileList, allFileList, index);
|
|
506
|
+
}
|
|
507
|
+
// ============================================================================
|
|
450
508
|
// MAIN IMPORT PROCESSOR
|
|
451
509
|
// ============================================================================
|
|
452
510
|
export const processImports = async (graph, files, astCache, importMap, onProgress, repoRoot, allPaths) => {
|
|
@@ -466,6 +524,7 @@ export const processImports = async (graph, files, astCache, importMap, onProgre
|
|
|
466
524
|
const effectiveRoot = repoRoot || '';
|
|
467
525
|
const tsconfigPaths = await loadTsconfigPaths(effectiveRoot);
|
|
468
526
|
const goModule = await loadGoModulePath(effectiveRoot);
|
|
527
|
+
const composerConfig = await loadComposerConfig(effectiveRoot);
|
|
469
528
|
// Helper: add an IMPORTS edge + update import map
|
|
470
529
|
const addImportEdge = (filePath, resolvedPath) => {
|
|
471
530
|
const sourceId = generateId('File', filePath);
|
|
@@ -577,6 +636,14 @@ export const processImports = async (graph, files, astCache, importMap, onProgre
|
|
|
577
636
|
}
|
|
578
637
|
// Fall through if no files found (package might be external)
|
|
579
638
|
}
|
|
639
|
+
// ---- PHP: handle namespace-based imports (use statements) ----
|
|
640
|
+
if (language === SupportedLanguages.PHP) {
|
|
641
|
+
const resolved = resolvePhpImport(rawImportPath, composerConfig, allFilePaths, normalizedFileList, allFileList, index);
|
|
642
|
+
if (resolved) {
|
|
643
|
+
addImportEdge(file.path, resolved);
|
|
644
|
+
}
|
|
645
|
+
return;
|
|
646
|
+
}
|
|
580
647
|
// ---- Standard single-file resolution ----
|
|
581
648
|
const resolvedPath = resolveImportPath(file.path, rawImportPath, allFilePaths, allFileList, normalizedFileList, resolveCache, language, tsconfigPaths, index);
|
|
582
649
|
if (resolvedPath) {
|
|
@@ -601,6 +668,7 @@ export const processImportsFromExtracted = async (graph, files, extractedImports
|
|
|
601
668
|
const effectiveRoot = repoRoot || '';
|
|
602
669
|
const tsconfigPaths = await loadTsconfigPaths(effectiveRoot);
|
|
603
670
|
const goModule = await loadGoModulePath(effectiveRoot);
|
|
671
|
+
const composerConfig = await loadComposerConfig(effectiveRoot);
|
|
604
672
|
const addImportEdge = (filePath, resolvedPath) => {
|
|
605
673
|
const sourceId = generateId('File', filePath);
|
|
606
674
|
const targetId = generateId('File', resolvedPath);
|
|
@@ -687,6 +755,15 @@ export const processImportsFromExtracted = async (graph, files, extractedImports
|
|
|
687
755
|
continue;
|
|
688
756
|
}
|
|
689
757
|
}
|
|
758
|
+
// PHP: handle namespace-based imports (use statements)
|
|
759
|
+
if (language === SupportedLanguages.PHP) {
|
|
760
|
+
const resolved = resolvePhpImport(rawImportPath, composerConfig, allFilePaths, normalizedFileList, allFileList, index);
|
|
761
|
+
if (resolved) {
|
|
762
|
+
resolveCache.set(cacheKey, resolved);
|
|
763
|
+
addImportEdge(filePath, resolved);
|
|
764
|
+
}
|
|
765
|
+
continue;
|
|
766
|
+
}
|
|
690
767
|
// Standard resolution (has its own internal cache)
|
|
691
768
|
const resolvedPath = resolveImportPath(filePath, rawImportPath, allFilePaths, allFileList, normalizedFileList, resolveCache, language, tsconfigPaths, index);
|
|
692
769
|
if (resolvedPath) {
|
|
@@ -3,6 +3,38 @@ import { loadParser, loadLanguage } from '../tree-sitter/parser-loader.js';
|
|
|
3
3
|
import { LANGUAGE_QUERIES } from './tree-sitter-queries.js';
|
|
4
4
|
import { generateId } from '../../lib/utils.js';
|
|
5
5
|
import { getLanguageFromFilename, yieldToEventLoop } from './utils.js';
|
|
6
|
+
import { detectFrameworkFromAST } from './framework-detection.js';
|
|
7
|
+
const getDefinitionNodeFromCaptures = (captureMap) => {
|
|
8
|
+
const definitionKeys = [
|
|
9
|
+
'definition.function',
|
|
10
|
+
'definition.class',
|
|
11
|
+
'definition.interface',
|
|
12
|
+
'definition.method',
|
|
13
|
+
'definition.struct',
|
|
14
|
+
'definition.enum',
|
|
15
|
+
'definition.namespace',
|
|
16
|
+
'definition.module',
|
|
17
|
+
'definition.trait',
|
|
18
|
+
'definition.impl',
|
|
19
|
+
'definition.type',
|
|
20
|
+
'definition.const',
|
|
21
|
+
'definition.static',
|
|
22
|
+
'definition.typedef',
|
|
23
|
+
'definition.macro',
|
|
24
|
+
'definition.union',
|
|
25
|
+
'definition.property',
|
|
26
|
+
'definition.record',
|
|
27
|
+
'definition.delegate',
|
|
28
|
+
'definition.annotation',
|
|
29
|
+
'definition.constructor',
|
|
30
|
+
'definition.template',
|
|
31
|
+
];
|
|
32
|
+
for (const key of definitionKeys) {
|
|
33
|
+
if (captureMap[key])
|
|
34
|
+
return captureMap[key];
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
};
|
|
6
38
|
// ============================================================================
|
|
7
39
|
// EXPORT DETECTION - Language-specific visibility detection
|
|
8
40
|
// ============================================================================
|
|
@@ -248,14 +280,24 @@ const processParsingSequential = async (graph, files, symbolTable, astCache, onF
|
|
|
248
280
|
const node = {
|
|
249
281
|
id: nodeId,
|
|
250
282
|
label: nodeLabel,
|
|
251
|
-
properties: {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
283
|
+
properties: (() => {
|
|
284
|
+
const definitionNode = getDefinitionNodeFromCaptures(captureMap);
|
|
285
|
+
const frameworkHint = definitionNode
|
|
286
|
+
? detectFrameworkFromAST(language, definitionNode.text || '')
|
|
287
|
+
: null;
|
|
288
|
+
return {
|
|
289
|
+
name: nodeName,
|
|
290
|
+
filePath: file.path,
|
|
291
|
+
startLine: nameNode.startPosition.row,
|
|
292
|
+
endLine: nameNode.endPosition.row,
|
|
293
|
+
language: language,
|
|
294
|
+
isExported: isNodeExported(nameNode, nodeName, language),
|
|
295
|
+
...(frameworkHint ? {
|
|
296
|
+
astFrameworkMultiplier: frameworkHint.entryPointMultiplier,
|
|
297
|
+
astFrameworkReason: frameworkHint.reason,
|
|
298
|
+
} : {}),
|
|
299
|
+
};
|
|
300
|
+
})()
|
|
259
301
|
};
|
|
260
302
|
graph.addNode(node);
|
|
261
303
|
symbolTable.add(file.path, nodeName, nodeId, nodeLabel);
|
|
@@ -178,8 +178,14 @@ const findEntryPoints = (graph, reverseCallsEdges, callsEdges) => {
|
|
|
178
178
|
if (callees.length === 0)
|
|
179
179
|
continue;
|
|
180
180
|
// Calculate entry point score using new scoring system
|
|
181
|
-
const { score, reasons } = calculateEntryPointScore(node.properties.name, node.properties.language || 'javascript', node.properties.isExported ?? false, callers.length, callees.length, filePath // Pass filePath for framework detection
|
|
181
|
+
const { score: baseScore, reasons } = calculateEntryPointScore(node.properties.name, node.properties.language || 'javascript', node.properties.isExported ?? false, callers.length, callees.length, filePath // Pass filePath for framework detection
|
|
182
182
|
);
|
|
183
|
+
let score = baseScore;
|
|
184
|
+
const astFrameworkMultiplier = node.properties.astFrameworkMultiplier ?? 1.0;
|
|
185
|
+
if (astFrameworkMultiplier > 1.0) {
|
|
186
|
+
score *= astFrameworkMultiplier;
|
|
187
|
+
reasons.push(`framework-ast:${node.properties.astFrameworkReason || 'decorator'}`);
|
|
188
|
+
}
|
|
183
189
|
if (score > 0) {
|
|
184
190
|
entryPointCandidates.push({ id: node.id, score, reasons });
|
|
185
191
|
}
|
|
@@ -8,4 +8,5 @@ export declare const GO_QUERIES = "\n; Functions & Methods\n(function_declaratio
|
|
|
8
8
|
export declare const CPP_QUERIES = "\n; Classes, Structs, Namespaces\n(class_specifier name: (type_identifier) @name) @definition.class\n(struct_specifier name: (type_identifier) @name) @definition.struct\n(namespace_definition name: (namespace_identifier) @name) @definition.namespace\n(enum_specifier name: (type_identifier) @name) @definition.enum\n\n; Functions & Methods\n(function_definition declarator: (function_declarator declarator: (identifier) @name)) @definition.function\n(function_definition declarator: (function_declarator declarator: (qualified_identifier name: (identifier) @name))) @definition.method\n\n; Templates\n(template_declaration (class_specifier name: (type_identifier) @name)) @definition.template\n(template_declaration (function_definition declarator: (function_declarator declarator: (identifier) @name))) @definition.template\n\n; Includes\n(preproc_include path: (_) @import.source) @import\n\n; Calls\n(call_expression function: (identifier) @call.name) @call\n(call_expression function: (field_expression field: (field_identifier) @call.name)) @call\n(call_expression function: (qualified_identifier name: (identifier) @call.name)) @call\n(call_expression function: (template_function name: (identifier) @call.name)) @call\n\n; Heritage\n(class_specifier name: (type_identifier) @heritage.class\n (base_class_clause (type_identifier) @heritage.extends)) @heritage\n(class_specifier name: (type_identifier) @heritage.class\n (base_class_clause (access_specifier) (type_identifier) @heritage.extends)) @heritage\n";
|
|
9
9
|
export declare const CSHARP_QUERIES = "\n; Types\n(class_declaration name: (identifier) @name) @definition.class\n(interface_declaration name: (identifier) @name) @definition.interface\n(struct_declaration name: (identifier) @name) @definition.struct\n(enum_declaration name: (identifier) @name) @definition.enum\n(record_declaration name: (identifier) @name) @definition.record\n(delegate_declaration name: (identifier) @name) @definition.delegate\n\n; Namespaces\n(namespace_declaration name: (identifier) @name) @definition.namespace\n(namespace_declaration name: (qualified_name) @name) @definition.namespace\n\n; Methods & Properties\n(method_declaration name: (identifier) @name) @definition.method\n(local_function_statement name: (identifier) @name) @definition.function\n(constructor_declaration name: (identifier) @name) @definition.constructor\n(property_declaration name: (identifier) @name) @definition.property\n\n; Using\n(using_directive (qualified_name) @import.source) @import\n(using_directive (identifier) @import.source) @import\n\n; Calls\n(invocation_expression function: (identifier) @call.name) @call\n(invocation_expression function: (member_access_expression name: (identifier) @call.name)) @call\n\n; Heritage\n(class_declaration name: (identifier) @heritage.class\n (base_list (simple_base_type (identifier) @heritage.extends))) @heritage\n(class_declaration name: (identifier) @heritage.class\n (base_list (simple_base_type (generic_name (identifier) @heritage.extends)))) @heritage\n";
|
|
10
10
|
export declare const RUST_QUERIES = "\n; Functions & Items\n(function_item name: (identifier) @name) @definition.function\n(struct_item name: (type_identifier) @name) @definition.struct\n(enum_item name: (type_identifier) @name) @definition.enum\n(trait_item name: (type_identifier) @name) @definition.trait\n(impl_item type: (type_identifier) @name) @definition.impl\n(mod_item name: (identifier) @name) @definition.module\n\n; Type aliases, const, static, macros\n(type_item name: (type_identifier) @name) @definition.type\n(const_item name: (identifier) @name) @definition.const\n(static_item name: (identifier) @name) @definition.static\n(macro_definition name: (identifier) @name) @definition.macro\n\n; Use statements\n(use_declaration argument: (_) @import.source) @import\n\n; Calls\n(call_expression function: (identifier) @call.name) @call\n(call_expression function: (field_expression field: (field_identifier) @call.name)) @call\n(call_expression function: (scoped_identifier name: (identifier) @call.name)) @call\n(call_expression function: (generic_function function: (identifier) @call.name)) @call\n\n; Heritage (trait implementation)\n(impl_item trait: (type_identifier) @heritage.trait type: (type_identifier) @heritage.class) @heritage\n(impl_item trait: (generic_type type: (type_identifier) @heritage.trait) type: (type_identifier) @heritage.class) @heritage\n";
|
|
11
|
+
export declare const PHP_QUERIES = "\n; \u2500\u2500 Namespace \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(namespace_definition\n name: (namespace_name) @name) @definition.namespace\n\n; \u2500\u2500 Classes \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_declaration\n name: (name) @name) @definition.class\n\n; \u2500\u2500 Interfaces \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(interface_declaration\n name: (name) @name) @definition.interface\n\n; \u2500\u2500 Traits \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(trait_declaration\n name: (name) @name) @definition.trait\n\n; \u2500\u2500 Enums (PHP 8.1) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(enum_declaration\n name: (name) @name) @definition.enum\n\n; \u2500\u2500 Top-level functions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(function_definition\n name: (name) @name) @definition.function\n\n; \u2500\u2500 Methods (including constructors) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_declaration\n name: (name) @name) @definition.method\n\n; \u2500\u2500 Class properties (including Eloquent $fillable, $casts, etc.) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(property_declaration\n (property_element\n (variable_name\n (name) @name))) @definition.property\n\n; \u2500\u2500 Imports: use statements \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; Simple: use App\\Models\\User;\n(namespace_use_declaration\n (namespace_use_clause\n (qualified_name) @import.source)) @import\n\n; \u2500\u2500 Function/method calls \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; Regular function call: foo()\n(function_call_expression\n function: (name) @call.name) @call\n\n; Method call: $obj->method()\n(member_call_expression\n name: (name) @call.name) @call\n\n; Nullsafe method call: $obj?->method()\n(nullsafe_member_call_expression\n name: (name) @call.name) @call\n\n; Static call: Foo::bar() (php_only uses scoped_call_expression)\n(scoped_call_expression\n name: (name) @call.name) @call\n\n; \u2500\u2500 Heritage: extends \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_declaration\n name: (name) @heritage.class\n (base_clause\n [(name) (qualified_name)] @heritage.extends)) @heritage\n\n; \u2500\u2500 Heritage: implements \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_declaration\n name: (name) @heritage.class\n (class_interface_clause\n [(name) (qualified_name)] @heritage.implements)) @heritage.impl\n\n; \u2500\u2500 Heritage: use trait (must capture enclosing class name) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_declaration\n name: (name) @heritage.class\n body: (declaration_list\n (use_declaration\n [(name) (qualified_name)] @heritage.trait))) @heritage\n";
|
|
11
12
|
export declare const LANGUAGE_QUERIES: Record<SupportedLanguages, string>;
|