/// <summary> /// Add a parse error to the list of parse errors. /// </summary> /// <param name="error">The parse error, which occured.</param> /// <returns>The current parse engine.</returns> internal ParseEngine AddError(YAMPParseError error) { if (errors.Count != 0) { var lerr = errors[errors.Count - 1]; if (lerr.Column == error.Column && lerr.Line == error.Line) { if (ptr < characters.Length - 1) { Advance(); } else { parsing = false; } return(this); } } errors.Add(error); return(this); }
/// <summary> /// Add a parse error to the list of parse errors with the block causing the error. /// </summary> /// <param name="error">The parse error, which occured.</param> /// <param name="part">The part where the error occured.</param> /// <returns>The current parse engine.</returns> internal ParseEngine AddError(YAMPParseError error, Block part) { error.Part = part; return(AddError(error)); }