func (gb *GolangBackend) compileFuncCall(funcNameNode *gol.NodeIdentifier, argNodes *gol.NodeList) (string, error) { funcName := mangleIdentifier(funcNameNode.String()) args := []string{} err := argNodes.Foreach(func(n gol.Node) error { nStr, err := gb.compile(n) if err != nil { return err } args = append(args, nStr) return nil }) if err != nil { return "", err } s := funcName + "(" + strings.Join(args, ", ") + ")" return s, nil }
func (gb *GolangBackend) compileIdentifier(ni *gol.NodeIdentifier) (string, error) { return mangleIdentifier(ni.String()), nil }