Example #1
0
        private void RecalculateRights(TomlTable table, ParseContext parseCtx)
        {
            rules = Array.Empty <RightsRule>();

            rootRule = new RightsRule();
            if (!rootRule.ParseChilden(table, parseCtx))
            {
                return;
            }

            parseCtx.SplitDeclarations();

            if (!ValidateUniqueGroupNames(parseCtx))
            {
                return;
            }

            if (!ResolveIncludes(parseCtx))
            {
                return;
            }

            if (!CheckCyclicGroupDependencies(parseCtx))
            {
                return;
            }

            BuildLevel(rootRule);

            LintDeclarations(parseCtx);

            if (!NormalizeRule(parseCtx))
            {
                return;
            }

            FlattenGroups(parseCtx);

            FlattenRules(rootRule);

            rules = parseCtx.Rules;
        }
Example #2
0
        private static void RecalculateRights(TomlTable table, ParseContext parseCtx)
        {
            var localRules = Array.Empty <RightsRule>();

            if (!parseCtx.RootRule.ParseChilden(table, parseCtx))
            {
                return;
            }

            parseCtx.SplitDeclarations();

            if (!ValidateUniqueGroupNames(parseCtx))
            {
                return;
            }

            if (!ResolveIncludes(parseCtx))
            {
                return;
            }

            if (!CheckCyclicGroupDependencies(parseCtx))
            {
                return;
            }

            BuildLevel(parseCtx.RootRule);

            LintDeclarations(parseCtx);

            if (!NormalizeRule(parseCtx))
            {
                return;
            }

            FlattenGroups(parseCtx);

            FlattenRules(parseCtx.RootRule);

            CheckRequiredCalls(parseCtx);
        }
Example #3
0
        private void RecalculateRights(TomlTable table, ParseContext parseCtx)
        {
            Rules = new RightsRule[0];

            RootRule = new RightsRule();
            if (!RootRule.ParseChilden(table, parseCtx))
            {
                return;
            }

            parseCtx.SplitDeclarations();

            if (!ValidateUniqueGroupNames(parseCtx))
            {
                return;
            }

            if (!ResolveIncludes(parseCtx))
            {
                return;
            }

            if (!CheckCyclicGroupDependencies(parseCtx))
            {
                return;
            }

            BuildLevel(RootRule);

            LintDeclarations(parseCtx);

            SanitizeRules(parseCtx);

            FlattenGroups(parseCtx);

            FlattenRules(RootRule);

            Rules = parseCtx.Rules;
        }