bool IsSpaceCharacterBeforeExpression(string text, ExpressionRange range)
        {
            int characterBeforeExpressionOffset = range.Start - 1;

            if (characterBeforeExpressionOffset >= 0)
            {
                return(text[characterBeforeExpressionOffset] == ' ');
            }
            return(false);
        }
 /// <summary>
 /// Gets the substring starting from the specified index and
 /// finishing at the specified end index. The character at the
 /// end index is included in the string.
 /// </summary>
 string Substring(string text, ExpressionRange range)
 {
     return(text.Substring(range.Start, range.Length));
 }
        ExpressionResult CreateExpressionResult(string text, ExpressionRange range, ExpressionContext context)
        {
            string expression = Substring(text, range);

            return(new ExpressionResult(expression, context));
        }
 ExpressionResult CreateDefaultExpressionResult(string text, ExpressionRange range)
 {
     return(CreateExpressionResult(text, range, ExpressionContext.Default));
 }
 ExpressionResult CreatePythonImportExpressionResult(string text, ExpressionRange range)
 {
     return(CreateExpressionResult(text, range, new PythonImportExpressionContext()));
 }
		/// <summary>
		/// Gets the substring starting from the specified index and
		/// finishing at the specified end index. The character at the
		/// end index is included in the string.
		/// </summary>
		string Substring(string text, ExpressionRange range)
		{
			return text.Substring(range.Start, range.Length);
		}
		ExpressionResult CreateExpressionResult(string text, ExpressionRange range, ExpressionContext context)
		{
			string expression = Substring(text, range);
			return new ExpressionResult(expression, context);
		}
		ExpressionResult CreateDefaultExpressionResult(string text, ExpressionRange range)
		{
			return CreateExpressionResult(text, range, ExpressionContext.Default);
		}
		ExpressionResult CreatePythonImportExpressionResult(string text, ExpressionRange range)
		{
			return CreateExpressionResult(text, range, new PythonImportExpressionContext());
		}
		bool IsSpaceCharacterBeforeExpression(string text, ExpressionRange range)
		{
			int characterBeforeExpressionOffset = range.Start - 1;
			if (characterBeforeExpressionOffset >= 0) {
				return text[characterBeforeExpressionOffset] == ' ';
			}
			return false;
		}