예제 #1
0
        private bool TryConcatMatch(Token token, object value, FileLocation location)
        {
            if (token.Concatenate == false)
            {
                return(false);
            }

            if (Matches.Any(m => m.Token.Name == token.Name) == false)
            {
                return(false);
            }

            var match = Matches.First(m => m.Token.Name == token.Name);

            if (token.CanConcatenate(match.Value, value) == false)
            {
                return(false);
            }

            match.Value = token.ConcatenateValues(match.Value, value, token.ConcatenationString);

            return(true);
        }