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)
| 480 | // binding should be provided. Marking a function as runtime-only is a safe way to manage deprecations |
| 481 | // of function declarations while still preserving the runtime behavior for previously compiled expressions. |
| 482 | func DisableDeclaration(value bool) FunctionOpt { |
| 483 | return func(fn *FunctionDecl) (*FunctionDecl, error) { |
| 484 | if value { |
| 485 | fn.state = declarationDisabled |
| 486 | } else { |
| 487 | fn.state = declarationEnabled |
| 488 | } |
| 489 | return fn, nil |
| 490 | } |
| 491 | } |
| 492 | |
| 493 | // SingletonUnaryBinding creates a singleton function definition to be used for all function overloads. |
| 494 | // |
no outgoing calls