(name string)
| 18 | var internalFunction map[string]func(v *Visitor, ctx *parser.FunctionCallContext) interface{} |
| 19 | |
| 20 | func GetInternalFunction(name string) func(v *Visitor, ctx *parser.FunctionCallContext) interface{} { |
| 21 | if internalFunction == nil { |
| 22 | internalFunction = map[string]func(v *Visitor, ctx *parser.FunctionCallContext) interface{}{ |
| 23 | "println": gPrintln, |
| 24 | "assertEqual": assertEqual, |
| 25 | "append": gAppend, |
| 26 | "len": gLen, |
| 27 | "cap": gCap, |
| 28 | "copy": gCopy, |
| 29 | "hash": gHash, |
| 30 | "JSON": JSON, |
| 31 | "JSONGet": JSONGet, |
| 32 | "httpHandle": httpHandle, |
| 33 | "httpRun": httpRun, |
| 34 | "FprintfJSON": fprintfJSON, |
| 35 | "FprintfHTML": fprintfHTML, |
| 36 | "GetCurrentTime": getCurrentTime, |
| 37 | "Unix": unix, |
| 38 | "QueryPath": queryPath, |
| 39 | "FormValue": formValue, |
| 40 | "PostFormValue": postFormValue, |
| 41 | "GetOSArgs": getOSArgs, |
| 42 | "Command": command, |
| 43 | "WriteFile": writeFile, |
| 44 | "Remove": remove, |
| 45 | "printf": printf, |
| 46 | "sprintf": sprintf, |
| 47 | "print": gPrint, |
| 48 | "dumpAST": dumpAST, |
| 49 | "dumpSymbol": dumpSymbol, |
| 50 | "RequestBody": requestBody, |
| 51 | "Getwd": getWd, |
| 52 | "toByteArray": toByteArray, |
| 53 | "toString": toString, |
| 54 | } |
| 55 | } |
| 56 | return internalFunction[name] |
| 57 | } |
| 58 | |
| 59 | func gPrintln(v *Visitor, ctx *parser.FunctionCallContext) interface{} { |
| 60 | if ctx.ExpressionList() != nil { |
no outgoing calls
no test coverage detected