Patcher.Rules.RuleCompiler.CheckIllegalTokens C# (CSharp) 메소드

CheckIllegalTokens() 개인적인 메소드

private CheckIllegalTokens ( string code ) : void
code string
리턴 void
        private void CheckIllegalTokens(string code)
        {
            // Strip and compact code
            string stripped = StripBlanks(StripStrings(StripComments(code)));

            foreach (var token in IllegalCodeTokens)
            {
                if (stripped.Contains(token))
                {
                    throw new IllegalTokenException(string.Format("Illegal token '{0}' found in rule code" , token));
                }
            }
        }