src/vs/platform/contextkey/common/contextkey.ts/ContextKeyOrExpr/negate
class ContextKeyOrExpr:	public negate(): ContextKeyExpression {
		if (!this.negated) {
			const result: ContextKeyExpression[] = [];
			for (const expr of this.expr) {
				result.push(expr.negate());
			}

			// We don't support parens, so here we distribute the AND over the OR terminals
			// We always take the first 2 AND pairs and distribute them
			while (result.length > 1) {
				const LEFT = result.shift()!;
				const RIGHT = result.shift()!;

				const all: ContextKeyExpression[] = [];
				for (const left of getTerminals(LEFT)) {
					for (const right of getTerminals(RIGHT)) {
						all.push(ContextKeyAndExpr.create([left, right], null)!);
					}
				}

				const isFinished = (result.length === 0);
				result.unshift(ContextKeyOrExpr.create(all, null, isFinished)!);
			}

			this.negated = result[0];
		}
		return this.negated;
	}