Commit Graph

4 Commits

Author SHA1 Message Date
Alex Hoppen
7f8e46c7e9 [swiftSyntax] Make AbsolutePosition a value type
AbsolutePosition had value semantics anyway, the only reason it was a
reference type was so that we can use it in AtomicCache. But that can be
worked around by boxing it into a reference type.
2018-08-14 11:51:05 -07:00
Alex Hoppen
56bf9a3469 [SwiftSyntax] Refactor AbsolutePosition
AbsolutePosition being a mutable reference type easily leads to bugs
where an AbsolutePosition is modified. Making it immutable eliminates
this issue. Furthermore, the introduction of SourceLength should allow
easier manipulation of AbsolutePositions on the client side.

We still cannot make AbsolutePosition a value type since it is used
inside AtomicCache, but the immutability gives the same safety.
2018-08-01 11:55:35 -07:00
Harlan Haskins
0f5ac8d57a Actually add offsets in add(columns:) and add(lines:size:) 2018-04-24 16:41:19 -04:00
Harlan Haskins
6b29e2dd97 Re-add AbsolutePosition.swift 2018-04-24 16:15:55 -04:00