Skip to content

Commit

Permalink
simplify code, make it more compatible with -cstrict -cc clang-18 c…
Browse files Browse the repository at this point in the history
…ompilations
  • Loading branch information
spytheman committed Feb 10, 2025
1 parent 0461bf8 commit 5fb9d72
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/analyzer/psi/QualifiedType.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ fn (n &QualifiedType) qualifier() ?PsiElement {

fn (n &QualifiedType) reference() ?PsiReference {
ref_expr := n.right()
return new_reference(n.containing_file, ref_expr? as ReferenceExpressionBase, true)
reb := ref_expr? as ReferenceExpressionBase
res := new_reference(n.containing_file, reb, true)
return res
}

fn (n &QualifiedType) resolve() ?PsiElement {
Expand Down
2 changes: 1 addition & 1 deletion src/server/inspections/compiler/utils.v
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn parse_compiler_diagnostic(msg string) ?inspections.Report {
diag_kind := match msg_type {
'error' { inspections.ReportKind.error }
'warning' { inspections.ReportKind.warning }
'notice' { inspections.ReportKind.notice }
//'notice' { inspections.ReportKind.notice }
else { inspections.ReportKind.notice }
}

Expand Down
2 changes: 0 additions & 2 deletions tree_sitter_v/bindings/bindings.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef TREE_SITTER_V_H_
#define TREE_SITTER_V_H_

typedef struct TSLanguage TSLanguage;

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
2 changes: 1 addition & 1 deletion tree_sitter_v/bindings/bindings.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module bindings
pub type TSParser = C.TSParser
pub type TSLanguage = C.TSLanguage

pub const language = unsafe { C.tree_sitter_v() }
pub const language = unsafe { &TSLanguage(C.tree_sitter_v()) }

pub struct Parser[T] {
mut:
Expand Down
2 changes: 1 addition & 1 deletion tree_sitter_v/bindings/core
Submodule core updated from b7fcf9 to 270826

0 comments on commit 5fb9d72

Please sign in to comment.