/// <summary>
/// Returns a value indicating whether there is the tag ending at the specified position.
/// </summary>
/// <returns>
/// If this value is less than zero, then there is no ending; otherwise the
/// position after ending is returned.
/// </returns>
public override int MatchEnd(string sql, int position)
{
CheckInitialized();
#region Check the arguments
ParserBase.CheckTextAndPositionArguments(sql, position);
#endregion
if (ParentTag != null && ParentTag.MatchEnd(sql, position) >= 0)
{
return(position);
}
Type myTag = (Parser as SqlParser).IsTag(sql, position);
if (
myTag != null &&
!myTag.IsAssignableFrom(typeof(StringLiteralTag)) &&
!myTag.IsAssignableFrom(typeof(BracesTag))
)
{
return(position);
}
return(-1);
}