public compileAG()

in src/rule.ts [370:400]


	public compileAG(onigLib: IOnigLib, allowA: boolean, allowG: boolean): CompiledRule {
		if (!this._hasAnchors) {
			return this.compile(onigLib);
		} else {
			if (allowA) {
				if (allowG) {
					if (!this._anchorCache.A1_G1) {
						this._anchorCache.A1_G1 = this._resolveAnchors(onigLib, allowA, allowG);
					}
					return this._anchorCache.A1_G1;
				} else {
					if (!this._anchorCache.A1_G0) {
						this._anchorCache.A1_G0 = this._resolveAnchors(onigLib, allowA, allowG);
					}
					return this._anchorCache.A1_G0;
				}
			} else {
				if (allowG) {
					if (!this._anchorCache.A0_G1) {
						this._anchorCache.A0_G1 = this._resolveAnchors(onigLib, allowA, allowG);
					}
					return this._anchorCache.A0_G1;
				} else {
					if (!this._anchorCache.A0_G0) {
						this._anchorCache.A0_G0 = this._resolveAnchors(onigLib, allowA, allowG);
					}
					return this._anchorCache.A0_G0;
				}
			}
		}
	}