예제 #1
0
        private PathToken GetPropPathOrMath(Chunk chunk, List <string> propChain)
        {
            PathToken pathToken = null;

            if (propChain.Count() == 2 && propChain[0] == "Math")
            {
                pathToken = new MathToken(chunk.Start, chunk.End, propChain[1]);
            }
            else
            {
                pathToken = new PropertyPathToken(chunk.Start, chunk.End, propChain);
            }

            return(pathToken);
        }
        private PathToken GetPropPathOrMath(Chunk chunk, List <string> propChain, string relativeSourceDef)
        {
            PathToken pathToken = null;

            if (propChain.Count() == 2 && propChain[0] == "Math")
            {
                pathToken = new MathToken(chunk.Start, chunk.End, propChain[1]);
            }
            else
            {
                pathToken = new PropertyPathToken(chunk.Start, chunk.End, propChain);
            }
            pathToken.Id.RelativeSourceDef = relativeSourceDef;
            return(pathToken);
        }