milens 0.5.8 → 0.5.9

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.
@@ -5,52 +5,52 @@ const spec = {
5
5
  extensions: ['.php'],
6
6
  wasmName: 'tree-sitter-php',
7
7
  queries: {
8
- functions: `[
9
- (function_definition name: (name) @name) @def
10
- (const_declaration (const_element (name) @name)) @def
8
+ functions: `[
9
+ (function_definition name: (name) @name) @def
10
+ (const_declaration (const_element (name) @name)) @def
11
11
  ]`,
12
12
  classes: `(class_declaration name: (name) @name) @def`,
13
13
  interfaces: `(interface_declaration name: (name) @name) @def`,
14
14
  traits: `(trait_declaration name: (name) @name) @def`,
15
15
  enums: `(enum_declaration name: (name) @name) @def`,
16
16
  methods: `(method_declaration name: (name) @name) @def`,
17
- imports: `[
18
- (namespace_use_declaration
19
- (namespace_use_clause (qualified_name) @source)
20
- ) @def
21
- (expression_statement
22
- (include_expression (string (string_content) @source))
23
- ) @def
17
+ imports: `[
18
+ (namespace_use_declaration
19
+ (namespace_use_clause (qualified_name) @source)
20
+ ) @def
21
+ (expression_statement
22
+ (include_expression (string (string_content) @source))
23
+ ) @def
24
24
  ]`,
25
- calls: `[
26
- (function_call_expression
27
- function: (name) @callee
28
- ) @def
29
- (member_call_expression
30
- object: (_) @receiver
31
- name: (name) @callee
32
- ) @def
33
- (scoped_call_expression
34
- scope: (name) @receiver
35
- name: (name) @callee
36
- ) @def
37
- (object_creation_expression (name) @callee) @def
25
+ calls: `[
26
+ (function_call_expression
27
+ function: (name) @callee
28
+ ) @def
29
+ (member_call_expression
30
+ object: (_) @receiver
31
+ name: (name) @callee
32
+ ) @def
33
+ (scoped_call_expression
34
+ scope: (name) @receiver
35
+ name: (name) @callee
36
+ ) @def
37
+ (object_creation_expression (name) @callee) @def
38
38
  ]`,
39
- heritage: `[
40
- (class_declaration
41
- name: (name) @child
42
- (base_clause (name) @parent)
43
- ) @def
44
- (class_declaration
45
- name: (name) @child
46
- (class_interface_clause (name) @parent)
47
- ) @def
48
- (class_declaration
49
- name: (name) @child
50
- body: (declaration_list
51
- (use_declaration (name) @parent)
52
- )
53
- ) @def
39
+ heritage: `[
40
+ (class_declaration
41
+ name: (name) @child
42
+ (base_clause (name) @parent)
43
+ ) @def
44
+ (class_declaration
45
+ name: (name) @child
46
+ (class_interface_clause (name) @parent)
47
+ ) @def
48
+ (class_declaration
49
+ name: (name) @child
50
+ body: (declaration_list
51
+ (use_declaration (name) @parent)
52
+ )
53
+ ) @def
54
54
  ]`,
55
55
  },
56
56
  resolveImport(raw, _fromFile, root, aliases) {
@@ -1 +1 @@
1
- {"version":3,"file":"lang-py.d.ts","sourceRoot":"","sources":["../../src/parser/lang-py.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,QA+DX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"lang-py.d.ts","sourceRoot":"","sources":["../../src/parser/lang-py.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,QAgEX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -4,45 +4,46 @@ const spec = {
4
4
  id: 'python',
5
5
  extensions: ['.py'],
6
6
  wasmName: 'tree-sitter-python',
7
+ allTopLevelExported: true,
7
8
  queries: {
8
- functions: `[
9
- (module (function_definition name: (identifier) @name) @def)
10
- (module (decorated_definition definition: (function_definition name: (identifier) @name) @def))
9
+ functions: `[
10
+ (module (function_definition name: (identifier) @name) @def)
11
+ (module (decorated_definition definition: (function_definition name: (identifier) @name) @def))
11
12
  ]`,
12
- classes: `[
13
- (class_definition name: (identifier) @name) @def
14
- (decorated_definition definition: (class_definition name: (identifier) @name) @def)
13
+ classes: `[
14
+ (class_definition name: (identifier) @name) @def
15
+ (decorated_definition definition: (class_definition name: (identifier) @name) @def)
15
16
  ]`,
16
17
  variables: `(module (expression_statement (assignment left: (identifier) @name))) @def`,
17
- methods: `[
18
- (class_definition body: (block (function_definition name: (identifier) @name) @def))
19
- (class_definition body: (block (decorated_definition definition: (function_definition name: (identifier) @name) @def)))
18
+ methods: `[
19
+ (class_definition body: (block (function_definition name: (identifier) @name) @def))
20
+ (class_definition body: (block (decorated_definition definition: (function_definition name: (identifier) @name) @def)))
20
21
  ]`,
21
- imports: `[
22
- (import_from_statement
23
- module_name: (dotted_name) @source
24
- ) @def
25
- (import_statement
26
- name: (dotted_name) @source
27
- ) @def
22
+ imports: `[
23
+ (import_from_statement
24
+ module_name: (dotted_name) @source
25
+ ) @def
26
+ (import_statement
27
+ name: (dotted_name) @source
28
+ ) @def
28
29
  ]`,
29
- exports: `(module
30
- (expression_statement
31
- (assignment
32
- left: (identifier) @_all
33
- right: (list (string (string_content) @name))
34
- )
35
- )
30
+ exports: `(module
31
+ (expression_statement
32
+ (assignment
33
+ left: (identifier) @_all
34
+ right: (list (string (string_content) @name))
35
+ )
36
+ )
36
37
  )`,
37
- calls: `[
38
- (call function: (identifier) @callee) @def
39
- (call function: (attribute object: (_) @receiver attribute: (identifier) @callee)) @def
40
- (decorator (identifier) @callee) @def
41
- (decorator (call function: (identifier) @callee)) @def
38
+ calls: `[
39
+ (call function: (identifier) @callee) @def
40
+ (call function: (attribute object: (_) @receiver attribute: (identifier) @callee)) @def
41
+ (decorator (identifier) @callee) @def
42
+ (decorator (call function: (identifier) @callee)) @def
42
43
  ]`,
43
- heritage: `(class_definition
44
- name: (identifier) @child
45
- superclasses: (argument_list (identifier) @parent)
44
+ heritage: `(class_definition
45
+ name: (identifier) @child
46
+ superclasses: (argument_list (identifier) @parent)
46
47
  ) @def`,
47
48
  },
48
49
  resolveImport(raw, fromFile, root, _aliases) {
@@ -1 +1 @@
1
- {"version":3,"file":"lang-py.js","sourceRoot":"","sources":["../../src/parser/lang-py.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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AC;gBAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -7,23 +7,23 @@ const spec = {
7
7
  queries: {
8
8
  classes: `(class name: (constant) @name) @def`,
9
9
  modules: `(module name: (constant) @name) @def`,
10
- methods: `[
11
- (method name: (identifier) @name) @def
12
- (singleton_method name: (identifier) @name) @def
10
+ methods: `[
11
+ (method name: (identifier) @name) @def
12
+ (singleton_method name: (identifier) @name) @def
13
13
  ]`,
14
- imports: `(call
15
- method: (identifier) @_req
16
- arguments: (argument_list (string (string_content) @source))
14
+ imports: `(call
15
+ method: (identifier) @_req
16
+ arguments: (argument_list (string (string_content) @source))
17
17
  ) @def`,
18
- calls: `[
19
- (call method: (identifier) @callee) @def
20
- (call receiver: (_) @receiver method: (identifier) @callee) @def
18
+ calls: `[
19
+ (call method: (identifier) @callee) @def
20
+ (call receiver: (_) @receiver method: (identifier) @callee) @def
21
21
  ]`,
22
- heritage: `[
23
- (class name: (constant) @child superclass: (superclass (constant) @parent)) @def
24
- (class name: (constant) @child superclass: (superclass (scope_resolution name: (constant) @parent))) @def
25
- (class name: (constant) @child body: (body_statement (call method: (identifier) @_inc arguments: (argument_list (constant) @parent)))) @def
26
- (class name: (constant) @child body: (body_statement (call method: (identifier) @_inc arguments: (argument_list (scope_resolution name: (constant) @parent))))) @def
22
+ heritage: `[
23
+ (class name: (constant) @child superclass: (superclass (constant) @parent)) @def
24
+ (class name: (constant) @child superclass: (superclass (scope_resolution name: (constant) @parent))) @def
25
+ (class name: (constant) @child body: (body_statement (call method: (identifier) @_inc arguments: (argument_list (constant) @parent)))) @def
26
+ (class name: (constant) @child body: (body_statement (call method: (identifier) @_inc arguments: (argument_list (scope_resolution name: (constant) @parent))))) @def
27
27
  ]`,
28
28
  },
29
29
  resolveImport(raw, fromFile, root, _aliases) {
@@ -11,41 +11,41 @@ const spec = {
11
11
  traits: `(trait_item name: (type_identifier) @name) @def`,
12
12
  modules: `(mod_item name: (identifier) @name) @def`,
13
13
  types: `(type_item name: (type_identifier) @name) @def`,
14
- variables: `[
15
- (const_item name: (identifier) @name) @def
16
- (static_item name: (identifier) @name) @def
14
+ variables: `[
15
+ (const_item name: (identifier) @name) @def
16
+ (static_item name: (identifier) @name) @def
17
17
  ]`,
18
- methods: `(impl_item
19
- body: (declaration_list
20
- (function_item name: (identifier) @name) @def
21
- )
18
+ methods: `(impl_item
19
+ body: (declaration_list
20
+ (function_item name: (identifier) @name) @def
21
+ )
22
22
  )`,
23
- imports: `(use_declaration
24
- argument: [
25
- (scoped_identifier) @source
26
- (use_as_clause path: (scoped_identifier) @source)
27
- (scoped_use_list path: (scoped_identifier) @source)
28
- ]
23
+ imports: `(use_declaration
24
+ argument: [
25
+ (scoped_identifier) @source
26
+ (use_as_clause path: (scoped_identifier) @source)
27
+ (scoped_use_list path: (scoped_identifier) @source)
28
+ ]
29
29
  ) @def`,
30
- calls: `[
31
- (call_expression function: (identifier) @callee) @def
32
- (call_expression function: (scoped_identifier name: (identifier) @callee)) @def
33
- (call_expression function: (field_expression value: (_) @receiver field: (field_identifier) @callee)) @def
34
- (macro_invocation macro: (identifier) @callee) @def
30
+ calls: `[
31
+ (call_expression function: (identifier) @callee) @def
32
+ (call_expression function: (scoped_identifier name: (identifier) @callee)) @def
33
+ (call_expression function: (field_expression value: (_) @receiver field: (field_identifier) @callee)) @def
34
+ (macro_invocation macro: (identifier) @callee) @def
35
35
  ]`,
36
- heritage: `(impl_item
37
- trait: (type_identifier) @parent
38
- type: (type_identifier) @child
36
+ heritage: `(impl_item
37
+ trait: (type_identifier) @parent
38
+ type: (type_identifier) @child
39
39
  ) @def`,
40
- exports: `[
41
- (function_item (visibility_modifier) name: (identifier) @name) @_def
42
- (struct_item (visibility_modifier) name: (type_identifier) @name) @_def
43
- (enum_item (visibility_modifier) name: (type_identifier) @name) @_def
44
- (trait_item (visibility_modifier) name: (type_identifier) @name) @_def
45
- (const_item (visibility_modifier) name: (identifier) @name) @_def
46
- (static_item (visibility_modifier) name: (identifier) @name) @_def
47
- (type_item (visibility_modifier) name: (type_identifier) @name) @_def
48
- (mod_item (visibility_modifier) name: (identifier) @name) @_def
40
+ exports: `[
41
+ (function_item (visibility_modifier) name: (identifier) @name) @_def
42
+ (struct_item (visibility_modifier) name: (type_identifier) @name) @_def
43
+ (enum_item (visibility_modifier) name: (type_identifier) @name) @_def
44
+ (trait_item (visibility_modifier) name: (type_identifier) @name) @_def
45
+ (const_item (visibility_modifier) name: (identifier) @name) @_def
46
+ (static_item (visibility_modifier) name: (identifier) @name) @_def
47
+ (type_item (visibility_modifier) name: (type_identifier) @name) @_def
48
+ (mod_item (visibility_modifier) name: (identifier) @name) @_def
49
49
  ]`,
50
50
  },
51
51
  resolveImport(raw, _fromFile, root, _aliases) {
@@ -1 +1 @@
1
- {"version":3,"file":"lang-ts.d.ts","sourceRoot":"","sources":["../../src/parser/lang-ts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,QA0MX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"lang-ts.d.ts","sourceRoot":"","sources":["../../src/parser/lang-ts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,QA4MX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -5,166 +5,168 @@ const spec = {
5
5
  extensions: ['.ts', '.tsx'],
6
6
  wasmName: 'tree-sitter-tsx',
7
7
  queries: {
8
- functions: `[
9
- (function_declaration name: (identifier) @name) @def
10
- (generator_function_declaration name: (identifier) @name) @def
11
- (lexical_declaration
12
- (variable_declarator
13
- name: (identifier) @name
14
- value: (arrow_function)
15
- )
16
- ) @def
8
+ functions: `[
9
+ (function_declaration name: (identifier) @name) @def
10
+ (generator_function_declaration name: (identifier) @name) @def
11
+ (lexical_declaration
12
+ (variable_declarator
13
+ name: (identifier) @name
14
+ value: (arrow_function)
15
+ )
16
+ ) @def
17
17
  ]`,
18
18
  classes: `(class_declaration name: (type_identifier) @name) @def`,
19
19
  methods: `(method_definition name: (property_identifier) @name) @def`,
20
20
  interfaces: `(interface_declaration name: (type_identifier) @name) @def`,
21
21
  enums: `(enum_declaration name: (identifier) @name) @def`,
22
22
  types: `(type_alias_declaration name: (type_identifier) @name) @def`,
23
- imports: `[
24
- (import_statement
25
- source: (string (string_fragment) @source)
26
- ) @def
27
- (call_expression
28
- function: (import)
29
- arguments: (arguments (string (string_fragment) @source))
30
- ) @def
31
- (lexical_declaration
32
- (variable_declarator
33
- value: (call_expression
34
- function: (identifier) @_req
35
- arguments: (arguments (string (string_fragment) @source))
36
- )
37
- )
38
- ) @def
23
+ variables: `(program (lexical_declaration
24
+ (variable_declarator name: (identifier) @name)) @def)`,
25
+ imports: `[
26
+ (import_statement
27
+ source: (string (string_fragment) @source)
28
+ ) @def
29
+ (call_expression
30
+ function: (import)
31
+ arguments: (arguments (string (string_fragment) @source))
32
+ ) @def
33
+ (lexical_declaration
34
+ (variable_declarator
35
+ value: (call_expression
36
+ function: (identifier) @_req
37
+ arguments: (arguments (string (string_fragment) @source))
38
+ )
39
+ )
40
+ ) @def
39
41
  ]`,
40
- exports: `[
41
- (export_statement
42
- declaration: (function_declaration name: (identifier) @name)
43
- )
44
- (export_statement
45
- declaration: (class_declaration name: (type_identifier) @name)
46
- )
47
- (export_statement
48
- declaration: (interface_declaration name: (type_identifier) @name)
49
- )
50
- (export_statement
51
- declaration: (enum_declaration name: (identifier) @name)
52
- )
53
- (export_statement
54
- declaration: (lexical_declaration
55
- (variable_declarator name: (identifier) @name)
56
- )
57
- )
58
- (export_statement
59
- (export_clause (export_specifier name: (identifier) @name))
60
- )
61
- (export_statement
62
- declaration: (type_alias_declaration name: (type_identifier) @name)
63
- )
64
- (export_statement
65
- declaration: (generator_function_declaration name: (identifier) @name)
66
- )
67
- (export_statement
68
- value: (identifier) @name
69
- )
42
+ exports: `[
43
+ (export_statement
44
+ declaration: (function_declaration name: (identifier) @name)
45
+ )
46
+ (export_statement
47
+ declaration: (class_declaration name: (type_identifier) @name)
48
+ )
49
+ (export_statement
50
+ declaration: (interface_declaration name: (type_identifier) @name)
51
+ )
52
+ (export_statement
53
+ declaration: (enum_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: (type_alias_declaration name: (type_identifier) @name)
65
+ )
66
+ (export_statement
67
+ declaration: (generator_function_declaration name: (identifier) @name)
68
+ )
69
+ (export_statement
70
+ value: (identifier) @name
71
+ )
70
72
  ]`,
71
- calls: `[
72
- (call_expression function: (identifier) @callee) @def
73
- (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee)) @def
74
- (new_expression constructor: (identifier) @callee) @def
75
- (new_expression constructor: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
76
- (decorator (identifier) @callee) @def
77
- (jsx_self_closing_element name: (identifier) @callee) @def
78
- (jsx_opening_element name: (identifier) @callee) @def
79
- (jsx_self_closing_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
80
- (jsx_opening_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
73
+ calls: `[
74
+ (call_expression function: (identifier) @callee) @def
75
+ (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee)) @def
76
+ (new_expression constructor: (identifier) @callee) @def
77
+ (new_expression constructor: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
78
+ (decorator (identifier) @callee) @def
79
+ (jsx_self_closing_element name: (identifier) @callee) @def
80
+ (jsx_opening_element name: (identifier) @callee) @def
81
+ (jsx_self_closing_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
82
+ (jsx_opening_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
81
83
  ]`,
82
- heritage: `[
83
- (class_declaration
84
- name: (type_identifier) @child
85
- (class_heritage (extends_clause value: (identifier) @parent))
86
- ) @def
87
- (class_declaration
88
- name: (type_identifier) @child
89
- (class_heritage (implements_clause (type_identifier) @parent))
90
- ) @def
84
+ heritage: `[
85
+ (class_declaration
86
+ name: (type_identifier) @child
87
+ (class_heritage (extends_clause value: (identifier) @parent))
88
+ ) @def
89
+ (class_declaration
90
+ name: (type_identifier) @child
91
+ (class_heritage (implements_clause (type_identifier) @parent))
92
+ ) @def
91
93
  ]`,
92
- reExports: `[
93
- (export_statement
94
- source: (string (string_fragment) @source)
95
- (export_clause (export_specifier name: (identifier) @name))
96
- ) @def
97
- (export_statement
98
- source: (string (string_fragment) @source)
99
- "*"
100
- ) @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
101
103
  ]`,
102
- typeBindings: `[
103
- (lexical_declaration
104
- (variable_declarator
105
- name: (identifier) @var
106
- value: (new_expression constructor: (identifier) @type)
107
- )
108
- )
109
- (lexical_declaration
110
- (variable_declarator
111
- name: (identifier) @var
112
- type: (type_annotation (type_identifier) @type)
113
- )
114
- )
115
- (required_parameter
116
- pattern: (identifier) @var
117
- type: (type_annotation (type_identifier) @type)
118
- )
119
- (public_field_definition
120
- name: (property_identifier) @var
121
- type: (type_annotation (type_identifier) @type)
122
- )
104
+ typeBindings: `[
105
+ (lexical_declaration
106
+ (variable_declarator
107
+ name: (identifier) @var
108
+ value: (new_expression constructor: (identifier) @type)
109
+ )
110
+ )
111
+ (lexical_declaration
112
+ (variable_declarator
113
+ name: (identifier) @var
114
+ type: (type_annotation (type_identifier) @type)
115
+ )
116
+ )
117
+ (required_parameter
118
+ pattern: (identifier) @var
119
+ type: (type_annotation (type_identifier) @type)
120
+ )
121
+ (public_field_definition
122
+ name: (property_identifier) @var
123
+ type: (type_annotation (type_identifier) @type)
124
+ )
123
125
  ]`,
124
- assignmentChains: `[
125
- (lexical_declaration
126
- (variable_declarator
127
- name: (identifier) @target
128
- value: (identifier) @source
129
- )
130
- )
126
+ assignmentChains: `[
127
+ (lexical_declaration
128
+ (variable_declarator
129
+ name: (identifier) @target
130
+ value: (identifier) @source
131
+ )
132
+ )
131
133
  ]`,
132
- returnTypes: `[
133
- (function_declaration
134
- name: (identifier) @name
135
- return_type: (type_annotation (type_identifier) @returnType)
136
- )
137
- (lexical_declaration
138
- (variable_declarator
139
- name: (identifier) @name
140
- value: (arrow_function
141
- return_type: (type_annotation (type_identifier) @returnType)
142
- )
143
- )
144
- )
145
- (class_declaration
146
- name: (type_identifier) @className
147
- body: (class_body
148
- (method_definition
149
- name: (property_identifier) @name
150
- return_type: (type_annotation (type_identifier) @returnType)
151
- )
152
- )
153
- )
134
+ returnTypes: `[
135
+ (function_declaration
136
+ name: (identifier) @name
137
+ return_type: (type_annotation (type_identifier) @returnType)
138
+ )
139
+ (lexical_declaration
140
+ (variable_declarator
141
+ name: (identifier) @name
142
+ value: (arrow_function
143
+ return_type: (type_annotation (type_identifier) @returnType)
144
+ )
145
+ )
146
+ )
147
+ (class_declaration
148
+ name: (type_identifier) @className
149
+ body: (class_body
150
+ (method_definition
151
+ name: (property_identifier) @name
152
+ return_type: (type_annotation (type_identifier) @returnType)
153
+ )
154
+ )
155
+ )
154
156
  ]`,
155
- callResultBindings: `[
156
- (lexical_declaration
157
- (variable_declarator
158
- name: (identifier) @var
159
- value: (call_expression function: (identifier) @callee)
160
- )
161
- )
162
- (lexical_declaration
163
- (variable_declarator
164
- name: (identifier) @var
165
- value: (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee))
166
- )
167
- )
157
+ callResultBindings: `[
158
+ (lexical_declaration
159
+ (variable_declarator
160
+ name: (identifier) @var
161
+ value: (call_expression function: (identifier) @callee)
162
+ )
163
+ )
164
+ (lexical_declaration
165
+ (variable_declarator
166
+ name: (identifier) @var
167
+ value: (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee))
168
+ )
169
+ )
168
170
  ]`,
169
171
  },
170
172
  resolveImport(raw, fromFile, root, aliases) {
@@ -1 +1 @@
1
- {"version":3,"file":"lang-ts.js","sourceRoot":"","sources":["../../src/parser/lang-ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,MAAM,IAAI,GAAa;IACrB,EAAE,EAAE,YAAY;IAChB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,iBAAiB;IAC3B,OAAO,EAAE;QACP,SAAS,EAAE;;;;;;;;;MAST;QACF,OAAO,EAAE,wDAAwD;QACjE,OAAO,EAAE,4DAA4D;QACrE,UAAU,EAAE,4DAA4D;QACxE,KAAK,EAAE,kDAAkD;QACzD,KAAK,EAAE,6DAA6D;QACpE,OAAO,EAAE;;;;;;;;;;;;;;;;MAgBP;QACF,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8BP;QACF,KAAK,EAAE;;;;;;;;;;MAUL;QACF,QAAQ,EAAE;;;;;;;;;MASR;QACF,SAAS,EAAE;;;;;;;;;MAST;QACF,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;MAqBZ;QACF,gBAAgB,EAAE;;;;;;;MAOhB;QACF,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;MAsBX;QACF,kBAAkB,EAAE;;;;;;;;;;;;;MAalB;KACH;IACD,aAAa,CAAC,GAAG,EAAE,QAAQ,EAA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