Commit Graph

1137 Commits

Author SHA1 Message Date
Rintaro Ishizaki
6a9b2522a7 [SyntaxParse] Parse unresolved member expression syntax 2019-10-10 13:29:42 -07:00
Rintaro Ishizaki
f50966fcc1 [SyntaxParse] Parse ObjectLiteralExpr syntax 2019-10-10 13:22:57 -07:00
Rintaro Ishizaki
bb08667bf5 [SyntaxParse] Parse tuple/paren expression syntax 2019-10-09 14:48:47 -07:00
Rintaro Ishizaki
1de6819e34 [SyntaxParse] Parse Array/Dictionary literal syntax 2019-10-08 23:11:08 -07:00
Rintaro Ishizaki
242f9a7273 [SyntaxParse] parseExpressionSyntax()
(Implemented by Nathan Hawes @nathawes)
2019-10-08 23:11:08 -07:00
Rintaro Ishizaki
0d4cf76ed0 [SyntaxParse] Renew parseListSyntax()
Optimize for libSyntax parsing.
The new 'parseListSyntax()' receives a vector storage, passes element
builder to the callback for populating the elements, then automatically
parses trailing commas. Also, it performs automatic recovery if the
element has an error (e.g. Skip until ',' or ')').
2019-10-08 23:11:08 -07:00
Rintaro Ishizaki
43df5a240e [SyntaxParse] Parse SuperRefExpr syntax 2019-10-08 22:15:02 -07:00
Rintaro Ishizaki
dfe962f19a Merge pull request #27508 from rintaro/syntaxparse-expridentifier
[SyntaxParse] Parse IdentifierExpr syntax
2019-10-08 19:17:46 +02:00
Rintaro Ishizaki
9f26b5615f [SyntaxParse] Remove unused overload of parseMatchingTokenSyntax() 2019-10-03 14:52:55 -07:00
Rintaro Ishizaki
c022ff23e8 [SyntaxParse] Adjust parseMatchingToken() 2019-10-03 13:48:57 -07:00
Rintaro Ishizaki
597538ca18 [SyntaxParse] Parse IdentifierExpr syntax
Along with UnqualifiedDeclName (e.g. 'foo(x:y:)').
2019-10-02 17:06:51 -07:00
Rintaro Ishizaki
5914325a02 [SyntaxParse] Parse typealias declaration 2019-10-02 14:24:33 -07:00
Rintaro Ishizaki
a4fcd26b38 Merge pull request #27466 from rintaro/syntaxparse-type
[SyntaxParse] Finish type parsing
2019-10-02 08:05:33 +02:00
Rintaro Ishizaki
0264687b39 [SyntaxParse] Code styling 2019-10-01 15:41:40 -07:00
Rintaro Ishizaki
7b31d2b4fb [SyntaxParse] Finish type parsing
- Type attributes
- SIL types
2019-10-01 15:40:10 -07:00
Mishal Shah
2f86d67500 Merge pull request #27396 from shahmishal/master-rebranch
Update master to support apple/stable/20190619 branch for LLVM projects
2019-10-01 10:50:49 -07:00
Rintaro Ishizaki
9eb4c216ee Revert "Revert "[SyntaxParse] Parse associatedtype decl""
This reverts commit 859f90afc1.
2019-09-27 23:52:39 -07:00
swift-ci
004e02b84a Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-25 11:44:15 -07:00
Rintaro Ishizaki
859f90afc1 Revert "[SyntaxParse] Parse associatedtype decl" 2019-09-25 11:00:21 -07:00
Brent Royal-Gordon
97febd42a9 Merge branch 'master' into master-rebranch
# Conflicts:
#	lib/TBDGen/TBDGen.cpp
2019-09-24 18:52:04 -07:00
Rintaro Ishizaki
fc8a2e6f86 [SyntaxParse] Parse associatedtype decl
Along with inheritance clause.
2019-09-24 12:03:06 -07:00
swift-ci
9d28343c96 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-23 11:04:16 -07:00
Nathan Hawes
e89efa8f81 [parser] Fix tuple type round-tripping issue
`public init(a: (b || c))` became `public init(a: )(b || c)` after
round-tripping.

