private static IList<ExpressionAst> ParseExpandableString(IScriptExtent extent, string value)
 {
     var parser = new ExpandableStringParser(extent, value);
     parser.Parse();
     return parser.NestedExpressions;
 }
 private void ParseExpandableString(string value)
 {
     var parser = new ExpandableStringParser(Extent, value);
     parser.Parse();
     this.NestedExpressions = parser.NestedExpressions;
 }
        private void ParseExpandableString(string value)
        {
            var parser = new ExpandableStringParser(Extent, value);
            parser.Parse();
            this.NestedExpressions = parser.NestedExpressions;

            int currentIndex = 0;
            foreach (var nestedEx in NestedExpressions)
            {
                int nestedExpressionStartIndex = GetRelativeStartIndex(nestedEx);
                var strval = value.Substring(currentIndex, nestedExpressionStartIndex - currentIndex);
                if (strval.Length > 0)
                {
                    _stringParts.Add(StringExpressionHelper.ResolveEscapeCharacters(strval, StringConstantType));
                }
                _stringParts.Add(nestedEx);
                currentIndex = GetRelativeEndIndex(nestedEx);
            }
            if (currentIndex < value.Length)
            {
                _stringParts.Add(StringExpressionHelper.ResolveEscapeCharacters(value.Substring(currentIndex),
                                                                                StringConstantType));
            }
        }