Skip to content

Commit 68c0a13

Browse files
committed
doc: change FunctionIsCall to IsInvoked
1 parent b36ed3f commit 68c0a13

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

docs/uniast-en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ Represents a dependency relationship, containing the dependent node Id, dependen
403403
"StartOffset": 3547,
404404
"EndOffset": 3564,
405405
"Extra": {
406-
"FunctionIsCall": true
406+
"IsInvoked": true
407407
}
408408
}
409409
```
@@ -432,7 +432,7 @@ Represents a dependency relationship, containing the dependent node Id, dependen
432432
- Extra: Additional information for storing language-specific details or extra metadata
433433

434434

435-
- FunctionIsCall: If the Dependency is a function call, whether it actually executes the function call or just references the function
435+
- IsInvoked: For function/method dependencies, whether it is invoked or just referenced (not executed).
436436

437437

438438
##### Type

docs/uniast-zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ Universal Abstract-Syntax-Tree 是 ABCoder 建立的一种 LLM 亲和、语言
403403
"StartOffset": 3547,
404404
"EndOffset": 3564,
405405
"Extra": {
406-
"FunctionIsCall": true
406+
"IsInvoked": true
407407
}
408408
}
409409
```
@@ -432,7 +432,7 @@ Universal Abstract-Syntax-Tree 是 ABCoder 建立的一种 LLM 亲和、语言
432432
- Extra: 额外信息,用于存储一些语言特定的信息,或者是一些额外的元数据
433433

434434

435-
- FunctionIsCall: 如果 Dependency 是一个函数调用,是否真正执行了函数调用,而不是只是引用了函数
435+
- IsInvoked: 对于函数 / 方法调用类依赖,用于说明该函数是被调用(invoke),还是仅获取其引用而不执行。
436436

437437

438438
##### Type

lang/golang/parser/file.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
)
2828

2929
const (
30-
ExtraKey_FunctionIsCall = "FunctionIsCall"
30+
ExtraKey_IsInvoked = "IsInvoked"
3131
ExtraKey_AnonymousFunctions = "AnonymousFunctions"
3232
)
3333

@@ -147,7 +147,7 @@ func (p *GoParser) parseVar(ctx *fileContext, vspec *ast.ValueSpec, isConst bool
147147
if len(collects.directCalls) > 0 {
148148
for i, dep := range v.Dependencies {
149149
if collects.directCalls[dep.FileLine] {
150-
v.Dependencies[i].SetExtra(ExtraKey_FunctionIsCall, true)
150+
v.Dependencies[i].SetExtra(ExtraKey_IsInvoked, true)
151151
}
152152
}
153153
}
@@ -589,12 +589,12 @@ set_func:
589589
if len(collects.directCalls) > 0 {
590590
for i, dep := range f.FunctionCalls {
591591
if collects.directCalls[dep.FileLine] {
592-
f.FunctionCalls[i].SetExtra(ExtraKey_FunctionIsCall, true)
592+
f.FunctionCalls[i].SetExtra(ExtraKey_IsInvoked, true)
593593
}
594594
}
595595
for i, dep := range f.MethodCalls {
596596
if collects.directCalls[dep.FileLine] {
597-
f.MethodCalls[i].SetExtra(ExtraKey_FunctionIsCall, true)
597+
f.MethodCalls[i].SetExtra(ExtraKey_IsInvoked, true)
598598
}
599599
}
600600
}

0 commit comments

Comments
 (0)