milens 0.7.2 → 0.7.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/.agents/skills/adapters/SKILL.md +59 -59
- package/.agents/skills/analyzer/SKILL.md +83 -83
- package/.agents/skills/apps/SKILL.md +65 -65
- package/.agents/skills/docs/SKILL.md +63 -63
- package/.agents/skills/milens/SKILL.md +322 -322
- package/.agents/skills/milens-security-review/SKILL.md +224 -224
- package/.agents/skills/orchestrator/SKILL.md +64 -64
- package/.agents/skills/parser/SKILL.md +86 -86
- package/.agents/skills/root/SKILL.md +89 -89
- package/.agents/skills/scripts/SKILL.md +56 -56
- package/.agents/skills/security/SKILL.md +67 -67
- package/.agents/skills/server/SKILL.md +84 -84
- package/.agents/skills/store/SKILL.md +77 -77
- package/.agents/skills/test/SKILL.md +155 -155
- package/.agents/skills/ui/SKILL.md +56 -56
- package/README.md +577 -577
- package/adapters/README.md +144 -144
- package/adapters/claude-code/.claude/mcp.json +9 -9
- package/adapters/claude-code/.claude/settings.json.hooks-snippet.json +26 -26
- package/adapters/claude-code/.claude-plugin/plugin.json +11 -11
- package/adapters/claude-code/.mcp.json +9 -9
- package/adapters/claude-code/CLAUDE.md +81 -81
- package/adapters/claude-code/hooks/hooks.json +27 -27
- package/adapters/codex/.codex/config.toml +3 -3
- package/adapters/copilot/.vscode/mcp.json +10 -10
- package/adapters/cursor/.cursor/mcp.json +9 -9
- package/adapters/cursor/.cursorrules +69 -69
- package/adapters/gemini/.gemini/context.md +81 -81
- package/adapters/gemini/.gemini/settings.json +9 -9
- package/adapters/opencode/.opencode/config.json +8 -8
- package/adapters/zed/.zed/settings.json +8 -8
- package/dist/build-info.d.ts +2 -2
- package/dist/build-info.js +2 -2
- package/dist/cli.js +482 -482
- package/dist/parser/lang-css.js +9 -9
- package/dist/parser/lang-go.js +58 -58
- package/dist/parser/lang-html.js +3 -3
- package/dist/parser/lang-java.js +37 -37
- package/dist/parser/lang-js.js +105 -105
- package/dist/parser/lang-php.js +45 -45
- package/dist/parser/lang-py.js +43 -43
- package/dist/parser/lang-ruby.js +28 -28
- package/dist/parser/lang-rust.js +48 -48
- package/dist/parser/lang-ts.js +210 -210
- package/dist/server/mcp-prompts.js +502 -502
- package/dist/server/mcp.js +56 -56
- package/dist/skills.js +296 -296
- package/dist/store/annotations.js +1 -1
- package/dist/store/db.js +224 -224
- package/dist/store/schema.sql +144 -144
- package/dist/store/vectors.js +2 -2
- package/package.json +85 -85
package/dist/parser/lang-css.js
CHANGED
|
@@ -6,16 +6,16 @@ const spec = {
|
|
|
6
6
|
wasmName: 'tree-sitter-css',
|
|
7
7
|
queries: {
|
|
8
8
|
imports: `(import_statement (string_value) @source) @def`,
|
|
9
|
-
variables: `[
|
|
10
|
-
(declaration (property_name) @name) @def
|
|
11
|
-
(rule_set (selectors (class_selector (class_name) @name))) @def
|
|
12
|
-
(rule_set (selectors (id_selector (id_name) @name))) @def
|
|
13
|
-
(keyframes_statement (keyframes_name) @name) @def
|
|
14
|
-
(media_statement (feature_query (feature_name) @name)) @def
|
|
9
|
+
variables: `[
|
|
10
|
+
(declaration (property_name) @name) @def
|
|
11
|
+
(rule_set (selectors (class_selector (class_name) @name))) @def
|
|
12
|
+
(rule_set (selectors (id_selector (id_name) @name))) @def
|
|
13
|
+
(keyframes_statement (keyframes_name) @name) @def
|
|
14
|
+
(media_statement (feature_query (feature_name) @name)) @def
|
|
15
15
|
]`,
|
|
16
|
-
calls: `(call_expression
|
|
17
|
-
(function_name) @_fn
|
|
18
|
-
(arguments (plain_value) @callee)
|
|
16
|
+
calls: `(call_expression
|
|
17
|
+
(function_name) @_fn
|
|
18
|
+
(arguments (plain_value) @callee)
|
|
19
19
|
(#eq? @_fn "var")) @def`,
|
|
20
20
|
},
|
|
21
21
|
/** Filter variables: keep custom properties (--*) and selectors; drop standard CSS properties */
|
package/dist/parser/lang-go.js
CHANGED
|
@@ -10,73 +10,73 @@ const spec = {
|
|
|
10
10
|
isExported: (sym) => sym.name[0] === sym.name[0].toUpperCase() && /[A-Z]/.test(sym.name[0]),
|
|
11
11
|
queries: {
|
|
12
12
|
functions: `(function_declaration name: (identifier) @name) @def`,
|
|
13
|
-
variables: `[
|
|
14
|
-
(const_declaration (const_spec name: (identifier) @name)) @def
|
|
15
|
-
(var_declaration (var_spec name: (identifier) @name)) @def
|
|
13
|
+
variables: `[
|
|
14
|
+
(const_declaration (const_spec name: (identifier) @name)) @def
|
|
15
|
+
(var_declaration (var_spec name: (identifier) @name)) @def
|
|
16
16
|
]`,
|
|
17
|
-
methods: `(method_declaration
|
|
18
|
-
name: (field_identifier) @name
|
|
17
|
+
methods: `(method_declaration
|
|
18
|
+
name: (field_identifier) @name
|
|
19
19
|
) @def`,
|
|
20
|
-
structs: `(type_declaration
|
|
21
|
-
(type_spec
|
|
22
|
-
name: (type_identifier) @name
|
|
23
|
-
type: (struct_type)
|
|
24
|
-
)
|
|
20
|
+
structs: `(type_declaration
|
|
21
|
+
(type_spec
|
|
22
|
+
name: (type_identifier) @name
|
|
23
|
+
type: (struct_type)
|
|
24
|
+
)
|
|
25
25
|
) @def`,
|
|
26
|
-
interfaces: `(type_declaration
|
|
27
|
-
(type_spec
|
|
28
|
-
name: (type_identifier) @name
|
|
29
|
-
type: (interface_type)
|
|
30
|
-
)
|
|
26
|
+
interfaces: `(type_declaration
|
|
27
|
+
(type_spec
|
|
28
|
+
name: (type_identifier) @name
|
|
29
|
+
type: (interface_type)
|
|
30
|
+
)
|
|
31
31
|
) @def`,
|
|
32
|
-
types: `(type_declaration
|
|
33
|
-
(type_spec
|
|
34
|
-
name: (type_identifier) @name
|
|
35
|
-
type: [
|
|
36
|
-
(type_identifier)
|
|
37
|
-
(qualified_type)
|
|
38
|
-
(pointer_type)
|
|
39
|
-
(slice_type)
|
|
40
|
-
(map_type)
|
|
41
|
-
(channel_type)
|
|
42
|
-
(function_type)
|
|
43
|
-
(array_type)
|
|
44
|
-
]
|
|
45
|
-
)
|
|
32
|
+
types: `(type_declaration
|
|
33
|
+
(type_spec
|
|
34
|
+
name: (type_identifier) @name
|
|
35
|
+
type: [
|
|
36
|
+
(type_identifier)
|
|
37
|
+
(qualified_type)
|
|
38
|
+
(pointer_type)
|
|
39
|
+
(slice_type)
|
|
40
|
+
(map_type)
|
|
41
|
+
(channel_type)
|
|
42
|
+
(function_type)
|
|
43
|
+
(array_type)
|
|
44
|
+
]
|
|
45
|
+
)
|
|
46
46
|
) @def`,
|
|
47
|
-
imports: `(import_spec
|
|
48
|
-
path: (interpreted_string_literal) @source
|
|
47
|
+
imports: `(import_spec
|
|
48
|
+
path: (interpreted_string_literal) @source
|
|
49
49
|
) @def`,
|
|
50
|
-
calls: `[
|
|
51
|
-
(call_expression function: (identifier) @callee) @def
|
|
52
|
-
(call_expression function: (selector_expression operand: (_) @receiver field: (field_identifier) @callee)) @def
|
|
50
|
+
calls: `[
|
|
51
|
+
(call_expression function: (identifier) @callee) @def
|
|
52
|
+
(call_expression function: (selector_expression operand: (_) @receiver field: (field_identifier) @callee)) @def
|
|
53
53
|
]`,
|
|
54
|
-
heritage: `[
|
|
55
|
-
(type_declaration (type_spec
|
|
56
|
-
name: (type_identifier) @child
|
|
57
|
-
type: (struct_type (field_declaration_list
|
|
58
|
-
(field_declaration type: (type_identifier) @parent)
|
|
59
|
-
))
|
|
60
|
-
)) @def
|
|
61
|
-
(type_declaration (type_spec
|
|
62
|
-
name: (type_identifier) @child
|
|
63
|
-
type: (interface_type
|
|
64
|
-
(type_identifier) @parent
|
|
65
|
-
)
|
|
66
|
-
)) @def
|
|
54
|
+
heritage: `[
|
|
55
|
+
(type_declaration (type_spec
|
|
56
|
+
name: (type_identifier) @child
|
|
57
|
+
type: (struct_type (field_declaration_list
|
|
58
|
+
(field_declaration type: (type_identifier) @parent)
|
|
59
|
+
))
|
|
60
|
+
)) @def
|
|
61
|
+
(type_declaration (type_spec
|
|
62
|
+
name: (type_identifier) @child
|
|
63
|
+
type: (interface_type
|
|
64
|
+
(type_identifier) @parent
|
|
65
|
+
)
|
|
66
|
+
)) @def
|
|
67
67
|
]`,
|
|
68
|
-
typeBindings: `[
|
|
69
|
-
(var_declaration (var_spec name: (identifier) @var type: (type_identifier) @type))
|
|
70
|
-
(const_declaration (const_spec name: (identifier) @var type: (type_identifier) @type))
|
|
71
|
-
(short_var_declaration left: (identifier) @var right: (composite_literal type: (type_identifier) @type))
|
|
72
|
-
(field_declaration name: (field_identifier) @var type: (type_identifier) @type)
|
|
73
|
-
(parameter_declaration name: (identifier) @var type: (type_identifier) @type)
|
|
68
|
+
typeBindings: `[
|
|
69
|
+
(var_declaration (var_spec name: (identifier) @var type: (type_identifier) @type))
|
|
70
|
+
(const_declaration (const_spec name: (identifier) @var type: (type_identifier) @type))
|
|
71
|
+
(short_var_declaration left: (identifier) @var right: (composite_literal type: (type_identifier) @type))
|
|
72
|
+
(field_declaration name: (field_identifier) @var type: (type_identifier) @type)
|
|
73
|
+
(parameter_declaration name: (identifier) @var type: (type_identifier) @type)
|
|
74
74
|
]`,
|
|
75
|
-
returnTypes: `[
|
|
76
|
-
(function_declaration name: (identifier) @name result: (type_identifier) @returnType)
|
|
77
|
-
(function_declaration name: (identifier) @name result: (pointer_type (type_identifier) @returnType))
|
|
78
|
-
(method_declaration name: (field_identifier) @name result: (type_identifier) @returnType)
|
|
79
|
-
(method_declaration name: (field_identifier) @name result: (pointer_type (type_identifier) @returnType))
|
|
75
|
+
returnTypes: `[
|
|
76
|
+
(function_declaration name: (identifier) @name result: (type_identifier) @returnType)
|
|
77
|
+
(function_declaration name: (identifier) @name result: (pointer_type (type_identifier) @returnType))
|
|
78
|
+
(method_declaration name: (field_identifier) @name result: (type_identifier) @returnType)
|
|
79
|
+
(method_declaration name: (field_identifier) @name result: (pointer_type (type_identifier) @returnType))
|
|
80
80
|
]`,
|
|
81
81
|
},
|
|
82
82
|
resolveImport(raw, _fromFile, root, _aliases) {
|
package/dist/parser/lang-html.js
CHANGED
|
@@ -5,9 +5,9 @@ const spec = {
|
|
|
5
5
|
extensions: ['.html', '.htm'],
|
|
6
6
|
wasmName: 'tree-sitter-html',
|
|
7
7
|
queries: {
|
|
8
|
-
calls: `(element
|
|
9
|
-
(start_tag
|
|
10
|
-
(attribute (attribute_name) (quoted_attribute_value (attribute_value) @callee)))
|
|
8
|
+
calls: `(element
|
|
9
|
+
(start_tag
|
|
10
|
+
(attribute (attribute_name) (quoted_attribute_value (attribute_value) @callee)))
|
|
11
11
|
) @def`,
|
|
12
12
|
},
|
|
13
13
|
resolveImport(raw, fromFile, root, aliases) {
|
package/dist/parser/lang-java.js
CHANGED
|
@@ -8,51 +8,51 @@ const spec = {
|
|
|
8
8
|
importSemantics: 'named',
|
|
9
9
|
isExported: () => false, // handled by exports query (public keyword)
|
|
10
10
|
queries: {
|
|
11
|
-
classes: `[
|
|
12
|
-
(class_declaration name: (identifier) @name) @def
|
|
13
|
-
(record_declaration name: (identifier) @name) @def
|
|
11
|
+
classes: `[
|
|
12
|
+
(class_declaration name: (identifier) @name) @def
|
|
13
|
+
(record_declaration name: (identifier) @name) @def
|
|
14
14
|
]`,
|
|
15
15
|
interfaces: `(interface_declaration name: (identifier) @name) @def`,
|
|
16
|
-
methods: `[
|
|
17
|
-
(method_declaration name: (identifier) @name) @def
|
|
18
|
-
(constructor_declaration name: (identifier) @name) @def
|
|
16
|
+
methods: `[
|
|
17
|
+
(method_declaration name: (identifier) @name) @def
|
|
18
|
+
(constructor_declaration name: (identifier) @name) @def
|
|
19
19
|
]`,
|
|
20
20
|
enums: `(enum_declaration name: (identifier) @name) @def`,
|
|
21
|
-
imports: `[
|
|
22
|
-
(import_declaration (scoped_identifier) @source) @def
|
|
23
|
-
(import_declaration "static" (scoped_identifier) @source) @def
|
|
21
|
+
imports: `[
|
|
22
|
+
(import_declaration (scoped_identifier) @source) @def
|
|
23
|
+
(import_declaration "static" (scoped_identifier) @source) @def
|
|
24
24
|
]`,
|
|
25
|
-
calls: `[
|
|
26
|
-
(method_invocation
|
|
27
|
-
object: (_) @receiver
|
|
28
|
-
name: (identifier) @callee
|
|
29
|
-
) @def
|
|
30
|
-
(method_invocation
|
|
31
|
-
name: (identifier) @callee
|
|
32
|
-
) @def
|
|
33
|
-
(object_creation_expression type: (type_identifier) @callee) @def
|
|
34
|
-
(marker_annotation name: (identifier) @callee) @def
|
|
35
|
-
(annotation name: (identifier) @callee) @def
|
|
25
|
+
calls: `[
|
|
26
|
+
(method_invocation
|
|
27
|
+
object: (_) @receiver
|
|
28
|
+
name: (identifier) @callee
|
|
29
|
+
) @def
|
|
30
|
+
(method_invocation
|
|
31
|
+
name: (identifier) @callee
|
|
32
|
+
) @def
|
|
33
|
+
(object_creation_expression type: (type_identifier) @callee) @def
|
|
34
|
+
(marker_annotation name: (identifier) @callee) @def
|
|
35
|
+
(annotation name: (identifier) @callee) @def
|
|
36
36
|
]`,
|
|
37
37
|
variables: `(field_declaration declarator: (variable_declarator name: (identifier) @name)) @def`,
|
|
38
|
-
heritage: `[
|
|
39
|
-
(class_declaration
|
|
40
|
-
name: (identifier) @child
|
|
41
|
-
(superclass (type_identifier) @parent)
|
|
42
|
-
) @def
|
|
43
|
-
(class_declaration
|
|
44
|
-
name: (identifier) @child
|
|
45
|
-
(super_interfaces (type_list (type_identifier) @parent))
|
|
46
|
-
) @def
|
|
38
|
+
heritage: `[
|
|
39
|
+
(class_declaration
|
|
40
|
+
name: (identifier) @child
|
|
41
|
+
(superclass (type_identifier) @parent)
|
|
42
|
+
) @def
|
|
43
|
+
(class_declaration
|
|
44
|
+
name: (identifier) @child
|
|
45
|
+
(super_interfaces (type_list (type_identifier) @parent))
|
|
46
|
+
) @def
|
|
47
47
|
]`,
|
|
48
|
-
exports: `[
|
|
49
|
-
(class_declaration (modifiers "public") name: (identifier) @name)
|
|
50
|
-
(class_declaration (modifiers "public" "static") name: (identifier) @name)
|
|
51
|
-
(class_declaration (modifiers "public" "abstract") name: (identifier) @name)
|
|
52
|
-
(interface_declaration (modifiers "public") name: (identifier) @name)
|
|
53
|
-
(enum_declaration (modifiers "public") name: (identifier) @name)
|
|
54
|
-
(record_declaration (modifiers "public") name: (identifier) @name)
|
|
55
|
-
(method_declaration (modifiers "public") name: (identifier) @name)
|
|
48
|
+
exports: `[
|
|
49
|
+
(class_declaration (modifiers "public") name: (identifier) @name)
|
|
50
|
+
(class_declaration (modifiers "public" "static") name: (identifier) @name)
|
|
51
|
+
(class_declaration (modifiers "public" "abstract") name: (identifier) @name)
|
|
52
|
+
(interface_declaration (modifiers "public") name: (identifier) @name)
|
|
53
|
+
(enum_declaration (modifiers "public") name: (identifier) @name)
|
|
54
|
+
(record_declaration (modifiers "public") name: (identifier) @name)
|
|
55
|
+
(method_declaration (modifiers "public") name: (identifier) @name)
|
|
56
56
|
]`,
|
|
57
57
|
},
|
|
58
58
|
resolveImport(raw, _fromFile, root, _aliases) {
|
package/dist/parser/lang-js.js
CHANGED
|
@@ -14,122 +14,122 @@ const spec = {
|
|
|
14
14
|
return true;
|
|
15
15
|
},
|
|
16
16
|
queries: {
|
|
17
|
-
functions: `[
|
|
18
|
-
(function_declaration name: (identifier) @name) @def
|
|
19
|
-
(generator_function_declaration name: (identifier) @name) @def
|
|
20
|
-
(lexical_declaration
|
|
21
|
-
(variable_declarator
|
|
22
|
-
name: (identifier) @name
|
|
23
|
-
value: (arrow_function)
|
|
24
|
-
)
|
|
25
|
-
) @def
|
|
17
|
+
functions: `[
|
|
18
|
+
(function_declaration name: (identifier) @name) @def
|
|
19
|
+
(generator_function_declaration name: (identifier) @name) @def
|
|
20
|
+
(lexical_declaration
|
|
21
|
+
(variable_declarator
|
|
22
|
+
name: (identifier) @name
|
|
23
|
+
value: (arrow_function)
|
|
24
|
+
)
|
|
25
|
+
) @def
|
|
26
26
|
]`,
|
|
27
27
|
classes: `(class_declaration name: (identifier) @name) @def`,
|
|
28
28
|
methods: `(method_definition name: (property_identifier) @name) @def`,
|
|
29
|
-
variables: `(program (lexical_declaration
|
|
29
|
+
variables: `(program (lexical_declaration
|
|
30
30
|
(variable_declarator name: (identifier) @name)) @def)`,
|
|
31
|
-
imports: `[
|
|
32
|
-
(import_statement
|
|
33
|
-
source: (string (string_fragment) @source)
|
|
34
|
-
) @def
|
|
35
|
-
(call_expression
|
|
36
|
-
function: (import)
|
|
37
|
-
arguments: (arguments (string (string_fragment) @source))
|
|
38
|
-
) @def
|
|
39
|
-
(lexical_declaration
|
|
40
|
-
(variable_declarator
|
|
41
|
-
value: (call_expression
|
|
42
|
-
function: (identifier) @_req
|
|
43
|
-
arguments: (arguments (string (string_fragment) @source))
|
|
44
|
-
)
|
|
45
|
-
)
|
|
46
|
-
) @def
|
|
31
|
+
imports: `[
|
|
32
|
+
(import_statement
|
|
33
|
+
source: (string (string_fragment) @source)
|
|
34
|
+
) @def
|
|
35
|
+
(call_expression
|
|
36
|
+
function: (import)
|
|
37
|
+
arguments: (arguments (string (string_fragment) @source))
|
|
38
|
+
) @def
|
|
39
|
+
(lexical_declaration
|
|
40
|
+
(variable_declarator
|
|
41
|
+
value: (call_expression
|
|
42
|
+
function: (identifier) @_req
|
|
43
|
+
arguments: (arguments (string (string_fragment) @source))
|
|
44
|
+
)
|
|
45
|
+
)
|
|
46
|
+
) @def
|
|
47
47
|
]`,
|
|
48
|
-
exports: `[
|
|
49
|
-
(export_statement
|
|
50
|
-
declaration: (function_declaration name: (identifier) @name)
|
|
51
|
-
)
|
|
52
|
-
(export_statement
|
|
53
|
-
declaration: (class_declaration name: (identifier) @name)
|
|
54
|
-
)
|
|
55
|
-
(export_statement
|
|
56
|
-
declaration: (lexical_declaration
|
|
57
|
-
(variable_declarator name: (identifier) @name)
|
|
58
|
-
)
|
|
59
|
-
)
|
|
60
|
-
(export_statement
|
|
61
|
-
(export_clause (export_specifier name: (identifier) @name))
|
|
62
|
-
)
|
|
63
|
-
(export_statement
|
|
64
|
-
declaration: (generator_function_declaration name: (identifier) @name)
|
|
65
|
-
)
|
|
66
|
-
(export_statement
|
|
67
|
-
value: (identifier) @name
|
|
68
|
-
)
|
|
48
|
+
exports: `[
|
|
49
|
+
(export_statement
|
|
50
|
+
declaration: (function_declaration name: (identifier) @name)
|
|
51
|
+
)
|
|
52
|
+
(export_statement
|
|
53
|
+
declaration: (class_declaration name: (identifier) @name)
|
|
54
|
+
)
|
|
55
|
+
(export_statement
|
|
56
|
+
declaration: (lexical_declaration
|
|
57
|
+
(variable_declarator name: (identifier) @name)
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
(export_statement
|
|
61
|
+
(export_clause (export_specifier name: (identifier) @name))
|
|
62
|
+
)
|
|
63
|
+
(export_statement
|
|
64
|
+
declaration: (generator_function_declaration name: (identifier) @name)
|
|
65
|
+
)
|
|
66
|
+
(export_statement
|
|
67
|
+
value: (identifier) @name
|
|
68
|
+
)
|
|
69
69
|
]`,
|
|
70
|
-
calls: `[
|
|
71
|
-
(call_expression function: (identifier) @callee) @def
|
|
72
|
-
(call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee)) @def
|
|
73
|
-
(new_expression constructor: (identifier) @callee) @def
|
|
74
|
-
(new_expression constructor: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
75
|
-
(decorator (identifier) @callee) @def
|
|
76
|
-
(decorator (call_expression arguments: (arguments (identifier) @callee))) @def
|
|
77
|
-
(decorator (call_expression arguments: (arguments (object (pair value: (identifier) @callee))))) @def
|
|
78
|
-
(decorator (call_expression arguments: (arguments (object (pair value: (array (identifier) @callee)))))) @def
|
|
79
|
-
(decorator (call_expression arguments: (arguments (object (pair value: (array (object (pair value: (identifier) @callee)))))))) @def
|
|
80
|
-
(decorator (call_expression arguments: (arguments (arrow_function body: (identifier) @callee)))) @def
|
|
81
|
-
(decorator (call_expression arguments: (arguments (object (pair value: (arrow_function body: (identifier) @callee)))))) @def
|
|
82
|
-
(call_expression arguments: (arguments (identifier) @callee)) @def
|
|
83
|
-
(call_expression arguments: (arguments (object (pair value: (identifier) @callee)))) @def
|
|
84
|
-
(call_expression arguments: (arguments (object (pair value: (array (identifier) @callee))))) @def
|
|
85
|
-
(jsx_self_closing_element name: (identifier) @callee) @def
|
|
86
|
-
(jsx_opening_element name: (identifier) @callee) @def
|
|
87
|
-
(jsx_self_closing_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
88
|
-
(jsx_opening_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
70
|
+
calls: `[
|
|
71
|
+
(call_expression function: (identifier) @callee) @def
|
|
72
|
+
(call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee)) @def
|
|
73
|
+
(new_expression constructor: (identifier) @callee) @def
|
|
74
|
+
(new_expression constructor: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
75
|
+
(decorator (identifier) @callee) @def
|
|
76
|
+
(decorator (call_expression arguments: (arguments (identifier) @callee))) @def
|
|
77
|
+
(decorator (call_expression arguments: (arguments (object (pair value: (identifier) @callee))))) @def
|
|
78
|
+
(decorator (call_expression arguments: (arguments (object (pair value: (array (identifier) @callee)))))) @def
|
|
79
|
+
(decorator (call_expression arguments: (arguments (object (pair value: (array (object (pair value: (identifier) @callee)))))))) @def
|
|
80
|
+
(decorator (call_expression arguments: (arguments (arrow_function body: (identifier) @callee)))) @def
|
|
81
|
+
(decorator (call_expression arguments: (arguments (object (pair value: (arrow_function body: (identifier) @callee)))))) @def
|
|
82
|
+
(call_expression arguments: (arguments (identifier) @callee)) @def
|
|
83
|
+
(call_expression arguments: (arguments (object (pair value: (identifier) @callee)))) @def
|
|
84
|
+
(call_expression arguments: (arguments (object (pair value: (array (identifier) @callee))))) @def
|
|
85
|
+
(jsx_self_closing_element name: (identifier) @callee) @def
|
|
86
|
+
(jsx_opening_element name: (identifier) @callee) @def
|
|
87
|
+
(jsx_self_closing_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
88
|
+
(jsx_opening_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
|
|
89
89
|
]`,
|
|
90
|
-
heritage: `(class_declaration
|
|
91
|
-
name: (identifier) @child
|
|
92
|
-
(class_heritage (identifier) @parent)
|
|
90
|
+
heritage: `(class_declaration
|
|
91
|
+
name: (identifier) @child
|
|
92
|
+
(class_heritage (identifier) @parent)
|
|
93
93
|
) @def`,
|
|
94
|
-
reExports: `[
|
|
95
|
-
(export_statement
|
|
96
|
-
source: (string (string_fragment) @source)
|
|
97
|
-
(export_clause (export_specifier name: (identifier) @name))
|
|
98
|
-
) @def
|
|
99
|
-
(export_statement
|
|
100
|
-
source: (string (string_fragment) @source)
|
|
101
|
-
"*"
|
|
102
|
-
) @def
|
|
94
|
+
reExports: `[
|
|
95
|
+
(export_statement
|
|
96
|
+
source: (string (string_fragment) @source)
|
|
97
|
+
(export_clause (export_specifier name: (identifier) @name))
|
|
98
|
+
) @def
|
|
99
|
+
(export_statement
|
|
100
|
+
source: (string (string_fragment) @source)
|
|
101
|
+
"*"
|
|
102
|
+
) @def
|
|
103
103
|
]`,
|
|
104
|
-
typeBindings: `[
|
|
105
|
-
(lexical_declaration
|
|
106
|
-
(variable_declarator
|
|
107
|
-
name: (identifier) @var
|
|
108
|
-
value: (new_expression constructor: (identifier) @type)
|
|
109
|
-
)
|
|
110
|
-
)
|
|
104
|
+
typeBindings: `[
|
|
105
|
+
(lexical_declaration
|
|
106
|
+
(variable_declarator
|
|
107
|
+
name: (identifier) @var
|
|
108
|
+
value: (new_expression constructor: (identifier) @type)
|
|
109
|
+
)
|
|
110
|
+
)
|
|
111
111
|
]`,
|
|
112
|
-
assignmentChains: `[
|
|
113
|
-
(lexical_declaration
|
|
114
|
-
(variable_declarator
|
|
115
|
-
name: (identifier) @target
|
|
116
|
-
value: (identifier) @source
|
|
117
|
-
)
|
|
118
|
-
)
|
|
112
|
+
assignmentChains: `[
|
|
113
|
+
(lexical_declaration
|
|
114
|
+
(variable_declarator
|
|
115
|
+
name: (identifier) @target
|
|
116
|
+
value: (identifier) @source
|
|
117
|
+
)
|
|
118
|
+
)
|
|
119
119
|
]`,
|
|
120
|
-
callResultBindings: `[
|
|
121
|
-
(lexical_declaration
|
|
122
|
-
(variable_declarator
|
|
123
|
-
name: (identifier) @var
|
|
124
|
-
value: (call_expression function: (identifier) @callee)
|
|
125
|
-
)
|
|
126
|
-
)
|
|
127
|
-
(lexical_declaration
|
|
128
|
-
(variable_declarator
|
|
129
|
-
name: (identifier) @var
|
|
130
|
-
value: (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee))
|
|
131
|
-
)
|
|
132
|
-
)
|
|
120
|
+
callResultBindings: `[
|
|
121
|
+
(lexical_declaration
|
|
122
|
+
(variable_declarator
|
|
123
|
+
name: (identifier) @var
|
|
124
|
+
value: (call_expression function: (identifier) @callee)
|
|
125
|
+
)
|
|
126
|
+
)
|
|
127
|
+
(lexical_declaration
|
|
128
|
+
(variable_declarator
|
|
129
|
+
name: (identifier) @var
|
|
130
|
+
value: (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee))
|
|
131
|
+
)
|
|
132
|
+
)
|
|
133
133
|
]`,
|
|
134
134
|
},
|
|
135
135
|
resolveImport(raw, fromFile, root, aliases) {
|
package/dist/parser/lang-php.js
CHANGED
|
@@ -8,60 +8,60 @@ const spec = {
|
|
|
8
8
|
importSemantics: 'wildcard-leaf',
|
|
9
9
|
isExported: () => false, // handled by exports query (public keyword)
|
|
10
10
|
queries: {
|
|
11
|
-
functions: `[
|
|
12
|
-
(function_definition name: (name) @name) @def
|
|
13
|
-
(const_declaration (const_element (name) @name)) @def
|
|
11
|
+
functions: `[
|
|
12
|
+
(function_definition name: (name) @name) @def
|
|
13
|
+
(const_declaration (const_element (name) @name)) @def
|
|
14
14
|
]`,
|
|
15
15
|
classes: `(class_declaration name: (name) @name) @def`,
|
|
16
16
|
interfaces: `(interface_declaration name: (name) @name) @def`,
|
|
17
17
|
traits: `(trait_declaration name: (name) @name) @def`,
|
|
18
18
|
enums: `(enum_declaration name: (name) @name) @def`,
|
|
19
19
|
methods: `(method_declaration name: (name) @name) @def`,
|
|
20
|
-
imports: `[
|
|
21
|
-
(namespace_use_declaration
|
|
22
|
-
(namespace_use_clause (qualified_name) @source)
|
|
23
|
-
) @def
|
|
24
|
-
(expression_statement
|
|
25
|
-
(include_expression (string (string_content) @source))
|
|
26
|
-
) @def
|
|
20
|
+
imports: `[
|
|
21
|
+
(namespace_use_declaration
|
|
22
|
+
(namespace_use_clause (qualified_name) @source)
|
|
23
|
+
) @def
|
|
24
|
+
(expression_statement
|
|
25
|
+
(include_expression (string (string_content) @source))
|
|
26
|
+
) @def
|
|
27
27
|
]`,
|
|
28
|
-
calls: `[
|
|
29
|
-
(function_call_expression
|
|
30
|
-
function: (name) @callee
|
|
31
|
-
) @def
|
|
32
|
-
(member_call_expression
|
|
33
|
-
object: (_) @receiver
|
|
34
|
-
name: (name) @callee
|
|
35
|
-
) @def
|
|
36
|
-
(scoped_call_expression
|
|
37
|
-
scope: (name) @receiver
|
|
38
|
-
name: (name) @callee
|
|
39
|
-
) @def
|
|
40
|
-
(object_creation_expression (name) @callee) @def
|
|
28
|
+
calls: `[
|
|
29
|
+
(function_call_expression
|
|
30
|
+
function: (name) @callee
|
|
31
|
+
) @def
|
|
32
|
+
(member_call_expression
|
|
33
|
+
object: (_) @receiver
|
|
34
|
+
name: (name) @callee
|
|
35
|
+
) @def
|
|
36
|
+
(scoped_call_expression
|
|
37
|
+
scope: (name) @receiver
|
|
38
|
+
name: (name) @callee
|
|
39
|
+
) @def
|
|
40
|
+
(object_creation_expression (name) @callee) @def
|
|
41
41
|
]`,
|
|
42
|
-
heritage: `[
|
|
43
|
-
(class_declaration
|
|
44
|
-
name: (name) @child
|
|
45
|
-
(base_clause (name) @parent)
|
|
46
|
-
) @def
|
|
47
|
-
(class_declaration
|
|
48
|
-
name: (name) @child
|
|
49
|
-
(class_interface_clause (name) @parent)
|
|
50
|
-
) @def
|
|
51
|
-
(class_declaration
|
|
52
|
-
name: (name) @child
|
|
53
|
-
body: (declaration_list
|
|
54
|
-
(use_declaration (name) @parent)
|
|
55
|
-
)
|
|
56
|
-
) @def
|
|
42
|
+
heritage: `[
|
|
43
|
+
(class_declaration
|
|
44
|
+
name: (name) @child
|
|
45
|
+
(base_clause (name) @parent)
|
|
46
|
+
) @def
|
|
47
|
+
(class_declaration
|
|
48
|
+
name: (name) @child
|
|
49
|
+
(class_interface_clause (name) @parent)
|
|
50
|
+
) @def
|
|
51
|
+
(class_declaration
|
|
52
|
+
name: (name) @child
|
|
53
|
+
body: (declaration_list
|
|
54
|
+
(use_declaration (name) @parent)
|
|
55
|
+
)
|
|
56
|
+
) @def
|
|
57
57
|
]`,
|
|
58
|
-
exports: `[
|
|
59
|
-
(method_declaration (visibility_modifier) name: (name) @name)
|
|
60
|
-
(class_declaration name: (name) @name)
|
|
61
|
-
(interface_declaration name: (name) @name)
|
|
62
|
-
(trait_declaration name: (name) @name)
|
|
63
|
-
(function_definition name: (name) @name)
|
|
64
|
-
(const_declaration (const_element (name) @name))
|
|
58
|
+
exports: `[
|
|
59
|
+
(method_declaration (visibility_modifier) name: (name) @name)
|
|
60
|
+
(class_declaration name: (name) @name)
|
|
61
|
+
(interface_declaration name: (name) @name)
|
|
62
|
+
(trait_declaration name: (name) @name)
|
|
63
|
+
(function_definition name: (name) @name)
|
|
64
|
+
(const_declaration (const_element (name) @name))
|
|
65
65
|
]`,
|
|
66
66
|
},
|
|
67
67
|
resolveImport(raw, _fromFile, root, aliases) {
|