Resolves rdar://problem/55280477
2019-09-20 19:04:41 -07:00
swift-ci
aa2d5e6ea2 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-20 18:03:40 -07:00
Rintaro Ishizaki
0569cbfb28 Revert "Revert "[SyntaxParse] Parse generic parameter clause and generic where clause""
This reverts commit 1584e87aa7.
2019-09-20 15:26:04 -07:00
swift-ci
6094316b33 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-20 15:23:01 -07:00
Rintaro Ishizaki
1584e87aa7 Revert "[SyntaxParse] Parse generic parameter clause and generic where clause" 2019-09-20 14:02:53 -07:00
swift-ci
abbed9c41b Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-20 11:03:39 -07:00
Rintaro Ishizaki
f919b2ddd8 [SyntaxParse] Parse generic parameter clause and generic where clause 2019-09-19 23:09:58 -07:00
Brent Royal-Gordon
8734092923 Merge branch 'master' into master-rebranch
# Conflicts:
#	lib/IRGen/GenExistential.cpp
2019-09-11 20:12:03 -07:00
Rintaro Ishizaki
c13f68881a [SyntaxParse] Simplify syntax parsing result facilities
- Utilize ignoreToken() to skip tokens while keeping them in syntax tree
- SyntaxParsedResult now holds ParsedRawSyntaxNode and ParserStatus
- Simplify migration support for 'TypeName[]' type
- Use builder for generic argument clause parsing
2019-09-10 10:29:02 -07:00
Rintaro Ishizaki
a9af910664 [SyntaxParse] Add ignoreToken() function to ignore tokens 2019-09-10 10:29:02 -07:00
swift-ci
927fc3f39e Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-06 20:03:38 -07:00
Robert Widmann
23969e9555 Clean up the way Parse deals with GenericParamList
- The parser no longer mutates these in place
- Pass generic param lists off to constructors that will readily take them
2019-09-06 17:20:28 -07:00
swift-ci
0b7772d32b Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-05 15:03:10 -07:00
Rintaro Ishizaki
dba6514092 [SyntaxParse] Set token kind as 'identifier' in consumeIdentifierSyntax
rdar://problem/55075237
2019-09-05 11:51:51 -07:00
swift-ci
0e4feadfbc Merge remote-tracking branch 'origin/master' into master-rebranch 2019-09-03 10:23:48 -07:00
Doug Gregor
d7f6768a9d Eliminate DelayedParsingCallbacks.
DelayedParsingCallbacks only had one implementation, for code
completion, which is only used to determine which bodies to skip and
which to delay. Inline that logic into the parser's delay logic and
remove DelayedParsingCallbacks entirely.
2019-09-02 19:03:07 -07:00
swift-ci
0591c81677 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-31 19:24:16 -07:00
Doug Gregor
d8b745db77 Add a request to lazily parse function bodies.
Rework the lazy function body parsing mechanism to use the
request-evaluator, so that asking for the body of a function will
initiate parsing. Clean up a number of callers to
AbstractFunctionDecl::getBody() that don't actually need the body, so
we don't perform unnecessary parsing.

This change does not delay parsing of function bodies in the general
case; rather, it sets up the infrastructure to always delay parsing of
function bodies.
2019-08-31 16:23:08 -07:00
swift-ci
a9cb82e5e5 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-31 03:44:11 -07:00
eeckstein
903eeb220b Revert "Add a request to lazily parse function bodies." 2019-08-31 12:29:01 +02:00
swift-ci
0449301870 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-30 22:04:20 -07:00
Doug Gregor
2ab05a6835 Add a request to lazily parse function bodies.
Rework the lazy function body parsing mechanism to use the
request-evaluator, so that asking for the body of a function will
initiate parsing. Clean up a number of callers to
AbstractFunctionDecl::getBody() that don't actually need the body, so
we don't perform unnecessary parsing.

This change does not delay parsing of function bodies in the general
case; rather, it sets up the infrastructure to always delay parsing of
function bodies.
2019-08-30 16:48:23 -07:00
swift-ci
8f203f3930 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-30 14:44:12 -07:00
Doug Gregor
11969847c4 Simplify lazy parsing of nominal and extension members.
Lazy parsing for the members of nominal types and extensions depends
only on information already present in
`IterableDeclContext`. Eliminate the use of PersistentParserState as
an intermediary and have the member-parsing request construct a new
`Parser` instance itself to handle parsing. Make this possible even
for ill-formed nominal types/extensions to simplify the code path.

Eliminate `LazyMemberParser` and all of its uses, because it was only
present for lazy member parsing, which no longer needs it.
2019-08-30 08:29:43 -07:00
swift-ci
86bdfeb467 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-29 14:04:23 -07:00
Doug Gregor
9dd5a3cdd6 [Parser] Make delayed member parsing not depend on "persistent parser" state.
The `DelayedDeclKind` structure that's allocated for each case where
we delay parsing the members of a nominal type definition or extension
contains information that is already available on the
`IterableDeclContext` (or can be reconstructed trivially from it). Use
that AST information rather than this side structure.
2019-08-29 11:05:25 -07:00
Doug Gregor
d8f7c9e72c [Parser] Introduce a request for parsing type and extension members.
Ensure that lazy parsing of the members of nominal type definitions
and extensions is handled through a request. Most of the effort here
is in establishing a new request zone for parser requests.
2019-08-28 21:39:56 -07:00
swift-ci
892b430a79 Merge remote-tracking branch 'origin/master' into master-rebranch 2019-08-28 10:24:36 -07:00