コード例 #1
0
    public override void ExitField(CSVParser.FieldContext context)
    {
        var content = context.GetText();

        if (_isHeader)
        {
            Header.Add(content);
        }
        else
        {
            var col = Records.Last().Count;
            Records.Last().Add(Header[col], content);
        }
    }
コード例 #2
0
 /// <summary>
 /// Enter a parse tree produced by <see cref="CSVParser.field"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void EnterField([NotNull] CSVParser.FieldContext context)
 {
 }