internal override MSA.Expression/*!*/ TransformRead(AstGenerator/*!*/ gen) {
switch (_index) {
case MatchData:
return Methods.GetCurrentMatchData.OpCall(gen.CurrentScopeVariable);
case MatchLastGroup:
return Methods.GetCurrentMatchLastGroup.OpCall(gen.CurrentScopeVariable);
case PreMatch:
return Methods.GetCurrentPreMatch.OpCall(gen.CurrentScopeVariable);
case PostMatch:
return Methods.GetCurrentPostMatch.OpCall(gen.CurrentScopeVariable);
default:
return Methods.GetCurrentMatchGroup.OpCall(gen.CurrentScopeVariable, AstUtils.Constant(_index));
}
}