Example #1
0
 internal MSAst.Expression /*!*/ AddDebugInfoAndVoid(MSAst.Expression /*!*/ expression, SourceSpan location)
 {
     if (expression.Type != typeof(void))
     {
         expression = AstUtils.Void(expression);
     }
     return(AddDebugInfo(expression, location));
 }
Example #2
0
        internal static MSAst.Expression TransformMaybeSingleLineSuite(Statement body, SourceLocation prevStart)
        {
            if (body.GlobalParent.IndexToLocation(body.StartIndex).Line != prevStart.Line)
            {
                return(body);
            }

            MSAst.Expression res = body.Reduce();

            res = RemoveDebugInfo(prevStart.Line, res);

            if (res.Type != typeof(void))
            {
                res = AstUtils.Void(res);
            }

            return(res);
        }