1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
use ;
use paste;
use ;
/// A macro that declares a parameter at compile time.
///
/// This macro generates a constant `Parameter` with a given numeric value and
/// name. It also creates a companion constant for the numeric value with a
/// suffix `_VALUE`.
///
/// # Examples
///
/// ```ignore
/// use bc_envelope::prelude::*;
/// use bc_envelope::parameter_constant;
/// use bc_envelope::extension::expressions::Parameter;
///
/// // Define a custom parameter
/// parameter_constant!(MY_PARAM, 100, "myParam");
///
/// // Usage
/// assert_eq!(MY_PARAM_VALUE, 100);
/// assert_eq!(MY_PARAM.name(), "myParam");
/// ```
// The blank parameter, used for single-parameter functions.
//
// This parameter is commonly used when a function needs only one parameter
// and the parameter's purpose is clear from context. It is denoted as `❰_❱`
// in envelope notation.
parameter_constant!;
// The left-hand side parameter, used for binary operations.
//
// This parameter typically represents the first operand in a binary operation
// such as addition or multiplication.
parameter_constant!;
// The right-hand side parameter, used for binary operations.
//
// This parameter typically represents the second operand in a binary operation
// such as addition or multiplication.
parameter_constant!;
/// A helper type for lazy initialization of the global parameters store.
///
/// This is an implementation detail that handles thread-safe, one-time
/// initialization of the global parameters registry.
/// The global shared store of known parameters.
///
/// This provides access to a global registry of standard parameters used
/// in envelope expressions. It is lazily initialized the first time it's
/// accessed.
///
/// # Examples
///
/// ```
/// use bc_envelope::{
/// extension::expressions::{GLOBAL_PARAMETERS, parameters},
/// prelude::*,
/// };
///
/// // Access the global parameters store
/// let parameters_store = GLOBAL_PARAMETERS.get();
/// if let Some(store) = &*parameters_store {
/// // Use the store to look up parameter names
/// assert_eq!(store.name(¶meters::LHS), "lhs");
/// }
/// ```
pub static GLOBAL_PARAMETERS: LazyParameters =
LazyParameters ;