aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query
diff options
context:
space:
mode:
authorYongJieYongJie <KhooYongJie@gmx.com>2022-03-11 05:07:26 +0800
committerStephan Seitz <stephan.seitz@fau.de>2022-03-11 19:06:39 +0100
commit8f3991065d4753c4b458fb19b9a2332f3d740c50 (patch)
tree2e7b65db6c6203374b69fb6d693cdc652eca810d /tests/query
parentAdd highlights query for Solidity (diff)
downloadnvim-treesitter-8f3991065d4753c4b458fb19b9a2332f3d740c50.tar
nvim-treesitter-8f3991065d4753c4b458fb19b9a2332f3d740c50.tar.gz
nvim-treesitter-8f3991065d4753c4b458fb19b9a2332f3d740c50.tar.bz2
nvim-treesitter-8f3991065d4753c4b458fb19b9a2332f3d740c50.tar.lz
nvim-treesitter-8f3991065d4753c4b458fb19b9a2332f3d740c50.tar.xz
nvim-treesitter-8f3991065d4753c4b458fb19b9a2332f3d740c50.tar.zst
nvim-treesitter-8f3991065d4753c4b458fb19b9a2332f3d740c50.zip
Refactor solidity highlights.scm
- Use more specific/appropriate captures; change invalid captures - Don't highlight punctuations in type names (e.g., the brackets in 'bytes32[]')
Diffstat (limited to 'tests/query')
-rw-r--r--tests/query/highlights/solidity/test.sol9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/query/highlights/solidity/test.sol b/tests/query/highlights/solidity/test.sol
index 8781b60ed..aadf11b6d 100644
--- a/tests/query/highlights/solidity/test.sol
+++ b/tests/query/highlights/solidity/test.sol
@@ -5,6 +5,10 @@
pragma solidity >=0.7.0 <0.9.0;
// ^ keyword
// ^ tag
+
+import * as something from "anotherFile";
+// ^ ^ ^ include
+
/// @title Voting with delegation.
// ^ attribute
contract Ballot {
@@ -170,4 +174,9 @@ contract Ballot {
}
}
+contract Another {
+ Ballot b = new Ballot(new bytes32[](1));
+// ^ keyword.operator
+}
+
// vim:ft=solidity