Repository: w3c/webidl2.js
Pull request #193 (2018-06-09 11:38:50)

Add trivia for modifiers
Similar `null`s we saw on #192.


Patch:
diff --git a/lib/webidl2.js b/lib/webidl2.js
index a03b71b..0ae4db1 100644
--- a/lib/webidl2.js
+++ b/lib/webidl2.js
@@ -186,11 +186,11 @@
 
     const EMPTY_OPERATION = Object.freeze({
       type: "operation",
-      getter: false,
-      setter: false,
-      deleter: false,
-      static: false,
-      stringifier: false
+      getter: null,
+      setter: null,
+      deleter: null,
+      static: null,
+      stringifier: null
     });
 
     const EMPTY_IDLTYPE = Object.freeze({
@@ -614,16 +614,21 @@
       const start_position = consume_position;
       const ret = {
         type: "attribute",
-        static: false,
-        stringifier: false,
-        inherit: false,
-        readonly: false
+        static: null,
+        stringifier: null,
+        inherit: null,
+        readonly: null,
+        trivia: {}
       };
-      if (!noInherit && consume("inherit")) {
-        ret.inherit = true;
+      if (!noInherit) {
+        const inherit = consume("inherit")
+        if (inherit) {
+          ret.inherit = { trivia: inherit.trivia };
+        }
       }
-      if (consume("readonly")) {
-        ret.readonly = true;
+      const readonlyToken = consume("readonly");
+      if (readonlyToken) {
+        ret.readonly = { trivia: readonlyToken.trivia };
       } else if (readonly && probe("attribute")) {
         error("Attributes must be readonly in this context");
       }
@@ -635,9 +640,11 @@
     }
 
     function attribute_rest(ret) {
-      if (!consume("attribute")) {
+      const base = consume("attribute");
+      if (!base) {
         return;
       }
+      ret.trivia.base = base.trivia;
       ret.idlType = type_with_extended_attributes("attribute-type") || error("No type in attribute");
       switch (ret.idlType.generic && ret.idlType.generic.value) {
         case "sequence":
@@ -646,7 +653,9 @@
       const name = consume(ID, "required") || error("No name in attribute");
       ret.name = unescape(name.value);
       ret.escapedName = name.value;
-      consume(";") || error("Unterminated attribute");
+      ret.trivia.name = name.trivia;
+      const termination = consume(";") || error("Unterminated attribute");
+      ret.trivia.termination = termination.trivia;
       return ret;
     }
 
@@ -668,10 +677,11 @@
     function operation({ regular = false } = {}) {
       const ret = Object.assign({}, EMPTY_OPERATION);
       while (!regular) {
-        if (consume("getter")) ret.getter = true;
-        else if (consume("setter")) ret.setter = true;
-        else if (consume("deleter")) ret.deleter = true;
-        else break;
+        const special = consume("getter", "setter", "deleter");
+        if (!special) {
+          break;
+        }
+        ret[special.type] = { trivia: special.trivia };
       }
       ret.idlType = return_type() || error("Missing return type");
       operation_rest(ret);
@@ -679,23 +689,26 @@
     }
 
     function static_member() {
-      if (!consume("static")) return;
+      const token = consume("static");
+      if (!token) return;
       const member = attribute({ noInherit: true }) ||
         operation({ regular: true }) ||
         error("No body in static member");
-      member.static = true;
+      member.static = { trivia: token.trivia };
       return member;
     }
 
     function stringifier() {
-      if (!consume("stringifier")) return;
+      const token = consume("stringifier");
+      if (!token) return;
+      const triviaObject = { trivia: token.trivia };
       if (consume(";")) {
-        return Object.assign({}, EMPTY_OPERATION, { stringifier: true });
+        return Object.assign({}, EMPTY_OPERATION, { stringifier: triviaObject });
       }
       const member = attribute({ noInherit: true }) ||
         operation({ regular: true }) ||
         error("Unterminated stringifier");
-      member.stringifier = true;
+      member.stringifier = triviaObject;
       return member;
     }
 
diff --git a/lib/writer.js b/lib/writer.js
index 541f0ba..62054ec 100644
--- a/lib/writer.js
+++ b/lib/writer.js
@@ -52,9 +52,9 @@
 
     function operation(it) {
       let ret = extended_attributes(it.extAttrs);
-      if (it.stringifier && !it.idlType) return "stringifier;";
+      if (it.stringifier && !it.idlType) return `${it.stringifier.trivia}stringifier;`;
       for (const mod of ["getter", "setter", "deleter", "stringifier", "static"]) {
-        if (it[mod]) ret += mod;
+        if (it[mod]) ret += `${it[mod].trivia}${mod}`;
       }
       ret += type(it.idlType) + " ";
       if (it.name) ret += it.escapedName;
@@ -64,11 +64,11 @@
 
     function attribute(it) {
       let ret = extended_attributes(it.extAttrs);
-      if (it.static) ret += "static ";
-      if (it.stringifier) ret += "stringifier ";
-      if (it.inherit) ret += "inherit ";
-      if (it.readonly) ret += "readonly ";
-      ret += `attribute${type(it.idlType)} ${it.escapedName};`;
+      if (it.static) ret += `${it.static.trivia}static`;
+      if (it.stringifier) ret += `${it.stringifier.trivia}stringifier`;
+      if (it.inherit) ret += `${it.inherit.trivia}inherit`;
+      if (it.readonly) ret += `${it.readonly.trivia}readonly`;
+      ret += `${it.trivia.base}attribute${type(it.idlType)}${it.trivia.name}${it.escapedName};`;
       return ret;
     };
 


Test patch:
diff --git a/test/syntax/json/allowany.json b/test/syntax/json/allowany.json
index 9398f31..ab7d6fa 100644
--- a/test/syntax/json/allowany.json
+++ b/test/syntax/json/allowany.json
@@ -6,11 +6,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -33,11 +33,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -84,11 +84,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/attributes.json b/test/syntax/json/attributes.json
index bbc73db..4453a89 100644
--- a/test/syntax/json/attributes.json
+++ b/test/syntax/json/attributes.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n\n  // A simple attribute that can be set to any value the range an unsigned\n  // short can take.\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -34,10 +39,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n\n  // required is an allowed attribute name\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/callback.json b/test/syntax/json/callback.json
index 5ee3035..f4e51f2 100644
--- a/test/syntax/json/callback.json
+++ b/test/syntax/json/callback.json
@@ -51,11 +51,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/constructor.json b/test/syntax/json/constructor.json
index 0101087..6de596a 100644
--- a/test/syntax/json/constructor.json
+++ b/test/syntax/json/constructor.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -31,10 +36,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -56,10 +66,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -81,10 +96,17 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/enum.json b/test/syntax/json/enum.json
index f09bcfa..384d508 100644
--- a/test/syntax/json/enum.json
+++ b/test/syntax/json/enum.json
@@ -25,10 +25,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -50,10 +55,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -75,11 +85,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/equivalent-decl.json b/test/syntax/json/equivalent-decl.json
index 3ea3edb..a219c1e 100644
--- a/test/syntax/json/equivalent-decl.json
+++ b/test/syntax/json/equivalent-decl.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -34,11 +41,13 @@
             },
             {
                 "type": "operation",
-                "getter": true,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": {
+                    "trivia": "\n\n  "
+                },
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -85,11 +94,13 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": true,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": {
+                    "trivia": "\n  "
+                },
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -175,10 +186,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -203,11 +221,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -254,11 +272,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -328,11 +346,13 @@
             },
             {
                 "type": "operation",
-                "getter": true,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": {
+                    "trivia": "\n\n  "
+                },
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -379,11 +399,13 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": true,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": {
+                    "trivia": "\n  "
+                },
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/extended-attributes.json b/test/syntax/json/extended-attributes.json
index 46a99a5..a1fa575 100644
--- a/test/syntax/json/extended-attributes.json
+++ b/test/syntax/json/extended-attributes.json
@@ -86,10 +86,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -111,10 +116,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -136,10 +146,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -161,10 +176,17 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -239,10 +261,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n    ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/generic.json b/test/syntax/json/generic.json
index 3810e93..254792f 100644
--- a/test/syntax/json/generic.json
+++ b/test/syntax/json/generic.json
@@ -6,11 +6,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": {
@@ -101,10 +101,17 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": {
@@ -164,11 +171,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": {
@@ -215,11 +222,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": {
@@ -280,11 +287,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": {
diff --git a/test/syntax/json/getter-setter.json b/test/syntax/json/getter-setter.json
index 6f883af..19e84b4 100644
--- a/test/syntax/json/getter-setter.json
+++ b/test/syntax/json/getter-setter.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -34,11 +41,13 @@
             },
             {
                 "type": "operation",
-                "getter": true,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": {
+                    "trivia": "\n\n  "
+                },
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -85,11 +94,13 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": true,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": {
+                    "trivia": "\n  "
+                },
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/identifier-qualified-names.json b/test/syntax/json/identifier-qualified-names.json
index 65b984c..b7365df 100644
--- a/test/syntax/json/identifier-qualified-names.json
+++ b/test/syntax/json/identifier-qualified-names.json
@@ -26,11 +26,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -77,11 +77,13 @@
             },
             {
                 "type": "operation",
-                "getter": true,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": {
+                    "trivia": "\n\n    // Operation has no identifier; it declares a getter.\n    "
+                },
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -144,10 +146,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n\n      // Attribute identifier: \"const\"\n      ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -169,10 +176,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n\n      // Attribute identifier: \"value\"\n      ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -212,11 +224,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/implements.json b/test/syntax/json/implements.json
index 232b07e..cac797c 100644
--- a/test/syntax/json/implements.json
+++ b/test/syntax/json/implements.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n    "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -50,11 +57,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/indexed-properties.json b/test/syntax/json/indexed-properties.json
index f976419..733cdc0 100644
--- a/test/syntax/json/indexed-properties.json
+++ b/test/syntax/json/indexed-properties.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -34,11 +41,13 @@
             },
             {
                 "type": "operation",
-                "getter": true,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": {
+                    "trivia": "\n\n  "
+                },
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -88,11 +97,13 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": true,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": {
+                    "trivia": "\n  "
+                },
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -165,11 +176,13 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": true,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": {
+                    "trivia": "\n  "
+                },
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -219,11 +232,13 @@
             },
             {
                 "type": "operation",
-                "getter": true,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": {
+                    "trivia": "\n\n  "
+                },
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -270,11 +285,13 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": true,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": {
+                    "trivia": "\n  "
+                },
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -344,11 +361,13 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": true,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": {
+                    "trivia": "\n  "
+                },
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/inherits-getter.json b/test/syntax/json/inherits-getter.json
index 4d38240..08eb23b 100644
--- a/test/syntax/json/inherits-getter.json
+++ b/test/syntax/json/inherits-getter.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n\n  // A simple attribute that can be set to any string value.\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -47,10 +54,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n\n  // An attribute whose value cannot be assigned to.\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -75,10 +89,17 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": true,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": {
+                    "trivia": "\n\n  // An attribute that can raise an exception if it is set to an invalid value.\n  // Its getter behavior is inherited from Animal, and need not be specified\n  // the description of Person.\n  "
+                },
+                "readonly": null,
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -116,10 +137,19 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": true,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": {
+                    "trivia": "\n\n  // An attribute that only inherits the getter behavior\n  "
+                },
+                "readonly": {
+                    "trivia": " "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/interface-inherits.json b/test/syntax/json/interface-inherits.json
index 010abe7..36a4bf5 100644
--- a/test/syntax/json/interface-inherits.json
+++ b/test/syntax/json/interface-inherits.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -47,10 +52,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -88,10 +98,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/mixin.json b/test/syntax/json/mixin.json
index 5cab795..54620d1 100644
--- a/test/syntax/json/mixin.json
+++ b/test/syntax/json/mixin.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -55,10 +62,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/namespace.json b/test/syntax/json/namespace.json
index b5bf8ec..5467211 100644
--- a/test/syntax/json/namespace.json
+++ b/test/syntax/json/namespace.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -31,11 +38,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -105,11 +112,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/nointerfaceobject.json b/test/syntax/json/nointerfaceobject.json
index e485ef2..810f250 100644
--- a/test/syntax/json/nointerfaceobject.json
+++ b/test/syntax/json/nointerfaceobject.json
@@ -6,11 +6,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/nullable.json b/test/syntax/json/nullable.json
index f7bc318..0e4f0e8 100644
--- a/test/syntax/json/nullable.json
+++ b/test/syntax/json/nullable.json
@@ -48,10 +48,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/nullableobjects.json b/test/syntax/json/nullableobjects.json
index db6bb89..52d3f87 100644
--- a/test/syntax/json/nullableobjects.json
+++ b/test/syntax/json/nullableobjects.json
@@ -36,11 +36,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -89,11 +89,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/operation-optional-arg.json b/test/syntax/json/operation-optional-arg.json
index fdbd672..8a62a59 100644
--- a/test/syntax/json/operation-optional-arg.json
+++ b/test/syntax/json/operation-optional-arg.json
@@ -6,11 +6,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/overloading.json b/test/syntax/json/overloading.json
index 6de371d..7f2b275 100644
--- a/test/syntax/json/overloading.json
+++ b/test/syntax/json/overloading.json
@@ -36,11 +36,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -87,11 +87,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -154,11 +154,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -205,11 +205,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -309,11 +309,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -336,11 +336,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/overridebuiltins.json b/test/syntax/json/overridebuiltins.json
index ac466ea..423a722 100644
--- a/test/syntax/json/overridebuiltins.json
+++ b/test/syntax/json/overridebuiltins.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -34,11 +41,13 @@
             },
             {
                 "type": "operation",
-                "getter": true,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": {
+                    "trivia": "\n  "
+                },
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/partial-interface.json b/test/syntax/json/partial-interface.json
index 912228a..3815a1a 100644
--- a/test/syntax/json/partial-interface.json
+++ b/test/syntax/json/partial-interface.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -47,10 +52,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/primitives.json b/test/syntax/json/primitives.json
index 022e6bf..f795b03 100644
--- a/test/syntax/json/primitives.json
+++ b/test/syntax/json/primitives.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -31,10 +36,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -56,10 +66,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -81,10 +96,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -106,10 +126,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -134,10 +159,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -159,10 +189,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -187,10 +222,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -215,10 +255,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -246,10 +291,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -271,10 +321,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -296,10 +351,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -324,10 +384,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -352,10 +417,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -377,10 +447,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -402,10 +477,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -427,10 +507,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/promise-void.json b/test/syntax/json/promise-void.json
index 7826f9a..e2aabf0 100644
--- a/test/syntax/json/promise-void.json
+++ b/test/syntax/json/promise-void.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n    ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": {
diff --git a/test/syntax/json/prototyperoot.json b/test/syntax/json/prototyperoot.json
index 848b878..15fb9d1 100644
--- a/test/syntax/json/prototyperoot.json
+++ b/test/syntax/json/prototyperoot.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/putforwards.json b/test/syntax/json/putforwards.json
index b8cca8f..e5c2c69 100644
--- a/test/syntax/json/putforwards.json
+++ b/test/syntax/json/putforwards.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": " "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -41,10 +48,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/record.json b/test/syntax/json/record.json
index ec51e9c..a8d2d43 100644
--- a/test/syntax/json/record.json
+++ b/test/syntax/json/record.json
@@ -6,11 +6,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -119,11 +119,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": {
@@ -310,11 +310,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": {
diff --git a/test/syntax/json/reg-operations.json b/test/syntax/json/reg-operations.json
index f85c4ec..3e580ab 100644
--- a/test/syntax/json/reg-operations.json
+++ b/test/syntax/json/reg-operations.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -34,10 +39,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -78,11 +88,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -105,11 +115,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -156,11 +166,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/replaceable.json b/test/syntax/json/replaceable.json
index fef0a69..64eea68 100644
--- a/test/syntax/json/replaceable.json
+++ b/test/syntax/json/replaceable.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": " "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -41,11 +48,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/sequence.json b/test/syntax/json/sequence.json
index c74e96e..430c32f 100644
--- a/test/syntax/json/sequence.json
+++ b/test/syntax/json/sequence.json
@@ -6,11 +6,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -79,11 +79,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": {
@@ -144,11 +144,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/static.json b/test/syntax/json/static.json
index 2a40f35..11d6a94 100644
--- a/test/syntax/json/static.json
+++ b/test/syntax/json/static.json
@@ -21,10 +21,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -46,10 +51,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -71,10 +81,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -96,10 +111,19 @@
             },
             {
                 "type": "attribute",
-                "static": true,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": {
+                    "trivia": "\n\n  "
+                },
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": " "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -121,11 +145,13 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": true,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": {
+                    "trivia": "\n  "
+                },
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/stringifier-attribute.json b/test/syntax/json/stringifier-attribute.json
index 6198389..aa05eaf 100644
--- a/test/syntax/json/stringifier-attribute.json
+++ b/test/syntax/json/stringifier-attribute.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -34,10 +39,17 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": true,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": {
+                    "trivia": "\n  "
+                },
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/stringifier-custom.json b/test/syntax/json/stringifier-custom.json
index 3c2b0a0..2a9055a 100644
--- a/test/syntax/json/stringifier-custom.json
+++ b/test/syntax/json/stringifier-custom.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -34,10 +39,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -61,10 +71,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -86,11 +101,13 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": true,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": {
+                    "trivia": "\n\n  "
+                },
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/stringifier.json b/test/syntax/json/stringifier.json
index 0d2d26f..b354541 100644
--- a/test/syntax/json/stringifier.json
+++ b/test/syntax/json/stringifier.json
@@ -6,11 +6,13 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": true,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": {
+                    "trivia": "\n  "
+                },
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -49,11 +51,13 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": true,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": {
+                    "trivia": "\n  "
+                },
                 "extAttrs": []
             }
         ],
