Skip to content

Commit ca35f4c

Browse files
authored
Merge branch 'main' into no-supplement
2 parents 360207d + 644e7dc commit ca35f4c

File tree

6 files changed

+292
-291
lines changed

6 files changed

+292
-291
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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

lib/productions/token.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)