lang: Add common type to global variables

We use the list of strings so often, we might as well give it a global
variable.
This commit is contained in:
James Shubin
2024-04-16 14:31:03 -04:00
parent 6782d65577
commit dc45c90ccd
7 changed files with 19 additions and 18 deletions

View File

@@ -77,7 +77,7 @@ func (obj *arg) ToMcl() (string, error) {
case "float64":
return fmt.Sprintf("%s%s", prefix, types.TypeFloat.String()), nil
case "[]string":
return fmt.Sprintf("%s%s", prefix, types.NewType("[]str").String()), nil
return fmt.Sprintf("%s%s", prefix, types.TypeListStr.String()), nil
default:
return "", fmt.Errorf("cannot convert %v to mcl", obj.Type)
}