Update comment

This commit is contained in:
Cyrus Najmabadi 2014-11-11 15:50:24 -08:00
parent e5b997c530
commit ecfc60ff16

View File

@ -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;