diff --git a/test/syntax/json/treatasnull.json b/test/syntax/json/treatasnull.json
index 11cf3e0..cfa7cfb 100644
--- a/test/syntax/json/treatasnull.json
+++ b/test/syntax/json/treatasnull.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -31,10 +36,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -56,11 +66,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/treatasundefined.json b/test/syntax/json/treatasundefined.json
index 514fa9d..8851497 100644
--- a/test/syntax/json/treatasundefined.json
+++ b/test/syntax/json/treatasundefined.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -31,10 +36,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n  ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -56,11 +66,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/typedef.json b/test/syntax/json/typedef.json
index 1f96fbf..63620c6 100644
--- a/test/syntax/json/typedef.json
+++ b/test/syntax/json/typedef.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n        ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -31,10 +36,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n        ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -114,10 +124,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n        ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -139,10 +154,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n        ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -180,10 +200,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n\n    "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -205,11 +232,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -256,11 +283,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/typesuffixes.json b/test/syntax/json/typesuffixes.json
index 5ec4e88..04fddb0 100644
--- a/test/syntax/json/typesuffixes.json
+++ b/test/syntax/json/typesuffixes.json
@@ -6,11 +6,11 @@
         "members": [
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
diff --git a/test/syntax/json/uniontype.json b/test/syntax/json/uniontype.json
index 5e73be6..ec60223 100644
--- a/test/syntax/json/uniontype.json
+++ b/test/syntax/json/uniontype.json
@@ -6,10 +6,15 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -156,10 +161,15 @@
             },
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": false,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": null,
+                "trivia": {
+                    "base": "\n ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
diff --git a/test/syntax/json/variadic-operations.json b/test/syntax/json/variadic-operations.json
index a648762..297ba3f 100644
--- a/test/syntax/json/variadic-operations.json
+++ b/test/syntax/json/variadic-operations.json
@@ -6,10 +6,17 @@
         "members": [
             {
                 "type": "attribute",
-                "static": false,
-                "stringifier": false,
-                "inherit": false,
-                "readonly": true,
+                "static": null,
+                "stringifier": null,
+                "inherit": null,
+                "readonly": {
+                    "trivia": "\n  "
+                },
+                "trivia": {
+                    "base": " ",
+                    "name": " ",
+                    "termination": ""
+                },
                 "idlType": {
                     "type": "attribute-type",
                     "generic": null,
@@ -34,11 +41,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,
@@ -85,11 +92,11 @@
             },
             {
                 "type": "operation",
-                "getter": false,
-                "setter": false,
-                "deleter": false,
-                "static": false,
-                "stringifier": false,
+                "getter": null,
+                "setter": null,
+                "deleter": null,
+                "static": null,
+                "stringifier": null,
                 "idlType": {
                     "type": "return-type",
                     "generic": null,