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