detecting JS language mode for tools
erik.arvidsson at gmail.com
Tue Jan 28 10:39:55 PST 2014
On Tue, Jan 28, 2014 at 12:32 PM, Brendan Eich <brendan at mozilla.com> wrote:
> John Lenz wrote:
>> There are three issues in my mind for tooling:
>> 1) should the code be parsed as "use strict"
>> 2) are "import" and "export" and "module" statements valid
> Note no "module" form in ES6.
module M from './path/to/module';
is a valid ModuleItem.
> 3) should top level declarations be considered visible outside the file
>> (no can be inferred from the presence of import or exports)
>> It is my guess that it will be a common beginner mistake to load modules
>> as scripts or try to use "import" from scripts. The first is the primary
>> one as keywords etc are different.
> You could be right -- we should find out. The "mistake" has a flip-side,
> if we allow it: detection-based two-way module-scripts.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss