- jslint-ecma - Add ES2015-feature for..of. - #504
Merged
Conversation
….alive_list' to improve readability.
… function-parameter, etc) is assigned a value.
…part2 - Replace argument 'enroll' with 'enroll_parent', to explicitly pass the parent-context to be enrolled in.
…e code-readability of jslint's scoping-logic.
…ed things:
function-name-in-statement
global-variable
import-name
var-variable
…in internal-functions jslint_phase3_parse(), jslint_phase4_walk().
- const-declaration
- let-declaration
- function-declaration
- jslint - Restrict scope from function-scope to its own function-body:
- named-function-expression
- Remove obsolete deadcode and function pre_b_lparen(thing), that was already marked deadcode in PR-502.
- Remove obsolete bookmarking-logic for 'alive_list' that tracks pseudo-block-scope.
…r 'unknown_warning_code'. - jslint - Update internal-function infix_lparen() to allow fart, in addition to function.
…gument 'id', instead of making it optional.
- parse_statement() to parse_statement_single()
- parse_statements() to parse_statement_block()
…gument 'id', instead of making it optional. - part2 - Cleanup function-names.
… scope-logic:
- 'blockage' to 'scope_block'
- 'functionage' to 'scope_function'
- for-loop - jslint - Disable directive-option /*jslint for*/, replacing it with for-loop specific warnings.
- if-else
- while-loop
- do-while
- parse_statement_single()
- stmt_label()
- jslint - split token-property '.label' into following to prevent confusion between 2 very different things:
- 'label_goto' - the goto-label after 'break' statement, e.g. 'break aa;'
- 'name_alias' - the alias after desctructure-colon, e.g. 'let {aa:name_alias} = ...;'
…k_pop() and scope_function_pop(). - jslint - split internal functions scope_stack_push() into scope_block_push() and scope_function_push().
- label-name
…t label-name to statements do,for,switch,while.
…whether they are let/const (scope_block) or var (scope_function).
…, to improve readability.
- jslint - Change warning 'out_of_scope_a' to 'temporal_dead_zone_a'.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #176.
A sorely missed feature, that happily is now implemented :)
under-the-hood, jslint's scoping system was significantly revamped
a beneficial side-effect, is that
constandletdeclarations can be declared inside the top of statement-blocks,following special variables / parameters / names are declared inside a hidden scope to avoid name-collision with normal variables:
This PR will:
This PR will additionally: