File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -720,6 +720,7 @@ Extended attributes look like this:
720720* ` type ` : Always ` "extended-attribute" ` .
721721* ` rhs ` : If there is a right-hand side, this will capture its ` type ` and ` value ` . The
722722 type can be one of the following:
723+
723724 * ` "identifier" `
724725 * ` "identifier-list" `
725726 * ` "string" `
@@ -729,6 +730,8 @@ Extended attributes look like this:
729730 * ` "integer" `
730731 * ` "integer-list" `
731732 * ` "*" `
733+
734+ Each child of a list has its own ` type ` of ` value ` , e.g. ` type: "identifier" ` for ` "identifier-list" ` .
732735* ` parent ` : The container of this type as an Object.
733736
734737### Default and Const Values
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ export class WrappedToken extends Base {
1818 } ;
1919 }
2020
21+ get type ( ) {
22+ return this . tokens . value . type ;
23+ }
24+
2125 get value ( ) {
2226 return unescape ( this . tokens . value . value ) ;
2327 }
Original file line number Diff line number Diff line change 1212 "type" : " identifier-list" ,
1313 "value" : [
1414 {
15+ "type" : " identifier" ,
1516 "value" : " Worker"
1617 },
1718 {
19+ "type" : " identifier" ,
1820 "value" : " ServiceWorker"
1921 }
2022 ]
8284 "type" : " identifier-list" ,
8385 "value" : [
8486 {
87+ "type" : " identifier" ,
8588 "value" : " null"
8689 },
8790 {
91+ "type" : " identifier" ,
8892 "value" : " const"
8993 }
9094 ]
98102 "type" : " decimal-list" ,
99103 "value" : [
100104 {
105+ "type" : " decimal" ,
101106 "value" : " 3.14"
102107 }
103108 ]
Original file line number Diff line number Diff line change 6363 "type" : " string-list" ,
6464 "value" : [
6565 {
66+ "type" : " string" ,
6667 "value" : " \" anonymous\" "
6768 },
6869 {
70+ "type" : " string" ,
6971 "value" : " \" use-credentials\" "
7072 }
7173 ]
101103 "type" : " integer-list" ,
102104 "value" : [
103105 {
106+ "type" : " integer" ,
104107 "value" : " 1"
105108 },
106109 {
110+ "type" : " integer" ,
107111 "value" : " 4"
108112 }
109113 ]
You can’t perform that action at this time.
0 commit comments