Skip to content

[Feature Request] Allow dots in injected Expr function names #539

Open
@polds

Description

@polds

We'd like to inject effectively an entire package into our Expr environment with a dozen or so methods. We were hoping to be able to effectively treat it like Go's package syntax and do something like:

expr.Function("pkg.NewThing", func(p ...any) (any, error) { }

But pkg. seems disallowed as the Compile step throws an error like:

unknown name pkg (1:9)
| let x = pkg.NewThing([1, 2, 3]); x.String()
| ........^

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions