Beispiel #1
0
        public bool ValidateRule(CodeKeyword codeKeyword, string scope)
        {
            if (keyword != codeKeyword.keyword.Content || this.scope != scope)
            {
                return(false);
            }

            if (!arguments.Check(codeKeyword.arguments.Count))
            {
                return(false);
            }

            if (needOpenScope)
            {
                if (codeKeyword.scopeContent == null)
                {
                    return(false);
                }
            }

            if (needScopeData)
            {
                if (codeKeyword.scopeContent == null)
                {
                    return(false);
                }

                if (codeKeyword.scopeContent.innerCommands.Count == 0)
                {
                    return(false);
                }
            }

            return(true);
        }