Пример #1
0
        /** Get the arg, return value, or predefined property for this rule */
        public virtual AttributeScope GetLocalAttributeScope(string name)
        {
            AttributeScope scope = null;

            if (ReturnScope != null && ReturnScope.GetAttribute(name) != null)
            {
                scope = ReturnScope;
            }
            else if (ParameterScope != null && ParameterScope.GetAttribute(name) != null)
            {
                scope = ParameterScope;
            }
            else
            {
                AttributeScope rulePropertiesScope =
                    RuleLabelScope.grammarTypeToRulePropertiesScope[(int)Grammar.type];
                if (rulePropertiesScope.GetAttribute(name) != null)
                {
                    scope = rulePropertiesScope;
                }
            }
            return(scope);
        }