Commit Graph

9 Commits

Author SHA1 Message Date
Xi Ge
02661b3740 SwiftSyntax: Add LabeledSyntax trait. NFC
This commit also adds several "WithTrailingComma" I've missed in the
previous commit.
2018-02-20 16:47:04 -08:00
Xi Ge
bdebd8a210 SwiftSyntax: add WithTrailingCommanSyntax trait and fix inconsistent naming. NFC 2018-02-20 12:02:30 -08:00
Xi Ge
f814309f2e SwiftSyntax: Add ParenthesizedSyntax trait and mark various syntax nodes for conformances. NFC 2018-02-19 19:21:59 -08:00
Rintaro Ishizaki
87ea7bd9d3 [Syntax] Add test case for unresolved matching patterns
Patterns those are parsed as ExpressionPattern at first, then resolved
to actual patterns:

* OptionalPattern -> pattern '?'
* AsTypePattern -> pattern 'as' type
* EnumCasePattern -> type? '.' identifier tuple-pattern
2017-12-20 20:24:34 +09:00
Rintaro Ishizaki
a1340fd9a2 [Syntax] Parse tuple pattern node 2017-12-20 17:32:30 +09:00
Xi Ge
e0d167f1dd libSyntax: create syntax nodes for variable declarations.
Variable declarations are declarations led by either 'var' or 'let'. It
can contain multiple pattern bindings as children.

For patterns, this patch only creates syntax nodes for simple identifier
patterns, e.g. 'a = 3'. The rest of the pattern kinds are still left
unknown (UnknownPattern).
2017-12-19 12:25:51 -08:00
Rintaro Ishizaki
53b2e0fe14 [Syntax] Parse composition type node 2017-12-15 10:52:10 -08:00
Rintaro Ishizaki
e7cfae0ba9 [libSyntax] Support parsing type-identifier 2017-11-29 09:57:59 +09:00
Harlan
a5098e6b69 Generate libSyntax API (#10926)
* Generate libSyntax API

This patch removes the hand-rolled libSyntax API and replaces it with an
API that's entirely automatically generated. This means the API is
guaranteed to be internally stylistically and functionally consistent.
2017-07-25 18:19:58 -07:00