Commit Graph

4 Commits

Author SHA1 Message Date
Rintaro Ishizaki
6c0af2a24f [Syntax] Introduce CodeBlockItem (#14458)
CodeBlockItem represents Decl, Stmt or Expr that optionally followed by
semi-colon.
SourceFile syntax holds a list of CodeBlockItem.
2018-02-08 10:31:01 +09:00
Harlan
a339c82c1e [SwiftSyntax] Make Syntax nodes structs instead of classes (#14122)
* [Experiment] Make Syntax nodes structs instead of classes

* [Experiment] Add Hashable conformance to concrete types

* Fix pep8 violation

* Remove AnySyntax, explicitly specialize SyntaxCollection nodes

* Refine the comment for SyntaxCollection nodes
2018-01-24 23:17:25 -05:00
Harlan
a0512cd48a re-enable SwiftSyntax tests (#13399) 2017-12-14 23:39:16 -05:00
Tony Allevato
1187890ca4 [SwiftSyntax] Fix SyntaxChildren iteration (#12319)
* [SwiftSyntax] Fix SyntaxChildren iteration

SyntaxChildren.Iterator stops the first time it sees a nil child;
since it traverses all indexes without considering presence, this
causes it to terminate iteration early if there is a missing child
in the list.

* [SwiftSyntax] Add tests for SyntaxChildren
2017-10-15 00:38:35 -04:00