Antlr4.Semantics.SymbolChecks.CheckLocalConflictingDeclarations C# (CSharp) Method

CheckLocalConflictingDeclarations() protected method

protected CheckLocalConflictingDeclarations ( [ r, [ attributes, [ referenceAttributes, [ errorType ) : void
r [
attributes [
referenceAttributes [
errorType [
return void
        protected virtual void CheckLocalConflictingDeclarations([NotNull] Rule r, [Nullable] AttributeDict attributes, [Nullable] AttributeDict referenceAttributes, [NotNull] ErrorType errorType)
        {
            if (attributes == null || referenceAttributes == null)
            {
                return;
            }

            ISet<string> conflictingKeys = attributes.Intersection(referenceAttributes);
            foreach (string key in conflictingKeys)
            {
                errMgr.GrammarError(
                    errorType,
                    g.fileName,
                    attributes.Get(key).token != null ? attributes.Get(key).token : ((GrammarAST)r.ast.GetChild(0)).Token,
                    key,
                    r.name);
            }
        }