コード例 #1
0
        /// <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();
        }
コード例 #2
0
 /// <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>();
 }
コード例 #3
0
 public void Reset()
 {
     ReferenceRangeBuilder = null;
     ReferenceBuilder      = null;
     References            = null;
 }