-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[[FIX]] Distinguish between directive and mode
All code within a class body is interpreted as "strict mode" code. This can be simulated by explicitly setting the internal mechanism for the "use strict" directive, but that approach is misleading. In such cases, the code is in strict mode, but the "use strict" directive is *not* set. Define a general-purpose `isStrict` method that determines the language mode according to these two distinct conditions. This approach enables a more expressive and accurate means for the internals to control parsing behavior. In addition, it may be re-used when JSHint is extended to lint module bodies as strict mode code.
- Loading branch information
1 parent
c0edd9f
commit 51059bd
Showing
3 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters