@@ -32,6 +32,9 @@ pub(crate) enum RcWordSource {
3232
3333pub ( crate ) trait RcAllocator {
3434 fn allocate ( & mut self , source : RcWordSource , value : Unsigned36Bit ) -> Address ;
35+ }
36+
37+ pub ( crate ) trait RcUpdater {
3538 fn update ( & mut self , address : Address , value : Unsigned36Bit ) ;
3639}
3740
@@ -161,7 +164,7 @@ impl From<Atom> for SignedAtom {
161164 fn from ( magnitude : Atom ) -> Self {
162165 Self {
163166 negated : false ,
164- span : magnitude. span ( ) ,
167+ span : * magnitude. span ( ) ,
165168 magnitude,
166169 }
167170 }
@@ -454,12 +457,11 @@ impl From<SymbolOrLiteral> for Atom {
454457}
455458
456459impl Atom {
457- fn span ( & self ) -> Span {
458- // TODO: return &Span instead?
460+ fn span ( & self ) -> & Span {
459461 match self {
460- Atom :: SymbolOrLiteral ( value) => * value. span ( ) ,
461- Atom :: Parens ( span, _script, _bae) => * span,
462- Atom :: RcRef ( span, _) => * span,
462+ Atom :: SymbolOrLiteral ( value) => value. span ( ) ,
463+ Atom :: Parens ( span, _script, _bae) => span,
464+ Atom :: RcRef ( span, _) => span,
463465 }
464466 }
465467
@@ -602,8 +604,6 @@ pub(crate) enum InstructionFragment {
602604 rc_word_value : RegisterContaining ,
603605 } ,
604606 Null ,
605- // TODO: subscript/superscript atom (if the `Arithmetic` variant
606- // disallows subscript/superscript).
607607}
608608
609609impl InstructionFragment {
0 commit comments