Skip to content

Commit 0ac00e7

Browse files
committed
deps src: Automatic update
1 parent 4467e78 commit 0ac00e7

21 files changed

+5431
-4727
lines changed

src/treesitter_vimdoc-stamp/download-treesitter_vimdoc.cmake

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ function(check_file_hash has_hash hash_is_good)
2222
set("${has_hash}" TRUE PARENT_SCOPE)
2323

2424
message(VERBOSE "verifying file...
25-
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz'")
25+
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz'")
2626

27-
file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz" actual_value)
27+
file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz" actual_value)
2828

29-
if(NOT "${actual_value}" STREQUAL "13f2dd182436e0b75db33cc1d097ab0442e0c3135375998f15331dbe9c6b74ab")
29+
if(NOT "${actual_value}" STREQUAL "020e8f117f648c8697fca967995c342e92dbd81dab137a115cc7555207fbc84f")
3030
set("${hash_is_good}" FALSE PARENT_SCOPE)
3131
message(VERBOSE "SHA256 hash of
32-
/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz
32+
/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz
3333
does not match expected value
34-
expected: '13f2dd182436e0b75db33cc1d097ab0442e0c3135375998f15331dbe9c6b74ab'
34+
expected: '020e8f117f648c8697fca967995c342e92dbd81dab137a115cc7555207fbc84f'
3535
actual: '${actual_value}'")
3636
else()
3737
set("${hash_is_good}" TRUE PARENT_SCOPE)
@@ -71,32 +71,32 @@ function(sleep_before_download attempt)
7171
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep "${sleep_seconds}")
7272
endfunction()
7373

74-
if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz")
74+
if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz")
7575
check_file_hash(has_hash hash_is_good)
7676
if(has_hash)
7777
if(hash_is_good)
7878
message(VERBOSE "File already exists and hash match (skip download):
79-
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz'
80-
SHA256='13f2dd182436e0b75db33cc1d097ab0442e0c3135375998f15331dbe9c6b74ab'"
79+
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz'
80+
SHA256='020e8f117f648c8697fca967995c342e92dbd81dab137a115cc7555207fbc84f'"
8181
)
8282
return()
8383
else()
8484
message(VERBOSE "File already exists but hash mismatch. Removing...")
85-
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz")
85+
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz")
8686
endif()
8787
else()
8888
message(VERBOSE "File already exists but no hash specified (use URL_HASH):
89-
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz'
89+
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz'
9090
Old file will be removed and new file downloaded from URL."
9191
)
92-
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz")
92+
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz")
9393
endif()
9494
endif()
9595

9696
set(retry_number 5)
9797

9898
message(VERBOSE "Downloading...
99-
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz'
99+
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz'
100100
timeout='none'
101101
inactivity timeout='none'"
102102
)
@@ -107,7 +107,7 @@ foreach(i RANGE ${retry_number})
107107
if(status_code IN_LIST download_retry_codes)
108108
sleep_before_download(${i})
109109
endif()
110-
foreach(url IN ITEMS [====[https://github.com/neovim/tree-sitter-vimdoc/archive/v4.0.2.tar.gz]====])
110+
foreach(url IN ITEMS [====[https://github.com/neovim/tree-sitter-vimdoc/archive/v4.1.0.tar.gz]====])
111111
if(NOT url IN_LIST skip_url_list)
112112
message(VERBOSE "Using src='${url}'")
113113

@@ -119,7 +119,7 @@ foreach(i RANGE ${retry_number})
119119

120120
file(
121121
DOWNLOAD
122-
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz"
122+
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz"
123123

124124
# no TIMEOUT
125125
# no INACTIVITY_TIMEOUT
@@ -136,7 +136,7 @@ foreach(i RANGE ${retry_number})
136136
check_file_hash(has_hash hash_is_good)
137137
if(has_hash AND NOT hash_is_good)
138138
message(VERBOSE "Hash mismatch, removing...")
139-
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz")
139+
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz")
140140
else()
141141
message(VERBOSE "Downloading... done")
142142
return()

src/treesitter_vimdoc-stamp/extract-treesitter_vimdoc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION ${CMAKE_VERSION}) # this file comes with cmake
55

66
# Make file names absolute:
77
#
8-
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.0.2.tar.gz" ABSOLUTE)
8+
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter_vimdoc/v4.1.0.tar.gz" ABSOLUTE)
99
get_filename_component(directory "/home/runner/work/deps/deps/neovim/deps/build/src/treesitter_vimdoc" ABSOLUTE)
1010

1111
message(VERBOSE "extracting...

src/treesitter_vimdoc-stamp/treesitter_vimdoc-urlinfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ method=url
66
command=/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/treesitter_vimdoc-stamp/download-treesitter_vimdoc.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/treesitter_vimdoc-stamp/verify-treesitter_vimdoc.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/treesitter_vimdoc-stamp/extract-treesitter_vimdoc.cmake
77
source_dir=/home/runner/work/deps/deps/neovim/deps/build/src/treesitter_vimdoc
88
work_dir=/home/runner/work/deps/deps/neovim/deps/build/src
9-
url(s)=https://github.com/neovim/tree-sitter-vimdoc/archive/v4.0.2.tar.gz
10-
hash=SHA256=13f2dd182436e0b75db33cc1d097ab0442e0c3135375998f15331dbe9c6b74ab
9+
url(s)=https://github.com/neovim/tree-sitter-vimdoc/archive/v4.1.0.tar.gz
10+
hash=SHA256=020e8f117f648c8697fca967995c342e92dbd81dab137a115cc7555207fbc84f
1111
no_extract=
1212

src/treesitter_vimdoc/Cargo.toml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
[package]
22
name = "tree-sitter-vimdoc"
33
description = "Tree-sitter grammar for Vim help files"
4-
version = "4.0.2"
4+
version = "4.1.0"
5+
authors = ["Justin M. Keyes <justinkz@gmail.com>"]
56
license = "Apache-2.0"
6-
keywords = ["incremental", "parsing", "neovim", "vimdoc"]
7-
categories = ["parsing", "text-editors"]
7+
readme = "README.md"
8+
keywords = ["incremental", "parsing", "tree-sitter", "vimdoc"]
9+
categories = ["parser-implementations", "parsing", "text-editors"]
810
repository = "https://github.com/neovim/tree-sitter-vimdoc"
9-
authors = ["Thomas Vigouroux <tomvig38@gmail.com>"]
1011
edition = "2021"
1112
autoexamples = false
1213

1314
build = "bindings/rust/build.rs"
14-
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]
15+
include = [
16+
"bindings/rust/*",
17+
"grammar.js",
18+
"queries/*",
19+
"src/*",
20+
"tree-sitter.json",
21+
"/LICENSE",
22+
]
1523

1624
[lib]
1725
path = "bindings/rust/lib.rs"
1826

1927
[dependencies]
20-
tree-sitter = ">=0.25.0"
28+
tree-sitter = "0.25.10"
29+
tree-sitter-language = "0.1"
2130

2231
[build-dependencies]
23-
cc = "^1.0.89"
32+
cc = "1.2"
33+
34+
[dev-dependencies]
35+
tree-sitter = "0.25.10"

src/treesitter_vimdoc/Makefile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/treesitter_vimdoc/Package.swift

Lines changed: 29 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/treesitter_vimdoc/README.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,27 @@ Overview
1414

1515
- `block` is the main top-level node, delimited by blank line(s) or any line
1616
starting with `<` (codeblock terminator).
17-
- contains `line` and `line_li` nodes.
17+
- Contains `line` and `line_li` nodes.
1818
- `line`:
19-
- contains atoms (words, tags, taglinks, …)
20-
- contains headings (`h1`, `h2`, `h3`, `column_heading`) because `codeblock`
19+
- Contains atoms (words, tags, taglinks, …)
20+
- Contains headings (`h1`, `h2`, `h3`, `column_heading`) because `codeblock`
2121
terminated by "implicit stop" (no terminating `<`) consumes blank lines, so
2222
`block` has no way to end.
2323
- `line_li` ("listitem")
24-
- lines starting with `-`/`` (_not_ `+`/`*`) are listitems.
25-
- consumes lines until blank line, codeblock, or next listitem.
26-
- nesting is ignored: indented listitems are parsed as siblings.
24+
- Lines starting with `-`/``/`[0-9].` (_not_ `+`/`*`) are listitems.
25+
- Use the `prefix` node to detect if the listitem is ordered (numbered) or
26+
unodered.
27+
- Consumes lines until blank line, codeblock, or next listitem.
28+
- Nesting is ignored: indented listitems are parsed as siblings. Consumers can
29+
check leading whitespace to decide nesting.
2730
- `codeblock`:
28-
- contained by `line` or `line_li`, because ">" can start a codeblock at the
31+
- Contained by `line` or `line_li`, because ">" can start a codeblock at the
2932
end of any line.
30-
- contains `line` nodes without `word` nodes: it's just the full raw text
33+
- Contains `line` nodes without `word` nodes: it's just the full raw text
3134
line including whitespace. This is somewhat dictated by its "preformatted"
3235
nature; parsing the contents would require loading a "child" language
3336
(injection). See [#2](https://github.com/neovim/tree-sitter-vimdoc/issues/2).
34-
- the terminating `<` (and any following whitespace) is discarded (anonymous).
37+
- The terminating `<` (and any following whitespace) is discarded (anonymous).
3538
- `url` intentionally does not capture `.,)` at the end of the URL. See also [Known issues](#known-issues).
3639
- `h1` = "Heading 1": `======` followed by text and optional `*tags*`.
3740
- `h2` = "Heading 2": `------` followed by text and optional `*tags*`.
@@ -43,6 +46,12 @@ Known issues
4346

4447
- Input must end with newline/EOL (`\n`). Grammar does not support files without EOL.
4548
- Input must end with a blank line. Though this doesn't seem to matter in practice.
49+
- Any line starting with `1.` (or other number) is treated as a listitem, even
50+
if the first line of its `block` is not a listitem. Example:
51+
```
52+
Foo was 0, not
53+
1. Uh oh.
54+
```
4655
- Spec requires that `codeblock` delimiter ">" must be preceded by a space
4756
(" >"), not a tab. But currently the grammar doesn't enforce this. Example:
4857
`:help lcs-tab`.
@@ -93,3 +102,14 @@ Steps to perform a release: https://tree-sitter.github.io/tree-sitter/creating-p
93102
git push
94103
```
95104
6. Tag and release: https://github.com/neovim/tree-sitter-vimdoc/releases/new
105+
106+
### Publis to crates.io
107+
108+
Crate: https://crates.io/crates/tree-sitter-vimdoc
109+
110+
```
111+
cargo publish --dry-run
112+
cargo login
113+
cargo publish
114+
```
115+

src/treesitter_vimdoc/grammar.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
// @ts-check
1414

1515
const _uppercase_word = /[A-Z0-9.()][-A-Z0-9.()_]+/;
16-
const _li_token = /[-][ ]+/;
16+
// Listitem (incl. numbered items).
17+
const _li_token = /([-]|([0-9]{1,3}\.))[ ]+/;
1718

1819
module.exports = grammar({
1920
name: 'vimdoc',
@@ -49,9 +50,10 @@ module.exports = grammar({
4950
alias($.word_noli, $.word),
5051
$._atom_common,
5152
),
53+
// Word NOT matching (numbered) listitem.
5254
word_noli: ($) => choice(
53-
// Lines contained by line_li must not start with a listitem symbol.
54-
token(prec(-1, /[^-\n\t ][^(\[\n\t ]*/)),
55+
// Lines contained by line_li must not start with (numbered) listitem symbol.
56+
token(prec(-1, /(([^-\n\t ])|([^0-9\n\t ][^.\n\t ]))[^.(\[\n\t ]*/)),
5557
token(prec(-1, /[-][^\n\t ]+/)),
5658
$._word_common,
5759
),
@@ -164,7 +166,7 @@ module.exports = grammar({
164166
// Listitem: consumes prefixed line and all adjacent non-prefixed lines.
165167
line_li: ($) => prec.right(1, seq(
166168
optional(token.immediate('<')), // Treat codeblock-terminating "<" as whitespace.
167-
_li_token,
169+
alias(_li_token, $.prefix),
168170
choice(
169171
alias(seq(repeat1($._atom), /\n/), $.line),
170172
seq(alias(repeat1($._atom), $.line), $.codeblock),

0 commit comments

Comments
 (0)