Skip to content

Commit

Permalink
Added basic support for solidity language.
Browse files Browse the repository at this point in the history
Can jump into functions, modifiers, events and custom errors.
  • Loading branch information
hrkrshnn committed Jun 22, 2021
1 parent 0fad329 commit 59b5eab
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -65,6 +65,7 @@ There is currently basic support for the following languages:
* Scala
* Scheme
* SML
* Solidity
* SQL
* Swift
* SystemVerilog
Expand Down
19 changes: 19 additions & 0 deletions dumb-jump.el
Expand Up @@ -758,6 +758,23 @@ or most optimal searcher."
:regex "object\\s*JJJ\\s*\\\(?"
:tests ("object test(object)"))

;; solidity
(:type "function" :supports ("ag" "grep" "rg" "git-grep") :language "solidity"
:regex "function\\s*JJJ\\s*\\\("
:tests ("function test() internal" "function test (uint x, address y)" "function test() external"))

(:type "modifier" :supports ("ag" "grep" "rg" "git-grep") :language "solidity"
:regex "modifier\\s*JJJ\\s*\\\("
:tests ("modifier test()" "modifier test ()"))

(:type "event" :supports ("ag" "grep" "rg" "git-grep") :language "solidity"
:regex "event\\s*JJJ\\s*\\\("
:tests ("event test();" "event test (uint indexed x)" "event test(uint x, address y)"))

(:type "error" :supports ("ag" "grep" "rg" "git-grep") :language "solidity"
:regex "error\\s*JJJ\\s*\\\("
:tests ("error test();" "error test (uint x)" "error test(uint x, address y)"))

;; R
(:type "variable" :supports ("ag" "grep" "rg" "git-grep") :language "r"
:regex "\\bJJJ\\s*=[^=><]" :tests ("test = 1234") :not ("if (test == 1234)"))
Expand Down Expand Up @@ -1639,6 +1656,7 @@ or most optimal searcher."
(:language "shell" :ext "ksh" :agtype nil :rgtype nil)
(:language "shell" :ext "tcsh" :agtype nil :rgtype nil)
(:language "sml" :ext "sml" :agtype "sml" :rgtype "sml")
(:language "solidity" :ext "sol" :agtype nil :rgtype nil)
(:language "sql" :ext "sql" :agtype "sql" :rgtype "sql")
(:language "swift" :ext "swift" :agtype nil :rgtype "swift")
(:language "tex" :ext "tex" :agtype "tex" :rgtype "tex")
Expand Down Expand Up @@ -2333,6 +2351,7 @@ current file."
(:comment "//" :language "scala")
(:comment ";" :language "scheme")
(:comment "#" :language "shell")
(:comment "//" :language "solidity")
(:comment "//" :language "swift")
(:comment "#" :language "elixir")
(:comment "%" :language "erlang")
Expand Down

0 comments on commit 59b5eab

Please sign in to comment.