| 906 | } |
| 907 | |
| 908 | export class ContextKeyNotRegexExpr implements IContextKeyExpression { |
| 909 | |
| 910 | public static create(actual: ContextKeyRegexExpr): ContextKeyExpression { |
| 911 | return new ContextKeyNotRegexExpr(actual); |
| 912 | } |
| 913 | |
| 914 | public readonly type = ContextKeyExprType.NotRegex; |
| 915 | |
| 916 | private constructor(private readonly _actual: ContextKeyRegexExpr) { |
| 917 | // |
| 918 | } |
| 919 | |
| 920 | public cmp(other: ContextKeyExpression): number { |
| 921 | if (other.type !== this.type) { |
| 922 | return this.type - other.type; |
| 923 | } |
| 924 | return this._actual.cmp(other._actual); |
| 925 | } |
| 926 | |
| 927 | public equals(other: ContextKeyExpression): boolean { |
| 928 | if (other.type === this.type) { |
| 929 | return this._actual.equals(other._actual); |
| 930 | } |
| 931 | return false; |
| 932 | } |
| 933 | |
| 934 | public evaluate(context: IContext): boolean { |
| 935 | return !this._actual.evaluate(context); |
| 936 | } |
| 937 | |
| 938 | public serialize(): string { |
| 939 | throw new Error('Method not implemented.'); |
| 940 | } |
| 941 | |
| 942 | public keys(): string[] { |
| 943 | return this._actual.keys(); |
| 944 | } |
| 945 | |
| 946 | public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression { |
| 947 | return new ContextKeyNotRegexExpr(this._actual.map(mapFnc)); |
| 948 | } |
| 949 | |
| 950 | public negate(): ContextKeyExpression { |
| 951 | return this._actual; |
| 952 | } |
| 953 | } |
| 954 | |
| 955 | export class ContextKeyAndExpr implements IContextKeyExpression { |
| 956 |
nothing calls this directly
no outgoing calls
no test coverage detected