Skip to content

Commit 71a6c12

Browse files
committed
Add LineSizes docs to TastyFormat
1 parent 30f639d commit 71a6c12

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tasty/src/dotty/tools/tasty/TastyFormat.scala

+8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Macro-format:
5050
Note: Unqualified names in the name table are strings. The context decides whether a name is
5151
a type-name or a term-name. The same string can represent both.
5252
53+
5354
Standard-Section: "ASTs" TopLevelStat*
5455
5556
TopLevelStat = PACKAGE Length Path TopLevelStat* -- package path { topLevelStats }
@@ -225,6 +226,7 @@ Note: Tree tags are grouped into 5 categories that determine what follows, and t
225226
Category 4 (tags 110-127): tag Nat AST
226227
Category 5 (tags 128-255): tag Length <payload>
227228
229+
228230
Standard Section: "Positions" Assoc*
229231
230232
Assoc = Header offset_Delta? offset_Delta? point_Delta?
@@ -243,6 +245,12 @@ Standard Section: "Positions" Assoc*
243245
244246
All elements of a position section are serialized as Ints
245247
248+
249+
Standard Section: "LineSizes" LineSize*
250+
251+
LineSize = Int // Size the i-th line not counting the trailing `\n`
252+
253+
246254
Standard Section: "Comments" Comment*
247255
248256
Comment = Length Bytes LongInt // Raw comment's bytes encoded as UTF-8, followed by the comment's coordinates.

0 commit comments

Comments
 (0)