mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
Update comment
This commit is contained in:
parent
e5b997c530
commit
ecfc60ff16
@ -154,6 +154,13 @@ module TypeScript.Parser {
|
||||
// TODO: do we need to store/restore this when speculative parsing? I don't think so. The
|
||||
// parsing logic already handles storing/restoring this and should work properly even if we're
|
||||
// speculative parsing.
|
||||
//
|
||||
// When adding more parser context flags, consider which is the more common case that the
|
||||
// flag will be in. This should be hte 'false' state for that flag. The reason for this is
|
||||
// that we don't store data in our nodes unless the value is in the *non-default* state. So,
|
||||
// for example, more often than code 'allows-in' (or doesn't 'disallow-in'). We opt for
|
||||
// 'disallow-in' set to 'false'. Otherwise, if we had 'allowsIn' set to 'true', then almost
|
||||
// all nodes would need extra state on them to store this info.
|
||||
var strictMode: boolean = false;
|
||||
var disallowIn: boolean = false;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user