diff --git a/test/syntax/baseline/nullable.json b/test/syntax/baseline/nullable.json index e296e63f..eb9a31ae 100644 --- a/test/syntax/baseline/nullable.json +++ b/test/syntax/baseline/nullable.json @@ -38,6 +38,39 @@ "termination": "" }, "extAttrs": null + }, + { + "type": "const", + "idlType": { + "type": "const-type", + "generic": null, + "nullable": { + "trivia": "" + }, + "union": false, + "idlType": "MyPrimitive", + "baseName": "MyPrimitive", + "escapedBaseName": "MyPrimitive", + "prefix": null, + "postfix": null, + "separator": null, + "extAttrs": null, + "trivia": { + "base": " " + } + }, + "name": "MY_NULL", + "value": { + "type": "null" + }, + "trivia": { + "base": "\n ", + "name": " ", + "assign": " ", + "value": " ", + "termination": "" + }, + "extAttrs": null } ], "extAttrs": null, @@ -103,6 +136,6 @@ { "type": "eof", "value": "", - "trivia": "" + "trivia": "\n" } ] diff --git a/test/syntax/idl/nullable.widl b/test/syntax/idl/nullable.widl index ccbf625f..eeceb3f7 100644 --- a/test/syntax/idl/nullable.widl +++ b/test/syntax/idl/nullable.widl @@ -1,9 +1,10 @@ // Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 interface MyConstants { const boolean? ARE_WE_THERE_YET = false; + const MyPrimitive? MY_NULL = null; }; interface Node { readonly attribute DOMString? namespaceURI; // ... -}; \ No newline at end of file +};