mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Make the REPL allow mutually recursive functions spread across multiple lines, like we do in script mode.
Swift SVN r1453
This commit is contained in:
@@ -54,7 +54,8 @@ bool swift::parseIntoTranslationUnit(TranslationUnit *TU,
|
||||
if (BufferOffset)
|
||||
*BufferOffset = P.Tok.getLoc().Value.getPointer() -
|
||||
P.Buffer->getBuffer().begin();
|
||||
return P.Tok.is(tok::eof);
|
||||
|
||||
return P.FoundSideEffects;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -89,7 +90,8 @@ Parser::Parser(unsigned BufferID, swift::Component *Comp, ASTContext &Context,
|
||||
Component(Comp),
|
||||
Context(Context),
|
||||
ScopeInfo(*this),
|
||||
IsMainModule(IsMainModule) {
|
||||
IsMainModule(IsMainModule),
|
||||
FoundSideEffects(false) {
|
||||
}
|
||||
|
||||
Parser::~Parser() {
|
||||
|
||||
Reference in New Issue
Block a user