@@ -72,6 +72,39 @@ export class SymbolDuplicatePinNumbersAreJumpers extends SxPrimitiveBoolean {
7272} 
7373SxClass . register ( SymbolDuplicatePinNumbersAreJumpers ) 
7474
75+ export  class  Mirror  extends  SxClass  { 
76+   static  override  token  =  "mirror" 
77+   static  override  parentToken  =  "symbol" 
78+   token  =  "mirror" 
79+ 
80+   value : string 
81+ 
82+   constructor ( value : string )  { 
83+     super ( ) 
84+     this . value  =  value 
85+   } 
86+ 
87+   static  override  fromSexprPrimitives ( 
88+     primitiveSexprs : PrimitiveSExpr [ ] , 
89+   ) : Mirror  { 
90+     const  [ valuePrimitive ]  =  primitiveSexprs 
91+     const  value  =  toStringValue ( valuePrimitive ) 
92+     if  ( value  ===  undefined )  { 
93+       throw  new  Error ( "mirror expects a string value (x or y)" ) 
94+     } 
95+     return  new  Mirror ( value ) 
96+   } 
97+ 
98+   override  getChildren ( ) : SxClass [ ]  { 
99+     return  [ ] 
100+   } 
101+ 
102+   override  getString ( ) : string  { 
103+     return  `(mirror ${ this . value }  
104+   } 
105+ } 
106+ SxClass . register ( Mirror ) 
107+ 
75108export  class  SymbolPinNumbers  extends  SxClass  { 
76109  static  override  token  =  "pin_numbers" 
77110  static  override  parentToken  =  "symbol" 
@@ -650,6 +683,7 @@ SxClass.register(SymbolPower)
650683export  interface  SchematicSymbolConstructorParams  { 
651684  libraryId ?: string 
652685  at ?: AtInput 
686+   mirror ?: string  |  Mirror 
653687  unit ?: number  |  SymbolUnit 
654688  pinNumbers ?: SymbolPinNumbers 
655689  pinNames ?: SymbolPinNames 
@@ -678,6 +712,7 @@ export class SchematicSymbol extends SxClass {
678712
679713  private  _sxLibId ?: SymbolLibId 
680714  _sxAt ?: At 
715+   _sxMirror ?: Mirror 
681716  _sxUnit ?: SymbolUnit 
682717  _sxPinNumbers ?: SymbolPinNumbers 
683718  _sxPinNames ?: SymbolPinNames 
@@ -706,6 +741,7 @@ export class SchematicSymbol extends SxClass {
706741
707742    if  ( params . libraryId  !==  undefined )  this . libraryId  =  params . libraryId 
708743    if  ( params . at  !==  undefined )  this . at  =  params . at 
744+     if  ( params . mirror  !==  undefined )  this . mirror  =  params . mirror 
709745    if  ( params . unit  !==  undefined ) 
710746      this . unit  = 
711747        typeof  params . unit  ===  "number"  ? params . unit  : params . unit . value 
@@ -763,6 +799,18 @@ export class SchematicSymbol extends SxClass {
763799    this . _sxAt  =  value  !==  undefined  ? At . from ( value )  : undefined 
764800  } 
765801
802+   get  mirror ( ) : string  |  undefined  { 
803+     return  this . _sxMirror ?. value 
804+   } 
805+ 
806+   set  mirror ( value : string  |  Mirror  |  undefined )  { 
807+     if  ( value  ===  undefined )  { 
808+       this . _sxMirror  =  undefined 
809+       return 
810+     } 
811+     this . _sxMirror  =  value  instanceof  Mirror  ? value  : new  Mirror ( value ) 
812+   } 
813+ 
766814  get  unit ( ) : number  |  undefined  { 
767815    return  this . _sxUnit ?. value 
768816  } 
@@ -882,6 +930,7 @@ export class SchematicSymbol extends SxClass {
882930      symbol . _inlineLibId  =  inlineId 
883931    } 
884932    symbol . _sxAt  =  propertyMap . at  as  At 
933+     symbol . _sxMirror  =  propertyMap . mirror  as  Mirror 
885934    symbol . _sxUnit  =  propertyMap . unit  as  SymbolUnit 
886935    symbol . _sxPinNumbers  =  propertyMap . pin_numbers  as  SymbolPinNumbers 
887936    symbol . _sxPinNames  =  propertyMap . pin_names  as  SymbolPinNames 
@@ -913,6 +962,7 @@ export class SchematicSymbol extends SxClass {
913962    const  children : SxClass [ ]  =  [ ] 
914963    if  ( this . _sxLibId )  children . push ( this . _sxLibId ) 
915964    if  ( this . _sxAt )  children . push ( this . _sxAt ) 
965+     if  ( this . _sxMirror )  children . push ( this . _sxMirror ) 
916966    if  ( this . _sxUnit )  children . push ( this . _sxUnit ) 
917967    if  ( this . _sxPinNumbers )  children . push ( this . _sxPinNumbers ) 
918968    if  ( this . _sxPinNames )  children . push ( this . _sxPinNames ) 
0 commit comments