aboutsummaryrefslogtreecommitdiff
path: root/lib/xixanta/src/object.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xixanta/src/object.rs')
-rw-r--r--lib/xixanta/src/object.rs22
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/xixanta/src/object.rs b/lib/xixanta/src/object.rs
index 1887b77..36b15dc 100644
--- a/lib/xixanta/src/object.rs
+++ b/lib/xixanta/src/object.rs
@@ -142,8 +142,10 @@ pub struct Object {
pub bundle: Bundle,
/// Node which marks the source of the computed `bundle` attribute. This is
- /// only provided in cases like macro calls where at the crunching stage we
- /// might need to fetch previous context for the current `bundle` value.
+ /// provided in cases like macro calls where at the crunching stage we might
+ /// need to fetch previous context for the current `bundle` value. It is
+ /// also provided in variable definitions, as an indirect way to fetch the
+ /// original source containing the definition.
pub node: Option<PNode>,
/// The mapping index where the object was found. Note that this index
@@ -169,22 +171,6 @@ pub struct Object {
pub accessed: usize,
}
-impl Object {
- /// Create a default bundle with the given metadata parameters.
- pub fn new(mapping: usize, segment: usize, object_type: ObjectType) -> Self {
- Self {
- bundle: Bundle::default(),
- node: None,
- mapping,
- segment,
- object_type,
- asan_ignore: false,
- asan_reserve: 1,
- accessed: 0,
- }
- }
-}
-
/// Context holds information about the different scopes being defined, the
/// current scope, and has a map of all the variables defined for each scope.
#[derive(Debug)]