DisableDeclaration indicates that the function declaration should be disabled, but the runtime function binding should be provided. Marking a function as runtime-only is a safe way to manage deprecations of function declarations while still preserving the runtime behavior for previously compiled exp
(value bool)
| 501 | // binding should be provided. Marking a function as runtime-only is a safe way to manage deprecations |
| 502 | // of function declarations while still preserving the runtime behavior for previously compiled expressions. |
| 503 | func DisableDeclaration(value bool) FunctionOpt { |
| 504 | return func(fn *FunctionDecl) (*FunctionDecl, error) { |
| 505 | if value { |
| 506 | fn.state = declarationDisabled |
| 507 | } else { |
| 508 | fn.state = declarationEnabled |
| 509 | } |
| 510 | return fn, nil |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | // SingletonUnaryBinding creates a singleton function definition to be used for all function overloads. |
| 515 | // |
no outgoing calls