Exemple #1
0
        /// <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

            SqlStringParserBase.CheckTextAndPositionArguments(sql, position);

            #endregion

            if (ParentTag != null && ParentTag.MatchEnd(sql, position) >= 0)
            {
                return(position);
            }

            Type myTag = (Parser as SqlStringParser).IsTag(sql, position);
            if (
                myTag != null &&
                !myTag.IsAssignableFrom(typeof(StringLiteralTag)) &&
                !myTag.IsAssignableFrom(typeof(BracesTag))
                )
            {
                return(position);
            }

            return(-1);
        }
Exemple #2
0
 private string GetFullId()
 {
     if (ParentTag != null)
     {
         return(string.Concat(ParentTag.GetFullId(), ".", Identifier));
     }
     else
     {
         return(Identifier.ToString());
     }
 }