/// <summary> /// Exit a parse tree produced by <see cref="BibleReferenceParser.reference"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public override void ExitReference([NotNull] BibleReferenceParser.Grammar.Generated.BibleReferenceParser.ReferenceContext context) { var reference = ReferenceBuilder.Build(); ReferenceRangeBuilder.AddReference(reference); var referenceRange = ReferenceRangeBuilder.Build(); References.Add(referenceRange); ReferenceRangeBuilder = new BibleReferenceRangeBuilder(); }
/// <summary> /// Enter a parse tree produced by <see cref="BibleReferenceParser.reference"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public override void EnterReference([NotNull] BibleReferenceParser.Grammar.Generated.BibleReferenceParser.ReferenceContext context) { ReferenceRangeBuilder = new BibleReferenceRangeBuilder(); ReferenceBuilder = new BibleReferenceBuilder(); References = new List <BibleReferenceRange>(); }
public void Reset() { ReferenceRangeBuilder = null; ReferenceBuilder = null; References = null; }