typeFilepath and typeDirpath renamed as paramFilepath and paramDirpath respectively
This commit is contained in:
parent
e4b4b4fb79
commit
4f432da2b9
@ -16,15 +16,6 @@ const (
|
|||||||
paramEnd = "end"
|
paramEnd = "end"
|
||||||
paramValue = "value"
|
paramValue = "value"
|
||||||
paramEllipsis = "..."
|
paramEllipsis = "..."
|
||||||
typeFilepath = "filepath"
|
paramFilepath = "filepath"
|
||||||
typeDirpath = "dirpath"
|
paramDirpath = "dirpath"
|
||||||
)
|
)
|
||||||
|
|
||||||
// const (
|
|
||||||
// typeInteger = "int"
|
|
||||||
// typeFloat = "float"
|
|
||||||
// typeString = "string"
|
|
||||||
// typeFraction = "fract"
|
|
||||||
// typeList = "list"
|
|
||||||
// typeDict = "dict"
|
|
||||||
// )
|
|
||||||
|
@ -188,13 +188,13 @@ func readFileFunc(ctx ExprContext, name string, args []any) (result any, err err
|
|||||||
|
|
||||||
func ImportOsFuncs(ctx ExprContext) {
|
func ImportOsFuncs(ctx ExprContext) {
|
||||||
ctx.RegisterFunc("openFile", newGolangFunctor(openFileFunc), typeHandle, []ExprFuncParam{
|
ctx.RegisterFunc("openFile", newGolangFunctor(openFileFunc), typeHandle, []ExprFuncParam{
|
||||||
newFuncParam(typeFilepath),
|
newFuncParam(paramFilepath),
|
||||||
})
|
})
|
||||||
ctx.RegisterFunc("appendFile", newGolangFunctor(appendFileFunc), typeHandle, []ExprFuncParam{
|
ctx.RegisterFunc("appendFile", newGolangFunctor(appendFileFunc), typeHandle, []ExprFuncParam{
|
||||||
newFuncParam(typeFilepath),
|
newFuncParam(paramFilepath),
|
||||||
})
|
})
|
||||||
ctx.RegisterFunc("createFile", newGolangFunctor(createFileFunc), typeHandle, []ExprFuncParam{
|
ctx.RegisterFunc("createFile", newGolangFunctor(createFileFunc), typeHandle, []ExprFuncParam{
|
||||||
newFuncParam(typeFilepath),
|
newFuncParam(paramFilepath),
|
||||||
})
|
})
|
||||||
ctx.RegisterFunc("writeFile", newGolangFunctor(writeFileFunc), typeInt, []ExprFuncParam{
|
ctx.RegisterFunc("writeFile", newGolangFunctor(writeFileFunc), typeInt, []ExprFuncParam{
|
||||||
newFuncParam(typeHandle),
|
newFuncParam(typeHandle),
|
||||||
|
Loading…
Reference in New Issue
Block a user