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)
| 470 | // binding should be provided. Marking a function as runtime-only is a safe way to manage deprecations |
| 471 | // of function declarations while still preserving the runtime behavior for previously compiled expressions. |
| 472 | func DisableDeclaration(value bool) FunctionOpt { |
| 473 | return func(fn *FunctionDecl) (*FunctionDecl, error) { |
| 474 | if value { |
| 475 | fn.state = declarationDisabled |
| 476 | } else { |
| 477 | fn.state = declarationEnabled |
| 478 | } |
| 479 | return fn, nil |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | // SingletonUnaryBinding creates a singleton function definition to be used for all function overloads. |
| 484 | // |
no outgoing calls