Alsing.Text.TokenTree.AddPatternWithoutPrefix C# (CSharp) Method

AddPatternWithoutPrefix() private method

private AddPatternWithoutPrefix ( IPatternMatcher matcher, bool caseSensitive, bool needSeparators, object tags ) : void
matcher IPatternMatcher
caseSensitive bool
needSeparators bool
tags object
return void
        private void AddPatternWithoutPrefix(IPatternMatcher matcher, bool caseSensitive, bool needSeparators,
                                                object[] tags)
        {
            if (matcher.DefaultPrefixes != null)
            {
                foreach (string defaultPrefix in matcher.DefaultPrefixes)
                {
                    AddPattern(defaultPrefix, matcher, caseSensitive, needSeparators, tags);
                }
            }
            else
            {
                var patternMatcherReference = new PatternMatchReference(matcher)
                {
                    Tags = tags,
                    NextSibling = root.FirstExpression,
                    NeedSeparators = needSeparators
                };

                root.FirstExpression = patternMatcherReference;
            }
        }
    }