Closed marcoscaceres closed 12 years ago
You mean in the AST? It's not very clear.
Sorry, not sure what the AST is… I mean when I do this (sudo-code):
var txt = "exception E{}"
var parsedIDL = WebIDLParser.parse(txt) parsedIDL[0].name === "E";
//this should be .identifier, not .name.. like this! parsedIDL[0].identifier === "E";
It's important to be consistent here, because otherwise it's gonna get really confusing looking stuff up (name is used on other things, etc). Web IDL defines an exception as:
exception identifier { exception-members… };
On Thursday, 22 March 2012 at 00:16, darobin wrote:
You mean in the AST? It's not very clear.
Reply to this email directly or view it on GitHub: https://github.com/darobin/webidl.js/issues/10#issuecomment-4630175
AST is the Abstract Syntax Tree, in other words what you're using as an interface to what's parsed.
You're not wrong here, but I'm afraid that ship has sailed. There's code that relies on this library and this is a fairly fundamental change and it would break pretty much anything already using it.
You don't need to "remove" name, you could have both name and identifier. That would fix the problem and retain backwards compat.
Marcos Caceres http://datadriven.com.au
On Thursday, 22 March 2012 at 19:37, darobin wrote:
AST is the Abstract Syntax Tree, in other words what you're using as an interface to what's parsed.
You're not wrong here, but I'm afraid that ship has sailed. There's code that relies on this library and this is a fairly fundamental change and it would break pretty much anything already using it.
Reply to this email directly or view it on GitHub: https://github.com/darobin/webidl.js/issues/10#issuecomment-4646609
To be consistant with webIDL, please use ". identifier" instead of ".name" for object identifiers.