archives

« Bugzilla Issues Index

#2812 — ExportDeclaration grammar is ambigious


http://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports

ExportDeclaration :
...
export ExportClause[NoReference] FromClause ;
export ExportClause ;
...

To handle the above we need to first look ahead after all of ExportClause to know if [NoReference] should be set or not. Other options include using a cover grammar again or add "static semantics early errors" for this.


(Changing this bug's 'Version' from Rev 21 to Rev 24, since the latter was the current version when the bug was submitted, and there doesn't appear to be anything specific to Rev 21 in the Description.)


We talked about this face to face and the simplest solution is to use IdentifierName in both cases. Since we have to check that the name is exported anyway we will get early errors anyway.

We can therefore remove the [NoReference] parameter.


fixed in rev28 editor's draft

keep just the IdentiferName form and added early errors that restrict the "Reference" form in the same ways as IdentiferReference.


fixed in rev28