File tree Expand file tree Collapse file tree 4 files changed +12
-20
lines changed Expand file tree Collapse file tree 4 files changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,7 @@ export default class ClassName extends Node {
2727 return this . _value ;
2828 }
2929
30- toString ( ) {
31- return [
32- this . rawSpaceBefore ,
33- String ( '.' + this . stringifyProperty ( "value" ) ) ,
34- this . rawSpaceAfter ,
35- ] . join ( '' ) ;
30+ valueToString ( ) {
31+ return '.' + super . valueToString ( ) ;
3632 }
3733}
Original file line number Diff line number Diff line change @@ -7,11 +7,7 @@ export default class ID extends Node {
77 this . type = IDType ;
88 }
99
10- toString ( ) {
11- return [
12- this . rawSpaceBefore ,
13- String ( '#' + this . stringifyProperty ( "value" ) ) ,
14- this . rawSpaceAfter ,
15- ] . join ( '' ) ;
10+ valueToString ( ) {
11+ return '#' + super . valueToString ( ) ;
1612 }
1713}
Original file line number Diff line number Diff line change @@ -52,11 +52,7 @@ export default class Namespace extends Node {
5252 }
5353 }
5454
55- toString ( ) {
56- return [
57- this . rawSpaceBefore ,
58- this . qualifiedName ( this . stringifyProperty ( "value" ) ) ,
59- this . rawSpaceAfter ,
60- ] . join ( '' ) ;
55+ valueToString ( ) {
56+ return this . qualifiedName ( super . valueToString ( ) ) ;
6157 }
6258} ;
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ export default class Node {
124124 }
125125
126126 /**
127- *
127+ *
128128 * @param {number } line The number (starting with 1)
129129 * @param {number } column The column number (starting with 1)
130130 */
@@ -177,10 +177,14 @@ export default class Node {
177177 this . raws . spaces . after = raw ;
178178 }
179179
180+ valueToString ( ) {
181+ return String ( this . stringifyProperty ( "value" ) ) ;
182+ }
183+
180184 toString ( ) {
181185 return [
182186 this . rawSpaceBefore ,
183- String ( this . stringifyProperty ( "value" ) ) ,
187+ this . valueToString ( ) ,
184188 this . rawSpaceAfter ,
185189 ] . join ( '' ) ;
186190 }
You can’t perform that action at this time.
0 commit comments