Skip to content

Commit de8c618

Browse files
committed
fix typo
1 parent 7148208 commit de8c618

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

src/compress/golang/plugin/parse/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ set_func:
420420
f.Receiver = receiver
421421
f.Params = params
422422
f.Results = results
423-
f.GolobalVars = globalVars
423+
f.GlobalVars = globalVars
424424
f.Types = tys
425425
return f, false
426426
}

src/compress/types/types.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ pub struct Function {
719719
pub method_calls: Option<Vec<Identity>>,
720720
#[serde(rename = "Types")]
721721
pub types: Option<Vec<Identity>>,
722-
#[serde(rename = "GolobalVars")]
722+
#[serde(rename = "GlobalVars")]
723723
pub global_vars: Option<Vec<Identity>>,
724724

725725
// compress_data
@@ -732,8 +732,6 @@ pub struct Receiver {
732732
pub is_pointer: bool,
733733
#[serde(rename = "Type")]
734734
pub type_id: Identity,
735-
#[serde(rename = "Name")]
736-
pub name: String,
737735
}
738736

739737
impl Function {

src/lang/collect/export.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,10 @@ func (c *Collector) exportSymbol(repo *parse.Repository, symbol *DocumentSymbol,
255255
// NOTICE: use loc token as key here, to make it more readable
256256
obj.MethodCalls = parse.Dedup(obj.MethodCalls, pdep)
257257
case lsp.SKVariable, lsp.SKConstant:
258-
if obj.GolobalVars == nil {
259-
obj.GolobalVars = make([]parse.Dependency, 0, len(deps))
258+
if obj.GlobalVars == nil {
259+
obj.GlobalVars = make([]parse.Dependency, 0, len(deps))
260260
}
261-
obj.GolobalVars = parse.Dedup(obj.GolobalVars, pdep)
261+
obj.GlobalVars = parse.Dedup(obj.GlobalVars, pdep)
262262
case lsp.SKStruct, lsp.SKTypeParameter, lsp.SKInterface, lsp.SKEnum:
263263
if obj.Types == nil {
264264
obj.Types = make([]parse.Dependency, 0, len(deps))

src/uniast/ast.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ type Function struct {
268268
// NOTICE: method name may be duplicated, so we collect according to the SEQUENCE of APPEARANCE
269269
MethodCalls []Dependency `json:",omitempty"`
270270

271-
Types []Dependency `json:",omitempty"` // types used in the function
272-
GolobalVars []Dependency `json:",omitempty"` // global vars used in the function
271+
Types []Dependency `json:",omitempty"` // types used in the function
272+
GlobalVars []Dependency `json:",omitempty"` // global vars used in the function
273273

274274
// func llm compress result
275275
CompressData *string `json:"compress_data,omitempty"`

src/uniast/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (r *Repository) BuildGraph() error {
104104
for _, dep := range f.Types {
105105
r.AddRelation(n, dep.Identity)
106106
}
107-
for _, dep := range f.GolobalVars {
107+
for _, dep := range f.GlobalVars {
108108
r.AddRelation(n, dep.Identity)
109109
}
110110
}

0 commit comments

Comments
 (0)