8000 [tree_sitter_v] fix struct field by Lycs-D · Pull Request #74 · v-analyzer/v-analyzer · GitHub
[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tree_sitter_v] fix struct field #74

Merged
merged 5 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[tree_sitter_v] clean
  • Loading branch information
Lycs-D committed Dec 11, 2023
commit cfae791f2db2548a24f24eed764b6b0fa443c1ed
16 changes: 9 additions & 7 deletions tree_sitter_v/grammar.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,16 @@ module.exports = grammar({
$._struct_body,
),

_struct_body: ($) => seq("{", optional($._struct_fields), "}"),

_struct_fields: ($) =>
repeat1(
choice(
seq($.struct_field_scope, optional(terminator)),
seq($.struct_field_declaration, optional(terminator)),
_struct_body: ($) =>
seq(
"{",
repeat(
choice(
seq($.struct_field_scope, optional(terminator)),
seq($.struct_field_declaration, optional(terminator)),
),
),
"}",
),

// pub:
Expand Down
114 changes: 51 additions & 63 deletions tree_sitter_v/src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
0