Rintaro Ishizaki
b0e1eb518e
[ASTGen] Add getAdvancedLocEnd() function
...
(implemented by Nathan Hawes @nathawes)
Advance \p Loc to the last non-missing token of the specified or, if it
doesn't contain any, the last non-missing token preceding it in the
tree.
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
2035658c57
Merge pull request #27531 from rintaro/syntaxparse-matchingtoken
...
[SyntaxParse] Adjust parseMatchingToken()
2019-10-08 02:52:41 +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
edbf24c5b3
[SyntaxParse] Fix attribute generation in ASTGen
...
For the intermediate lookup table of the parsed decl attributes, use
location the first token of the attributes instead of the start location
of the *parsed* attribute list because some attributes can be ignored
during the parsing.
rdar://problem/55952739
2019-10-03 12:57:53 -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
972670436f
[ASTGen] Remove unused cache for types
2019-10-01 15:41:40 -07:00
Rintaro Ishizaki
0264687b39
[SyntaxParse] Code styling
2019-10-01 15:41:40 -07:00
Rintaro Ishizaki
de0f000eba
[SyntaxParse] Dump leaking node in assertion
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
swift-ci
ffa8fbda35
Merge remote-tracking branch 'origin/master' into master-rebranch
2019-09-28 00:04:13 -07:00
Rintaro Ishizaki
aa65455f49
[SyntaxParse] Release created token in LibSyntaxGenerator::createToken()
...
This used to cause memory leaks.
rdar://problem/55712090
2019-09-27 23:52:39 -07:00
Rintaro Ishizaki
9eb4c216ee
Revert "Revert "[SyntaxParse] Parse associatedtype decl""
...
This reverts commit 859f90afc1 .
2019-09-27 23:52:39 -07:00
Nathan Hawes
f1a21348d2
[Parse] Assert that the children of syntax tree nodes have contiguous source ranges
...
This should help us catch syntax tree round-tripping issues.
2019-09-27 16:02:27 -07:00
swift-ci
f809a8790c
Merge remote-tracking branch 'origin/master' into master-rebranch
2019-09-26 09:25:07 -07:00
Jordan Rose
8ff1dac381
[AST] Break some header dependencies for faster rebuilds ( #27374 )
...
DiagnosticEngine.h no longer depends on Attr.h.
Expr.h no longer depends on TypeRepr.h.
No functionality change.
2019-09-26 09:17:10 -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
Rintaro Ishizaki
1a9b6d0dbf
[SyntaxParse] Introduce CodeCompletionTypeSyntax
...
To represent a type with code completion.
type? '.'? <code-completion-token>
This is "parser only" node which is not exposed to SwiftSyntax.
Using this, defer to set the parsed type to code-completion callbacks.
2019-09-24 10:21:38 -07:00
swift-ci
9d28343c96
Merge remote-tracking branch 'origin/master' into master-rebranch
2019-09-23 11:04:16 -07:00
Rintaro Ishizaki
8555d1b84a
Merge pull request #27286 from nathawes/r55280477-tuple-type-syntax-round-trip
...
[parser] Fix invalid tuple type round-tripping issue
2019-09-23 19:57:09 +02:00
Rintaro Ishizaki
fde58a9e15
[ASTGen] Adjust geneate() function signatures
...
'generate()' receives `const` reference to `SomeSyntax`. This should
prevent unnecessary reference counter operations.
2019-09-20 23:14:59 -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
swift-ci
40b3bd0899
Merge remote-tracking branch 'origin/master' into master-rebranch
2019-09-18 22:43:11 -07:00
Rintaro Ishizaki
b09f87594a
Merge pull request #27230 from rintaro/syntaxparsse-rdar55421369
...
[SyntaxParse] Re-apply move-only ParsedRawSyntaxNode
2019-09-19 07:36:14 +02:00
swift-ci
c8df9251de
Merge remote-tracking branch 'origin/master' into master-rebranch
2019-09-18 11:04:08 -07:00
Nathan Hawes
4dac0d1e8b
Merge pull request #27218 from nathawes/r53958454-getFixedTypeRecursive-code-completion-crash
...
[code-completion] Remove special handling for completion on the RHS of an assignment
2019-09-18 10:49:38 -07:00
Rintaro Ishizaki
4527711c52
[SyntaxParses] Address memory issue in popTokenSyntax()
...
Don't return reference for local temporary object
rdar://problem/55421369
2019-09-17 22:24:17 -07:00
Nathan Hawes
54defbc7f7
[code-completion] Remove special handling for completion on the RHS of an assignment
...
This simplifies the code and prevents an assertion failure this code was
hitting computing the type relations between the result types and what it
determined as the expected type.
Resolves rdar://problem/53958454
2019-09-17 18:59:33 -07:00
Rintaro Ishizaki
9f642f0bc1
Revert "Merge pull request #27203 from CodaFi/movin-on-up"
...
This reverts commit 387d2a9aee , reversing
changes made to bf1ab6c29d .
2019-09-17 16:42:44 -07:00
swift-ci
089c3adf33
Merge remote-tracking branch 'origin/master' into master-rebranch
2019-09-16 15:43:57 -07:00
Robert Widmann
d8aaf29617
Revert "Merge pull request #27132 from rintaro/syntaxparse-parsedrawsyntax-moveonly"
...
This reverts commit e675c4947d , reversing
changes made to 73315ba01e .
2019-09-16 15:10:33 -07:00
Robert Widmann
6dc63e21e9
Revert "Merge pull request #27190 from compnerd/27132"
...
This reverts commit 4838791937 , reversing
changes made to 4c3f044a46 .
2019-09-16 15:08:46 -07:00
swift-ci
b57a304fd9
Merge remote-tracking branch 'origin/master' into master-rebranch
2019-09-14 08:44:12 -07:00
Saleem Abdulrasool
15dc24ee2d
Parse: repair build after #27132
...
The type deduction here will copy the returned ParsedTypeSyntax which
is no longer copy constructible. Use a reference to hold the result
instead which should fix the build on Windows. The returned value of
the `popToken` returns a `ParsedTokenSyntax` which is no longer copy
constructible. Explicitly move the value.
2019-09-13 22:29:25 -07:00