public string ReplaceAll([NotNull] ParserRuleContext context) { GetReplacements(context); var newSource = source; while (Replacements.Count > 0) { var replacement = Replacements.Pop(); newSource = replacement.Replace(newSource); } return(newSource); }
public string ReplaceRemaining([NotNull] ParserRuleContext context) { justCompoundStatements = false; GetReplacements(context); var newSource = source; while (Replacements.Count > 0) { var replacement = Replacements.Pop(); newSource = replacement.Replace(newSource); } return(newSource); }