quilt-python 0.4.0__tar.gz → 0.5.0__tar.gz

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.
Files changed (126) hide show
  1. {quilt_python-0.4.0 → quilt_python-0.5.0}/Cargo.lock +7 -56
  2. {quilt_python-0.4.0 → quilt_python-0.5.0}/Cargo.toml +3 -3
  3. {quilt_python-0.4.0 → quilt_python-0.5.0}/PKG-INFO +1 -1
  4. quilt_python-0.5.0/quilt/grammars/bash/highlights.scm +56 -0
  5. quilt_python-0.5.0/quilt/grammars/html/highlights.scm +13 -0
  6. quilt_python-0.5.0/quilt/grammars/python/highlights.scm +137 -0
  7. quilt_python-0.5.0/quilt/grammars/zsh/highlights.scm +59 -0
  8. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/grammars.rs +29 -4
  9. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/Cargo.toml +1 -1
  10. {quilt_python-0.4.0 → quilt_python-0.5.0}/pyproject.toml +0 -0
  11. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/Cargo.toml +0 -0
  12. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/__init__.py +0 -0
  13. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/build.rs +0 -0
  14. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/bash/parser.c +0 -0
  15. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/bash/scanner.c +0 -0
  16. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/bash/tree_sitter/alloc.h +0 -0
  17. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/bash/tree_sitter/array.h +0 -0
  18. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/bash/tree_sitter/parser.h +0 -0
  19. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/html/parser.c +0 -0
  20. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/html/scanner.c +0 -0
  21. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/html/tag.h +0 -0
  22. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/html/tree_sitter/alloc.h +0 -0
  23. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/html/tree_sitter/array.h +0 -0
  24. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/html/tree_sitter/parser.h +0 -0
  25. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/python/parser.c +0 -0
  26. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/python/scanner.c +0 -0
  27. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/python/tree_sitter/alloc.h +0 -0
  28. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/python/tree_sitter/array.h +0 -0
  29. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/python/tree_sitter/parser.h +0 -0
  30. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/rust/parser.c +0 -0
  31. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/rust/scanner.c +0 -0
  32. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/rust/tree_sitter/alloc.h +0 -0
  33. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/rust/tree_sitter/array.h +0 -0
  34. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/rust/tree_sitter/parser.h +0 -0
  35. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/typescript/common/scanner.h +0 -0
  36. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/typescript/typescript/src/parser.c +0 -0
  37. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/typescript/typescript/src/scanner.c +0 -0
  38. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/typescript/typescript/src/tree_sitter/alloc.h +0 -0
  39. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/typescript/typescript/src/tree_sitter/array.h +0 -0
  40. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/typescript/typescript/src/tree_sitter/parser.h +0 -0
  41. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/wgsl/parser.c +0 -0
  42. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/wgsl/scanner.c +0 -0
  43. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/wgsl/tree_sitter/alloc.h +0 -0
  44. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/wgsl/tree_sitter/array.h +0 -0
  45. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/wgsl/tree_sitter/parser.h +0 -0
  46. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/zsh/parser.c +0 -0
  47. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/zsh/scanner.c +0 -0
  48. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/zsh/tree_sitter/alloc.h +0 -0
  49. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/zsh/tree_sitter/array.h +0 -0
  50. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/grammars/zsh/tree_sitter/parser.h +0 -0
  51. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/bin.rs +0 -0
  52. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/lang.rs +0 -0
  53. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/bash/lang.rs +0 -0
  54. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/bash/mod.rs +0 -0
  55. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/bootstrap/lang.rs +0 -0
  56. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/bootstrap/meta.rs +0 -0
  57. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/bootstrap/mk_meta.rs.quilt +0 -0
  58. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/bootstrap/mod.rs +0 -0
  59. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/bootstrap/strlift.rs +0 -0
  60. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/html/lang.rs +0 -0
  61. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/html/mod.rs +0 -0
  62. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/mod.rs +0 -0
  63. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/omni.rs +0 -0
  64. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/python/lang.rs +0 -0
  65. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/python/meta.rs +0 -0
  66. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/python/mod.rs +0 -0
  67. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/python/ops.rs +0 -0
  68. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/rust/lang.rs +0 -0
  69. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/rust/meta.rs +0 -0
  70. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/rust/mod.rs +0 -0
  71. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/rust/ops.rs +0 -0
  72. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/text/lang.rs +0 -0
  73. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/text/meta.rs +0 -0
  74. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/text/mod.rs +0 -0
  75. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/typescript/lang.rs +0 -0
  76. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/typescript/meta.rs +0 -0
  77. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/typescript/mod.rs +0 -0
  78. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/typescript/ops.rs +0 -0
  79. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/wgsl/lang.rs +0 -0
  80. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/wgsl/mod.rs +0 -0
  81. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/zsh/lang.rs +0 -0
  82. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/langs/zsh/mod.rs +0 -0
  83. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/lib.rs +0 -0
  84. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/lift.rs +0 -0
  85. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/meta.rs +0 -0
  86. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/multi.rs +0 -0
  87. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/node.rs +0 -0
  88. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/prelude.rs +0 -0
  89. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/qmatch.rs +0 -0
  90. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/qterm.rs +0 -0
  91. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/strcmd.rs +0 -0
  92. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/term.rs +0 -0
  93. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/treesitter.rs +0 -0
  94. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/util.rs +0 -0
  95. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/validate.rs +0 -0
  96. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/src/zipper.rs +0 -0
  97. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/bootstrap.rs +0 -0
  98. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/expand.rs +0 -0
  99. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/expand_html.rs +0 -0
  100. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/expand_python.rs +0 -0
  101. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/expand_rust.rs +0 -0
  102. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/expand_typescript.rs +0 -0
  103. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/expand_wgsl.rs +0 -0
  104. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/inner_kinds.rs +0 -0
  105. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/kinds.rs +0 -0
  106. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/multiline.rs +0 -0
  107. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/strlift.rs +0 -0
  108. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt/tests/tests.rs +0 -0
  109. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt-python/.gitignore +0 -0
  110. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt-python/Cargo.toml +0 -0
  111. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt-python/src/lib.rs +0 -0
  112. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt-python/tests/demo.py +0 -0
  113. {quilt_python-0.4.0 → quilt_python-0.5.0}/quilt-python/tests/test_main.py +0 -0
  114. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/LICENSE-APACHE +0 -0
  115. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/LICENSE-MIT +0 -0
  116. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/bindings/rust/build.rs +0 -0
  117. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/bindings/rust/lib.rs +0 -0
  118. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/grammar.js +0 -0
  119. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/queries/highlights.scm +0 -0
  120. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/src/grammar.json +0 -0
  121. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/src/node-types.json +0 -0
  122. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/src/parser.c +0 -0
  123. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/src/tree_sitter/alloc.h +0 -0
  124. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/src/tree_sitter/array.h +0 -0
  125. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/src/tree_sitter/parser.h +0 -0
  126. {quilt_python-0.4.0 → quilt_python-0.5.0}/tree-sitter-quilt/tree-sitter.json +0 -0
