Commit Graph

4 Commits

Author SHA1 Message Date
Denis Morozov
2866f0e0a6 [SwiftSyntax] Add replace method to SyntaxCollections (#15331)
* [SwiftSyntax] Add replace method SyntaxCollections

* Change replaceSubrange method call to subscript setter call

* [SwiftSyntax] Add test for SyntaxCollections

* Fix mistakes in SyntaxCollections tests

* Use syntax's raw value instead of syntax itself in replacing method

* Update SyntaxCollections tests
2018-03-20 14:58:16 -04:00
Rintaro Ishizaki
fced748790 [Syntax] Represent missing optioanl nodes as nullptr (#14300)
Allocating RawSyntax/SyntaxData for missing optional node is a waste of
resource.
2018-01-31 19:24:00 +09:00
Harlan
95fc7d335e Change vars in SwiftSyntax nodes to lets (#14173) 2018-01-26 15:19:05 -08: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