AddDebugInfo() private method

private AddDebugInfo ( System.Linq.Expressions expression, Microsoft.Scripting.SourceSpan location ) : Expression
expression System.Linq.Expressions
location Microsoft.Scripting.SourceSpan
return System.Linq.Expressions.Expression
Esempio n. 1
0
        /// <summary>
        /// Transform and handle the result according to the specified result operation.
        /// </summary>
        internal virtual MSA.Expression/*!*/ TransformResult(AstGenerator/*!*/ gen, ResultOperation resultOperation) {
            MSA.Expression resultExpression = TransformRead(gen);
            MSA.Expression statement;

            if (resultOperation.Variable != null) {
                statement = Ast.Assign(resultOperation.Variable, Ast.Convert(resultExpression, resultOperation.Variable.Type));
            } else {
                statement = gen.Return(resultExpression);
            }

            return gen.AddDebugInfo(statement, Location);
        }
Esempio n. 2
0
        /// <summary>
        /// Transform and handle the result according to the specified result operation.
        /// </summary>
        internal virtual MSA.Expression /*!*/ TransformResult(AstGenerator /*!*/ gen, ResultOperation resultOperation)
        {
            MSA.Expression resultExpression = TransformRead(gen);
            MSA.Expression statement;

            if (resultOperation.Variable != null)
            {
                statement = Ast.Assign(resultOperation.Variable, Ast.Convert(resultExpression, resultOperation.Variable.Type));
            }
            else
            {
                statement = gen.Return(resultExpression);
            }

            return(gen.AddDebugInfo(statement, Location));
        }
Esempio n. 3
0
 /// <summary>
 /// Transform as statement (value is not read). Marks sequnce point.
 /// </summary>
 internal virtual MSA.Expression/*!*/ Transform(AstGenerator/*!*/ gen) {
     return gen.AddDebugInfo(TransformRead(gen), Location);
 }
Esempio n. 4
0
 /// <summary>
 /// Transform as expression whose value is read as Boolean and mark a sequence point.
 /// </summary>
 internal MSA.Expression/*!*/ TransformCondition(AstGenerator/*!*/ gen, bool positive) {
     return gen.AddDebugInfo(TransformReadBoolean(gen, positive), Location);
 }	
Esempio n. 5
0
 /// <summary>
 /// Transform as statement (value is not read).
 /// </summary>
 internal virtual MSA.Expression /*!*/ Transform(AstGenerator /*!*/ gen)
 {
     return(gen.AddDebugInfo(TransformRead(gen), Location));
 }
Esempio n. 6
0
 /// <summary>
 /// Transform as expression whose value is read as Boolean and mark a sequence point.
 /// </summary>
 internal MSA.Expression /*!*/ TransformCondition(AstGenerator /*!*/ gen, bool positive)
 {
     return(gen.AddDebugInfo(TransformReadBoolean(gen, positive), Location));
 }