@@ -979,7 +979,7 @@ dependencies = [
979
979
 
980
980
  [[package]]
981
981
  name = "quilt-expand-wasm"
982
- version = "0.4.0"
982
+ version = "0.5.0"
983
983
  dependencies = [
984
984
  "miette",
985
985
  "quiltlang",
@@ -987,10 +987,11 @@ dependencies = [
987
987
 
988
988
  [[package]]
989
989
  name = "quilt-lsp"
990
- version = "0.4.0"
990
+ version = "0.5.0"
991
991
  dependencies = [
992
992
  "anyhow",
993
993
  "dashmap 6.2.1",
994
+ "quiltlang",
994
995
  "serde",
995
996
  "serde_json",
996
997
  "streaming-iterator",
@@ -1000,17 +1001,12 @@ dependencies = [
1000
1001
  "tracing",
1001
1002
  "tracing-subscriber",
1002
1003
  "tree-sitter",
1003
- "tree-sitter-bash",
1004
- "tree-sitter-html",
1005
- "tree-sitter-python",
1006
1004
  "tree-sitter-quilt",
1007
- "tree-sitter-wgsl",
1008
- "tree-sitter-zsh",
1009
1005
  ]
1010
1006
 
1011
1007
  [[package]]
1012
1008
  name = "quilt-wasm"
1013
- version = "0.4.0"
1009
+ version = "0.5.0"
1014
1010
  dependencies = [
1015
1011
  "quiltlang",
1016
1012
  "wasm-bindgen",
@@ -1018,7 +1014,7 @@ dependencies = [
1018
1014
 
1019
1015
  [[package]]
1020
1016
  name = "quilt_python"
1021
- version = "0.4.0"
1017
+ version = "0.5.0"
1022
1018
  dependencies = [
1023
1019
  "postcard",
1024
1020
  "pyo3",
@@ -1027,7 +1023,7 @@ dependencies = [
1027
1023
 
1028
1024
  [[package]]
1029
1025
  name = "quiltlang"
1030
- version = "0.4.0"
1026
+ version = "0.5.0"
1031
1027
  dependencies = [
1032
1028
  "cc",
1033
1029
  "clap",
@@ -1570,66 +1566,21 @@ dependencies = [
1570
1566
  "tree-sitter-language",
1571
1567
  ]
1572
1568
 
1573
- [[package]]
1574
- name = "tree-sitter-bash"
1575
- version = "0.25.1"
1576
- source = "git+https://github.com/QuiltLang/tree-sitter-bash.git?rev=4e44c9fca4f64f75dbafd64d07eb3b065f15e45b#4e44c9fca4f64f75dbafd64d07eb3b065f15e45b"
1577
- dependencies = [
1578
- "cc",
1579
- "tree-sitter-language",
1580
- ]
1581
-
1582
- [[package]]
1583
- name = "tree-sitter-html"
1584
- version = "0.23.2"
1585
- source = "git+https://github.com/QuiltLang/tree-sitter-html.git?rev=d81ae0f44b1e084a3383b3355c62cb6953260467#d81ae0f44b1e084a3383b3355c62cb6953260467"
1586
- dependencies = [
1587
- "cc",
1588
- "tree-sitter-language",
1589
- ]
1590
-
1591
1569
  [[package]]
1592
1570
  name = "tree-sitter-language"
1593
1571
  version = "0.1.7"
1594
1572
  source = "registry+https://github.com/rust-lang/crates.io-index"
1595
1573
  checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782"
1596
1574
 
1597
- [[package]]
1598
- name = "tree-sitter-python"
1599
- version = "0.23.6"
1600
- source = "git+https://github.com/QuiltLang/tree-sitter-python.git?rev=72de24676b4acb63d6cee78eaf3d5d18fd2ad6b9#72de24676b4acb63d6cee78eaf3d5d18fd2ad6b9"
1601
- dependencies = [
1602
- "cc",
1603
- "tree-sitter-language",
1604
- ]
1605
-
1606
1575
  [[package]]
1607
1576
  name = "tree-sitter-quilt"
1608
- version = "0.4.0"
1577
+ version = "0.5.0"
1609
1578
  dependencies = [
1610
1579
  "cc",
1611
1580
  "tree-sitter",
1612
1581
  "tree-sitter-language",
1613
1582
  ]
1614
1583
 
1615
- [[package]]
1616
- name = "tree-sitter-wgsl"
1617
- version = "0.0.1"
1618
- source = "git+https://github.com/QuiltLang/tree-sitter-wgsl.git?rev=a83b84c4dd9ce8f28ee79d36b09ccbaef0f51d6b#a83b84c4dd9ce8f28ee79d36b09ccbaef0f51d6b"
1619
- dependencies = [
1620
- "cc",
1621
- "tree-sitter-language",
1622
- ]
1623
-
1624
- [[package]]
1625
- name = "tree-sitter-zsh"
1626
- version = "0.63.4"
1627
- source = "git+https://github.com/QuiltLang/tree-sitter-zsh.git?rev=6923371dfd93a273e6ef4af0ba27c12ec8e5ab1d#6923371dfd93a273e6ef4af0ba27c12ec8e5ab1d"
1628
- dependencies = [
1629
- "cc",
1630
- "tree-sitter-language",
1631
- ]
1632
-
1633
1584
  [[package]]
1634
1585
  name = "unicode-ident"
1635
1586
  version = "1.0.24"
@@ -4,7 +4,7 @@ members = ["quilt", "quilt-python", "tree-sitter-quilt"]
4
4
 
5
5
  [workspace.package]
6
6
  edition = "2021"
7
- version = "0.4.0"
7
+ version = "0.5.0"
8
8
  license = "MIT OR Apache-2.0"
9
9
  authors = ["Alexander Varga <varga.alex@gmail.com>"]
10
10
  repository = "https://github.com/QuiltLang/quilt"
@@ -12,10 +12,10 @@ repository = "https://github.com/QuiltLang/quilt"
12
12
  [workspace.dependencies]
13
13
  # Internal crates. The core package is published as `quiltlang` (issue #33);
14
14
  # `package =` keeps the `quilt` dependency key so `use quilt::...` is unchanged.
15
- quilt = {version = "0.4.0", path = "quilt", package = "quiltlang", default-features = false}
15
+ quilt = {version = "0.5.0", path = "quilt", package = "quiltlang", default-features = false}
16
16
  # `version` is required alongside `path` so dependents (quiltlang, quilt-lsp)
17
17
  # can be `cargo publish`ed: the registry copy drops `path` and keeps `version`.
18
- tree-sitter-quilt = {version = "0.4.0", path = "tree-sitter-quilt"}
18
+ tree-sitter-quilt = {version = "0.5.0", path = "tree-sitter-quilt"}
19
19
  # Grammar crates pulled from their QuiltLang forks (previously git submodules).
20
20
  # Each is pinned to an explicit `rev` so the build is reproducible even for
21
21
  # library consumers and `cargo install --git … quiltlang` runs that ignore our
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quilt-python
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -0,0 +1,56 @@
1
+ [
2
+ (string)
3
+ (raw_string)
4
+ (heredoc_body)
5
+ (heredoc_start)
6
+ ] @string
7
+
8
+ (command_name) @function
9
+
10
+ (variable_name) @property
11
+
12
+ [
13
+ "case"
14
+ "do"
15
+ "done"
16
+ "elif"
17
+ "else"
18
+ "esac"
19
+ "export"
20
+ "fi"
21
+ "for"
22
+ "function"
23
+ "if"
24
+ "in"
25
+ "select"
26
+ "then"
27
+ "unset"
28
+ "until"
29
+ "while"
30
+ ] @keyword
31
+
32
+ (comment) @comment
33
+
34
+ (function_definition name: (word) @function)
35
+
36
+ (file_descriptor) @number
37
+
38
+ [
39
+ (command_substitution)
40
+ (process_substitution)
41
+ (expansion)
42
+ ]@embedded
43
+
44
+ [
45
+ "$"
46
+ "&&"
47
+ ">"
48
+ ">>"
49
+ "<"
50
+ "|"
51
+ ] @operator
52
+
53
+ (
54
+ (command (_) @constant)
55
+ (#match? @constant "^-")
56
+ )
@@ -0,0 +1,13 @@
1
+ (tag_name) @tag
2
+ (erroneous_end_tag_name) @tag.error
3
+ (doctype) @constant
4
+ (attribute_name) @attribute
5
+ (attribute_value) @string
6
+ (comment) @comment
7
+
8
+ [
9
+ "<"
10
+ ">"
11
+ "</"
12
+ "/>"
13
+ ] @punctuation.bracket
@@ -0,0 +1,137 @@
1
+ ; Identifier naming conventions
2
+
3
+ (identifier) @variable
4
+
5
+ ((identifier) @constructor
6
+ (#match? @constructor "^[A-Z]"))
7
+
8
+ ((identifier) @constant
9
+ (#match? @constant "^[A-Z][A-Z_]*$"))
10
+
11
+ ; Function calls
12
+
13
+ (decorator) @function
14
+ (decorator
15
+ (identifier) @function)
16
+
17
+ (call
18
+ function: (attribute attribute: (identifier) @function.method))
19
+ (call
20
+ function: (identifier) @function)
21
+
22
+ ; Builtin functions
23
+
24
+ ((call
25
+ function: (identifier) @function.builtin)
26
+ (#match?
27
+ @function.builtin
28
+ "^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$"))
29
+
30
+ ; Function definitions
31
+
32
+ (function_definition
33
+ name: (identifier) @function)
34
+
35
+ (attribute attribute: (identifier) @property)
36
+ (type (identifier) @type)
37
+
38
+ ; Literals
39
+
40
+ [
41
+ (none)
42
+ (true)
43
+ (false)
44
+ ] @constant.builtin
45
+
46
+ [
47
+ (integer)
48
+ (float)
49
+ ] @number
50
+
51
+ (comment) @comment
52
+ (string) @string
53
+ (escape_sequence) @escape
54
+
55
+ (interpolation
56
+ "{" @punctuation.special
57
+ "}" @punctuation.special) @embedded
58
+
59
+ [
60
+ "-"
61
+ "-="
62
+ "!="
63
+ "*"
64
+ "**"
65
+ "**="
66
+ "*="
67
+ "/"
68
+ "//"
69
+ "//="
70
+ "/="
71
+ "&"
72
+ "&="
73
+ "%"
74
+ "%="
75
+ "^"
76
+ "^="
77
+ "+"
78
+ "->"
79
+ "+="
80
+ "<"
81
+ "<<"
82
+ "<<="
83
+ "<="
84
+ "<>"
85
+ "="
86
+ ":="
87
+ "=="
88
+ ">"
89
+ ">="
90
+ ">>"
91
+ ">>="
92
+ "|"
93
+ "|="
94
+ "~"
95
+ "@="
96
+ "and"
97
+ "in"
98
+ "is"
99
+ "not"
100
+ "or"
101
+ "is not"
102
+ "not in"
103
+ ] @operator
104
+
105
+ [
106
+ "as"
107
+ "assert"
108
+ "async"
109
+ "await"
110
+ "break"
111
+ "class"
112
+ "continue"
113
+ "def"
114
+ "del"
115
+ "elif"
116
+ "else"
117
+ "except"
118
+ "exec"
119
+ "finally"
120
+ "for"
121
+ "from"
122
+ "global"
123
+ "if"
124
+ "import"
125
+ "lambda"
126
+ "nonlocal"
127
+ "pass"
128
+ "print"
129
+ "raise"
130
+ "return"
131
+ "try"
132
+ "while"
133
+ "with"
134
+ "yield"
135
+ "match"
136
+ "case"
137
+ ] @keyword
@@ -0,0 +1,59 @@
1
+ [
2
+ (string)
3
+ (raw_string)
4
+ (heredoc_body)
5
+ (heredoc_start)
6
+ ] @string
7
+
8
+ [
9
+ (command_name)
10
+ (declaration_command)
11
+ ]@function
12
+
13
+
14
+ (variable_name) @property
15
+
16
+ [
17
+ "case"
18
+ "do"
19
+ "done"
20
+ "elif"
21
+ "else"
22
+ "esac"
23
+ "export"
24
+ "fi"
25
+ "for"
26
+ "function"
27
+ "if"
28
+ "in"
29
+ "select"
30
+ "then"
31
+ "unset"
32
+ "until"
33
+ "while"
34
+ ] @keyword
35
+
36
+ (comment) @comment
37
+
38
+ (function_definition name: (word) @function)
39
+
40
+ (file_descriptor) @number
41
+
42
+ [
43
+ (command_substitution)
44
+ (process_substitution)
45
+ (expansion)
46
+ ]@embedded
47
+
48
+ [
49
+ "&&"
50
+ ">"
51
+ ">>"
52
+ "<"
53
+ "|"
54
+ ] @operator
55
+
56
+ (
57
+ (command (_) @constant)
58
+ (#match? @constant "^-")
59
+ )
@@ -31,13 +31,38 @@ macro_rules! grammar {
31
31
  pub const $konst: LanguageFn = unsafe { LanguageFn::from_raw($func) };
32
32
  }
33
33
  };
34
+ // As above, plus the fork's highlight query (vendored from the same pinned
35
+ // rev as the parser, at quilt/grammars/<module>/highlights.scm) exposed as
36
+ // `HIGHLIGHTS_QUERY` for tree-sitter-highlight consumers like quilt-lsp.
37
+ ($feat:literal, $module:ident, $konst:ident, $func:ident, highlights) => {
38
+ #[cfg(feature = $feat)]
39
+ pub mod $module {
40
+ use tree_sitter_language::LanguageFn;
41
+
42
+ extern "C" {
43
+ fn $func() -> *const ();
44
+ }
45
+
46
+ /// The tree-sitter [`LanguageFn`](tree_sitter_language::LanguageFn)
47
+ /// for this vendored grammar.
48
+ pub const $konst: LanguageFn = unsafe { LanguageFn::from_raw($func) };
49
+
50
+ /// The fork's tree-sitter highlight query (`queries/highlights.scm`),
51
+ /// vendored alongside the parser from the same pinned rev.
52
+ pub const HIGHLIGHTS_QUERY: &str = include_str!(concat!(
53
+ "../grammars/",
54
+ stringify!($module),
55
+ "/highlights.scm"
56
+ ));
57
+ }
58
+ };
34
59
  }
35
60
 
36
61
  // Host languages: their parsers are tied to the `parse` umbrella feature (see
37
62
  // `build.rs` and `Cargo.toml`), so they are always present whenever this module
38
63
  // is compiled.
39
64
  grammar!("parse", rust, LANGUAGE, tree_sitter_rust);
40
- grammar!("parse", python, LANGUAGE, tree_sitter_python);
65
+ grammar!("parse", python, LANGUAGE, tree_sitter_python, highlights);
41
66
 
42
67
  // Target languages: each behind its own feature (which implies `parse`).
43
68
  grammar!(
@@ -47,6 +72,6 @@ grammar!(
47
72
  tree_sitter_typescript
48
73
  );
49
74
  grammar!("wgsl", wgsl, LANGUAGE, tree_sitter_wgsl);
50
- grammar!("bash", bash, LANGUAGE, tree_sitter_bash);
51
- grammar!("html", html, LANGUAGE, tree_sitter_html);
52
- grammar!("zsh", zsh, LANGUAGE, tree_sitter_zsh);
75
+ grammar!("bash", bash, LANGUAGE, tree_sitter_bash, highlights);
76
+ grammar!("html", html, LANGUAGE, tree_sitter_html, highlights);
77
+ grammar!("zsh", zsh, LANGUAGE, tree_sitter_zsh, highlights);
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  name = "tree-sitter-quilt"
3
3
  description = "Quilt grammar for tree-sitter"
4
- version = "0.4.0"
4
+ version = "0.5.0"
5
5
  authors = ["Alexander Varga <varga.alex@gmail.com>"]
6
6
  license.workspace = true
7
7
  keywords = ["incremental", "parsing", "tree-sitter", "quilt"]