コード例 #1
0
            Expression wrapInDebugInfo(DebugExpression expr, bool includeDebugInfo)
            {
                var location = expr.Location;
                if (!_includeDebugInfo || !includeDebugInfo || location == HappySourceLocation.None || location == HappySourceLocation.Invalid)
                    return expr.Expression;

                return Expression.Block(
                    Expression.DebugInfo(
                        Expression.SymbolDocument(location.Unit.Path),
                        location.Span.Start.Line,
                        location.Span.Start.Column,
                        location.Span.End.Line,
                        location.Span.End.Column),
                    expr.Expression
                    );
            }
コード例 #2
0
        ///--------------------------------------------------------------------------------
        /// <summary>This method determines whether or not any metadata is
        /// different between the input instance and the current instance.</summary>
        ///
        /// <param name="inputDebugItem">The debugitem to compare metadata.</param>
        ///--------------------------------------------------------------------------------
        public bool IsIdenticalMetadata(DebugItem inputDebugItem)
        {
            if (DebugExpression.GetString() != inputDebugItem.DebugExpression.GetString())
            {
                return(false);
            }
            if (DebugValue.GetString() != inputDebugItem.DebugValue.GetString())
            {
                return(false);
            }

            #region protected
            #endregion protected

            return(true);
        }