mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
refactor: Update solidity-tags.scm with more specific @name tags
This commit is contained in:
parent
65fad5ae30
commit
a0b5b19d38
1 changed files with 13 additions and 13 deletions
|
@ -1,43 +1,43 @@
|
||||||
;; Method and Function declarations
|
;; Method and Function declarations
|
||||||
(contract_declaration (_
|
(contract_declaration (_
|
||||||
(function_definition
|
(function_definition
|
||||||
name: (identifier) @name) @definition.method))
|
name: (identifier) @name.definition.function) @definition.method))
|
||||||
|
|
||||||
(source_file
|
(source_file
|
||||||
(function_definition
|
(function_definition
|
||||||
name: (identifier) @name) @definition.function)
|
name: (identifier) @name.definition.function) @definition.function)
|
||||||
|
|
||||||
;; Contract, struct, enum and interface declarations
|
;; Contract, struct, enum and interface declarations
|
||||||
(contract_declaration
|
(contract_declaration
|
||||||
name: (identifier) @name) @definition.class
|
name: (identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
(interface_declaration
|
(interface_declaration
|
||||||
name: (identifier) @name) @definition.interface
|
name: (identifier) @name.definition.interface) @definition.interface
|
||||||
|
|
||||||
(library_declaration
|
(library_declaration
|
||||||
name: (identifier) @name) @definition.interface
|
name: (identifier) @name.definition.class) @definition.interface
|
||||||
|
|
||||||
(struct_declaration name: (identifier) @name) @definition.class
|
(struct_declaration name: (identifier) @name.definition.class) @definition.class
|
||||||
(enum_declaration name: (identifier) @name) @definition.class
|
(enum_declaration name: (identifier) @name.definition.class) @definition.class
|
||||||
(event_definition name: (identifier) @name) @definition.class
|
(event_definition name: (identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
;; Function calls
|
;; Function calls
|
||||||
(call_expression (expression (identifier)) @name ) @reference.call
|
(call_expression (expression (identifier)) @name.reference.call ) @reference.call
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
(expression (member_expression
|
(expression (member_expression
|
||||||
property: (_) @name ))) @reference.call
|
property: (_) @name.reference.method ))) @reference.call
|
||||||
|
|
||||||
;; Log emit
|
;; Log emit
|
||||||
(emit_statement name: (_) @name) @reference.class
|
(emit_statement name: (_) @name.reference.class) @reference.class
|
||||||
|
|
||||||
|
|
||||||
;; Inheritance
|
;; Inheritance
|
||||||
|
|
||||||
(inheritance_specifier
|
(inheritance_specifier
|
||||||
ancestor: (user_defined_type (_) @name . )) @reference.class
|
ancestor: (user_defined_type (_) @name.reference.class . )) @reference.class
|
||||||
|
|
||||||
|
|
||||||
;; Imports ( note that unknown is not standardised )
|
;; Imports ( note that unknown is not standardised )
|
||||||
(import_directive
|
(import_directive
|
||||||
import_name: (_) @name ) @reference.unknown
|
import_name: (_) @name.reference.module ) @reference.unknown
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue