447
448
case TokenType.NotEq: {
450
>
451
>
const right = this._value();
452
>
if (this._previous().type === TokenType.QuotedStr) { // same as above with "foo != 'true'"
453
return ContextKeyExpr.notEquals(key, right);
454
}
456
>
case 'true':
457
return ContextKeyExpr.not(key);
459
return ContextKeyExpr.has(key);
461
>
return ContextKeyExpr.notEquals(key, right);
462
>
}
463
>
}
464
// TODO: ContextKeyExpr.smaller(key, right) accepts only `number` as `right` AND during eval of this node, we just eval to `false` if `right` is not a number
465
// consequently, package.json linter should _warn_ the user if they're passing undesired things to ops