Skip to content

Commit 4945f4b

Browse files
传人 -> 传入
1 parent 92217bb commit 4945f4b

19 files changed

+38
-38
lines changed

docs/manual/annotate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ end
436436
end
437437
```
438438

439-
上面的例子中,表明getInfo函数,需要传人两个参数,函数的返回值也是两个。第1个返回获取玩家信息是否成功,第2参数表示获取的具体的玩家信息。
439+
上面的例子中,表明getInfo函数,需要传入两个参数,函数的返回值也是两个。第1个返回获取玩家信息是否成功,第2参数表示获取的具体的玩家信息。
440440

441441
### 3.9 alias别名类型
442442
使用@alias将其他的类型关联成一个新的别名,类似于C++ 语言的typedef。主要方便一些复杂的类型关联成一个简单的新类型。

luahelper-lsp/langserver/check/analysis/analysis_search.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func (a *Analysis) findGlobalVar(strName string, loc lexer.Location, strProPre s
266266
gFindGlag bool, nameExp ast.Exp, binParentExp *ast.BinopExp) {
267267
fileResult := a.curResult
268268

269-
// 0) 如果是在五轮, 判断传人的系统名字是变量还是函数
269+
// 0) 如果是在五轮, 判断传入的系统名字是变量还是函数
270270
if a.isFiveTerm() {
271271
subExp, ok := nameExp.(*ast.NameExp)
272272
if ok && subExp.Name == "self" {
@@ -1252,7 +1252,7 @@ func (a *Analysis) findTableDefine(node *ast.TableAccessExp) {
12521252
}
12531253
}
12541254

1255-
// GetImportRefer 根据传人的exp,判断是否为导入的函数调用
1255+
// GetImportRefer 根据传入的exp,判断是否为导入的函数调用
12561256
func (a *Analysis) GetImportRefer(node *ast.FuncCallExp) *common.ReferInfo {
12571257
return a.GetImportReferByCallExp(node)
12581258
}
@@ -1282,7 +1282,7 @@ func (a *Analysis) getImportReferError(funcName string, funcExp *ast.FuncCallExp
12821282
}
12831283
}
12841284

1285-
// GetImportReferByCallExp 根据传人的exp,判断是否为导入的函数调用
1285+
// GetImportReferByCallExp 根据传入的exp,判断是否为导入的函数调用
12861286
func (a *Analysis) GetImportReferByCallExp(funcExp *ast.FuncCallExp) *common.ReferInfo {
12871287
if funcExp.NameExp != nil {
12881288
return nil

luahelper-lsp/langserver/check/check_all.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ func CreateAllProject(allFilesList []string, entryFileArr []string, clientExpPat
6565
fileIndexInfo: common.CreateFileIndexInfo(),
6666
}
6767

68-
// 传人的所有文件列表转换成map
68+
// 传入的所有文件列表转换成map
6969
for _, fileName := range allFilesList {
7070
allProject.allFilesMap[fileName] = common.CompleteFilePathToPreStr(fileName)
7171
allProject.fileIndexInfo.InsertOneFile(fileName)
7272
}
7373

74-
// 传人的插件客户端额外的文件列表转换成map
74+
// 传入的插件客户端额外的文件列表转换成map
7575
for _, fileName := range clientExpPathList {
7676
allProject.clientExpFileMap[fileName] = struct{}{}
7777
}

luahelper-lsp/langserver/check/check_find_var_refer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (a *AllProject) createAnnotateSymbol(strName string, varInfo *common.VarInf
106106
return symbol
107107
}
108108

109-
// 传人位置和变量名,进一步查找对应的变量
109+
// 传入位置和变量名,进一步查找对应的变量
110110
func (a *AllProject) findLocReferSymbol(fileResult *results.FileResult, posLine int, posChar int, luaInFile string,
111111
strName string, loc lexer.Location, gFlag bool, comParam *CommonFuncParam,
112112
findExpList *[]common.FindExpFile) (symbol *common.Symbol) {
@@ -710,7 +710,7 @@ func (a *AllProject) selfChangeStrName(luaInFile string, loc lexer.Location) (st
710710
return firstColonFunc.RelateVar.StrName
711711
}
712712

713-
// GetImportReferByCallExp 根据传人的exp,判断是否为导入的函数调用
713+
// GetImportReferByCallExp 根据传入的exp,判断是否为导入的函数调用
714714
func (a *AllProject) getImportReferSymbol(luaInFile string, funcExp *ast.FuncCallExp,
715715
comParam *CommonFuncParam, findExpList *[]common.FindExpFile) (symbol *common.Symbol) {
716716
symbol = nil

luahelper-lsp/langserver/check/check_first_hanlde.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type FirstWorkChan struct {
2525
}
2626

2727
// analysisFirstLuaFile 进行第一段的分析,主要进行词法和语法的分析,然后构造函数和全局变量信息
28-
// content 为具体传人的内容, 若为nil表示没有传人内容,需要从文件中读取
28+
// content 为具体传入的内容, 若为nil表示没有传入内容,需要从文件中读取
2929
// saveFlag 为是否cache住文件的内容
3030
// realTimeFlag 实时分析标记,当实时敲入代码时候,该字段为true,不进行一些检查
3131
// handleResult 返回0表示成功, 1表示读文件失败,2表示构造AST失败

luahelper-lsp/langserver/check/check_lsp_annotate.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ func (a *AllProject) getClassTypeInfoFuncType(strName string, fileName string, l
503503
}
504504

505505
// 对外的接口
506-
// 通过传人的类型,获取所有的ClassInfo 列表,返回的是一个列表, 包括所有的父类型也统一放在列表中
507-
// astType 传人的为类型
506+
// 通过传入的类型,获取所有的ClassInfo 列表,返回的是一个列表, 包括所有的父类型也统一放在列表中
507+
// astType 传入的为类型
508508
// fileName 为注解的文件名
509509
// lastLine 为注解出现的行号
510510
func (a *AllProject) getAllNormalAnnotateClass(astType annotateast.Type, fileName string,
@@ -664,8 +664,8 @@ func (a *AllProject) getClassTypeInfoList(strName string, fileName string, lastL
664664
}
665665

666666
// 追踪出所以的函数类型
667-
// 通过传人的类型,获取所有的ClassInfo 列表,返回的是一个列表, 包括所有的父类型也统一放在列表中
668-
// astType 传人的为类型
667+
// 通过传入的类型,获取所有的ClassInfo 列表,返回的是一个列表, 包括所有的父类型也统一放在列表中
668+
// astType 传入的为类型
669669
// fileName 为注解的文件名
670670
// lastLine 为注解出现的行号
671671
func (a *AllProject) getAllFuncAnnotateType(astType annotateast.Type, fileName string,
@@ -846,8 +846,8 @@ func (a *AllProject) getFuncIndexReturnSymbol(oldSymbol *common.Symbol, varIndex
846846

847847
// 对内的函数的
848848
// 追踪出所以的函数类型
849-
// 通过传人的类型,获取所有的ClassInfo 列表,返回的是一个列表, 包括所有的父类型也统一放在列表中
850-
// astType 传人的为类型
849+
// 通过传入的类型,获取所有的ClassInfo 列表,返回的是一个列表, 包括所有的父类型也统一放在列表中
850+
// astType 传入的为类型
851851
// fileName 为注解的文件名
852852
// lastLine 为注解出现的行号
853853
func (a *AllProject) getInlineAllFuncAnnotateType(astType annotateast.Type, fileName string,
@@ -1469,7 +1469,7 @@ func (a *AllProject) getDeepVarList(oldSymbol *common.Symbol, varStruct *common.
14691469
return symList
14701470
}
14711471

1472-
// 2.1) 有多层,逐层查找传人的子成员
1472+
// 2.1) 有多层,逐层查找传入的子成员
14731473
lastSymbol := oldSymbol
14741474
for i := 0; i < len(varStruct.StrVec)-1; i++ {
14751475
// 判断这个的值是否为函数的返回。例如字符串为:func().a, 那么第一个值是函数返回,第二个值为否

luahelper-lsp/langserver/check/check_lsp_annotate_complete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func (a *AllProject) AnnotateTypeComplete(strFile string, strLine string, strWor
196196

197197
// 获取补全注解系统的所有类型
198198
func (a *AllProject) getTypeCompleteVecs(strFile, strWord string, posLine int) {
199-
// 1) 传人的strWord 通过.进行切词
199+
// 1) 传入的strWord 通过.进行切词
200200
lastIndex := strings.LastIndex(strWord, ".")
201201
preStr := ""
202202
if lastIndex >= 0 {

luahelper-lsp/langserver/check/check_lsp_signaturehelp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (a *AllProject) SignaturehelpFunc(strFile string, varStruct *common.DefineV
4848
}
4949

5050
if varStruct.ColonFlag && !referFunc.IsColon {
51-
// 传人的是带冒号的,如果语法不是带冒号的,退出
51+
// 传入的是带冒号的,如果语法不是带冒号的,退出
5252
return
5353
}
5454

luahelper-lsp/langserver/check/check_second_project.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (a *AllProject) recvSecondProject(projectChan SecondProjectChan) {
4848
a.analysisSecondMap[projectChan.strFile] = projectChan.returnSecond
4949
}
5050

51-
// 传人工程入口文件vec,对这些工程入口文件进行分析
51+
// 传入工程入口文件vec,对这些工程入口文件进行分析
5252
func (a *AllProject) handleProjectEntryFileVec(projectVec []string) {
5353
vecLen := len(projectVec)
5454
if vecLen == 0 {

luahelper-lsp/langserver/check/common/annotate_info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ type CreateTypeList struct {
272272
List []*CreateTypeInfo
273273
}
274274

275-
// IsRepeateTypeInfo 判断传人的createTypeInfo是否已经存在了
275+
// IsRepeateTypeInfo 判断传入的createTypeInfo是否已经存在了
276276
func (cl *CreateTypeList) IsRepeateTypeInfo(createTypeInfo *CreateTypeInfo) bool {
277277
if len(cl.List) == 0 {
278278
return false

luahelper-lsp/langserver/check/common/dir_manager.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import (
1616

1717
// DirManager 所有的目录管理
1818
type DirManager struct {
19-
// 插件前端传人的工程的根目录
19+
// 插件前端传入的工程的根目录
2020
vSRootDir string
2121

22-
// 插件前端传人的所有次级目录,目前VScode支持多目录文件夹
22+
// 插件前端传入的所有次级目录,目前VScode支持多目录文件夹
2323
subDirVec []string
2424

2525
// luahelper.json文件包含的相对路径,如果没有luahelper.json,该值默认为./
@@ -267,7 +267,7 @@ func dirents(run *ParallelRun, dir string) []os.FileInfo {
267267
}
268268

269269
// 递归获取目录下面所有的lua文件
270-
// dirStr 传人的子目录的原始路径
270+
// dirStr 传入的子目录的原始路径
271271
// ignoreFlag 表示是否需要判断忽略文件
272272
func getAllFile(run *ParallelRun, pathname string, dirStr string, ignoreFlag bool, fileChan chan<- string) {
273273
defer run.Done()
@@ -426,7 +426,7 @@ func (d *DirManager) IsInDir(strFile string) bool {
426426
return false
427427
}
428428

429-
// GetCompletePath 传人目录和后面文件名,拼接成完整的路径
429+
// GetCompletePath 传入目录和后面文件名,拼接成完整的路径
430430
func (d *DirManager) GetCompletePath(baseDir string, fileName string) string {
431431
strPath := baseDir
432432
if !strings.HasSuffix(baseDir, "/") {
@@ -598,7 +598,7 @@ func calcMatchStrScore(fileName string, referFileName string, condidateStr strin
598598
// allFilesMap 为项目中所有包含的lua文件
599599
// 返回值为匹配最合适的文件
600600
func GetBestMatchReferFile(curFile string, referFile string, allFilesMap map[string]string, fileIndexInfo *FileIndexInfo) (findStr string) {
601-
// 首先判断传人的文件是否带有后缀的
601+
// 首先判断传入的文件是否带有后缀的
602602
suffixFlag := false
603603
seperateIndex := strings.Index(referFile, ".")
604604
if seperateIndex >= 0 {

luahelper-lsp/langserver/check/common/global_conf.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ func (g *GlobalConfig) IsIgnoreCompleteFile(strFile string) bool {
10301030
}
10311031

10321032
// GetStrProtocol 判断给定的字符串是否有协议组,例如c2s, s2s
1033-
// 传人的字符串可能为 !c2s,首先去掉! 前缀, 如果找到了返回去掉!前缀的字符串
1033+
// 传入的字符串可能为 !c2s,首先去掉! 前缀, 如果找到了返回去掉!前缀的字符串
10341034
func (g *GlobalConfig) GetStrProtocol(str string) string {
10351035
if len(str) < 1 {
10361036
return ""
@@ -1050,7 +1050,7 @@ func (g *GlobalConfig) GetStrProtocol(str string) string {
10501050
}
10511051

10521052
// IsStrProtocol 判断给定的字符串是否是协议组中的,例如c2s, s2s
1053-
// 传人的字符为c2s或是s2s
1053+
// 传入的字符为c2s或是s2s
10541054
func (g *GlobalConfig) IsStrProtocol(str string) bool {
10551055
for _, strVars := range g.ProtocolVars {
10561056
if str == strVars {

luahelper-lsp/langserver/check/common/system_tips.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ func (g *GlobalConfig) GetSysVar(strName string) *VarInfo {
994994
return varInfo
995995
}
996996

997-
// IsModuleInsideVar 判断传人的是否为系统模块内的变量
997+
// IsModuleInsideVar 判断传入的是否为系统模块内的变量
998998
func (g *GlobalConfig) IsModuleInsideVar(moduleName, keyName string) bool {
999999
varInfo, _ := g.SysVarMap[moduleName]
10001000
if varInfo == nil {

luahelper-lsp/langserver/check/common/util.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ func JudgeIgnoreAssinVale(valExp ast.Exp, expExp ast.Exp) (strVar string, line i
465465
return
466466
}
467467

468-
// judgeAssignSelf 根据传人的var = exp, 判断是否为 a = a
468+
// judgeAssignSelf 根据传入的var = exp, 判断是否为 a = a
469469
// 或者为 _G.b = _G.b
470470
func judgeAssignSelf(valExp ast.Exp, expExp ast.Exp) (strVar string, line int) {
471471
strVar = ""
@@ -560,7 +560,7 @@ func JudgeSimpleStr(strName string) bool {
560560
}
561561

562562
// GetSimpleValue 判断是否为简单变量的引用
563-
// 传人的为 !a ,获得的变量为a
563+
// 传入的为 !a ,获得的变量为a
564564
func GetSimpleValue(strName string) string {
565565
if len(strName) <= 1 {
566566
return ""
@@ -582,7 +582,7 @@ func GetSimpleValue(strName string) string {
582582
return strName
583583
}
584584

585-
// GetTableStrTwoStr 传人一个tableStr, 切分出两个字符串
585+
// GetTableStrTwoStr 传入一个tableStr, 切分出两个字符串
586586
func GetTableStrTwoStr(strTable string) (strOne string, strTwo string) {
587587
strOne = ""
588588
strTwo = ""
@@ -887,7 +887,7 @@ func GetTableConstructorExpKeyStrLoc(node ast.TableConstructorExp, strSubKey str
887887
return false, loc
888888
}
889889

890-
// GetExpSubKey 判断传人的字符串是否符合!开头的,或是!G开头的
890+
// GetExpSubKey 判断传入的字符串是否符合!开头的,或是!G开头的
891891
func GetExpSubKey(str string) string {
892892
if strings.Contains(str, "#") {
893893
return ""
@@ -1035,7 +1035,7 @@ func GetExpLoc(node ast.Exp) (loc lexer.Location) {
10351035
// 判断是否为这样的在冒号函数内, self.b 这样的 self要进行转换为b,统一起来
10361036
// a = {}
10371037
// function a:test1()
1038-
// self.b = 3 -- 传人的为self.b
1038+
// self.b = 3 -- 传入的为self.b
10391039
// end
10401040
func ChangeFuncSelfToReferVar(fi *FuncInfo, varStruct *DefineVarStruct) {
10411041
firstColonFunc := fi.FindFirstColonFunc()

luahelper-lsp/langserver/check/common/var_info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func (varInfo *VarInfo) GetVarTypeDetail() string {
273273
return GetLuaTypeString(varInfo.VarType, varInfo.ReferExp)
274274
}
275275

276-
// IsHasTabkeKeyStr 查看LocVarInfo是否为指向Table,如果是指向Table,判断是否有传人的key值字符串
276+
// IsHasTabkeKeyStr 查看LocVarInfo是否为指向Table,如果是指向Table,判断是否有传入的key值字符串
277277
func (varInfo *VarInfo) IsHasTabkeKeyStr(strTableKey string) (bool, lexer.Location) {
278278
var exp ast.Exp
279279
if varInfo.VarType == LuaTypeTable {

luahelper-lsp/langserver/check/compiler/lexer/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (loc *Location) IsInitialLoc() bool {
8484
return false
8585
}
8686

87-
// IsInLocStruct 判断传人的位置,是否在范围之内
87+
// IsInLocStruct 判断传入的位置,是否在范围之内
8888
func (loc *Location) IsInLocStruct(posLine int, posCh int) bool {
8989
if posLine < loc.StartLine {
9090
return false

luahelper-lsp/langserver/pathpre/pathpre.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func GetRemovePreStr(str string) string {
3535
return str
3636
}
3737

38-
// VscodeURIToString 插件传人的路径转换
38+
// VscodeURIToString 插件传入的路径转换
3939
// vscode 传来的路径: file:///g%3A/luaproject
4040
// 统一转换为:g%3A/luaproject,去掉前缀的file:///,并且都是这样的/../
4141
func VscodeURIToString(strURL string) string {

luahelper-lsp/langserver/textdocument_complete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (l *LspServer) TextDocumentComplete(ctx context.Context, vs lsp.CompletionP
4444
strFile := comResult.strFile
4545

4646
// 1) 判断是否输入的为 --- 注释,用于快捷生成函数定义的注释
47-
// 输入-时候,传人的为空,特殊处理
47+
// 输入-时候,传入的为空,特殊处理
4848
if vs.Context.TriggerCharacter == "" && judgeBeforeCommentHorizontal(comResult.contents, comResult.offset) {
4949
// 处理快捷生成注解, 以及提升注解系统
5050
comList, _ := l.handleGenerateComment(strFile, comResult.contents, comResult.offset, (int)(comResult.pos.Line))

luahelper-vscode/src/common/luaPath.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class LuaPath {
115115
}
116116

117117
// 获取用户lua 二进制位置与cpath库的后缀路径
118-
// strPath 为传人的用户设置的lua二进制位置
118+
// strPath 为传入的用户设置的lua二进制位置
119119
// vSCodeExtensionPath 为插件运行的目录
120120
public GetLuaExeCpathStr(strPath: string, vSCodeExtensionPath: string): string[] {
121121
let strVect: string[] = ["", ""];

0 commit comments

Comments
 (0)