Exemple #1
0
        public void SetReseveredWordsToUpperCase()
        {
            Regex        regex  = new Regex(@"\w+|[^A-Za-z0-9_ \f\t\v]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
            SyntaxReader reader = new SyntaxReader();

            for (Match match = regex.Match(this.Text); match.Success; match = match.NextMatch())
            {
                if (reader.IsReservedWord(match.Value.ToUpper()))
                {
                    base.Document.Replace(match.Index, match.Length, match.Value.ToUpper());
                }
            }
        }
 public void SetReseveredWordsToUpperCase()
 {
     Regex regex = new Regex(@"\w+|[^A-Za-z0-9_ \f\t\v]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
     SyntaxReader reader = new SyntaxReader();
     for (Match match = regex.Match(this.Text); match.Success; match = match.NextMatch())
     {
     if (reader.IsReservedWord(match.Value.ToUpper()))
     {
         base.Document.Replace(match.Index, match.Length, match.Value.ToUpper());
     }
     }
 }