示例#1
0
        public DocumentRange GetDollarSignRange()
        {
            var literal = Literals.FirstOrDefault();

            if (literal == null)
            {
                return(DocumentRange.InvalidRange);
            }

            var startOffset = literal.GetDocumentStartOffset();

            var text = literal.GetText();

            return(text[0] == '$'
        ? startOffset.ExtendRight(+1)
        : startOffset.Shift(+1).ExtendRight(+1));
        }