Skip to content

Commit c61a410

Browse files
authored
Merge pull request #615 from kkoomen/release/v4.3.2
Release/v4.3.2
2 parents bcd7fa9 + d682e24 commit c61a410

File tree

6 files changed

+27
-11
lines changed

6 files changed

+27
-11
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.3.1
1+
4.3.2

helper/Cargo.lock

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

helper/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "vim-doge-helper"
3-
version = "4.3.1"
3+
version = "4.3.2"
44
edition = "2021"
55
publish = false
66
include = ["src"]

helper/src/c/parser.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,20 @@ impl<'a> CParser<'a> {
5858

5959
let param_name = node
6060
.children(&mut node.walk())
61-
.filter(|node| node.kind() == "identifier")
61+
.filter(|node| ["identifier", "pointer_declarator"].contains(&node.kind()))
6262
.next()
63-
.and_then(|node| Some(self.get_node_text(&node)));
63+
.and_then(|node| {
64+
if node.kind() == "pointer_declarator" {
65+
let identifier_node = node
66+
.children(&mut node.walk())
67+
.filter(|node| node.kind() == "identifier")
68+
.next()
69+
.unwrap();
70+
return Some(self.get_node_text(&identifier_node));
71+
}
72+
73+
Some(self.get_node_text(&node))
74+
});
6475

6576
if param_name.is_some() {
6677
param.insert("name".to_string(), Value::String(param_name.unwrap()));

scripts/release.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,24 @@ fi
2121

2222
echo "$next_version" > .version
2323

24-
# Replace the current version in helper/Cargo.toml with the new version
24+
# Replace the current version in helper/Cargo.toml with the new version.
2525
sed -E -i '' "s/^version = \"[0-9]+\.[0-9]+\.[0-9]+\"$/version = \"$next_version\"/" helper/Cargo.toml
2626

27+
# Trigger a build so that the version will be applied to the Cargo.lock as well.
28+
cd helper
29+
cargo build
30+
cd ..
31+
2732
# Run vimdoc if it's installed to make sure all documentation is generated.
2833
if command -v vimdoc >/dev/null 2>&1; then
2934
echo "Running vimdoc..."
3035
vimdoc .
3136
fi
3237

33-
git diff .version helper/Cargo.toml doc/doge.txt
38+
git diff .version helper/Cargo.toml helper/Cargo.lock doc/doge.txt
3439

3540
echo "Committing the above changes..."
36-
git add .version helper/Cargo.toml doc/doge.txt
41+
git add .version helper/Cargo.toml helper/Cargo.lock doc/doge.txt
3742
git commit -m "chore(release): v$next_version :tada:"
3843

39-
echo "Done, make sure to push the changes made"
44+
echo "Done, make sure to push the above changes."

test/filetypes/c/functions.vader

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Given c (function definition with parameters):
66

77
int foo(int a, char b) {}
88

9-
int *foo(int a, char b) {}
9+
int *foo(int a, char *b) {}
1010

1111
Do (trigger doge):
1212
\<C-d>
@@ -37,4 +37,4 @@ Expect c (generated comment with @brief, @param and @return tags):
3737
* @param[[TODO:direction]] b [TODO:description]
3838
* @return [TODO:description]
3939
*/
40-
int *foo(int a, char b) {}
40+
int *foo(int a, char *b) {}

0 commit comments

Comments
 (0)