public void GetContent() { var parseInfo = _parseInfo .SetReturnType(ReturnType) .SetThisType(ContainingType) .SetCallInfo(CallInfo); if (Context.Block != null) { var returnTracker = new ReturnTracker(); Block = new BlockAction(parseInfo.SetReturnTracker(returnTracker), _methodScope, Context.Block); MultiplePaths = returnTracker.IsMultiplePaths; // If there is only one return statement, set SingleReturnValue. if (returnTracker.Returns.Count == 1) { SingleReturnValue = returnTracker.Returns[0].ReturningValue; } } else if (Context.MacroValue != null) { MacroValue = SingleReturnValue = parseInfo.SetExpectType(ReturnType).GetExpression(_methodScope, Context.MacroValue); SemanticsHelper.ExpectValueType(parseInfo, MacroValue, ReturnType, Context.MacroValue.Range); } ContentReady.Set(); }
public ParseInfo SetReturnTracker(ReturnTracker returnTracker) => new ParseInfo(this) { ReturnTracker = returnTracker };