"testdata/comments/attribution.proto": - { path: "", start: { line: 2, column: 0 }, end: { line: 95, column: 1 } } - path: ".syntax" start: { line: 2, column: 0 } end: { line: 2, column: 17 } leading: "% descriptor: true\n% source_code_info: true\n" - path: ".package" start: { line: 5, column: 0 } end: { line: 5, column: 17 } leading: " This is a leading comment for the package.\n" trailing: " This is still a trailing comment for the package.\n" - path: ".options" start: { line: 10, column: 0 } end: { line: 10, column: 47 } - path: ".options.java_package" start: { line: 10, column: 0 } end: { line: 10, column: 47 } leading: " This is a leading comment for the java_package option source code info, but not the\n top-level option source code info.\n" trailing: " Similarly, this is a trailing comment." - path: ".options" start: { line: 11, column: 0 } end: { line: 11, column: 34 } - path: ".options.java_multiple_files" start: { line: 11, column: 0 } end: { line: 11, column: 34 } - path: ".dependency.0" start: { line: 15, column: 0 } end: { line: 15, column: 49 } leading: " This is a leading comment for the import source code info, but not for the corresponding\n public import source code info.\n" trailing: " Same with this trailing comment." - path: ".public_dependency.0" start: { line: 15, column: 7 } end: { line: 15, column: 13 } - path: ".message_type[Foo]" start: { line: 18, column: 0 } end: { line: 44, column: 1 } leading: " This, as expected, is a leading comment for Foo.\n" trailing: " This is the TRAILING comment for Foo. (It is NOT\n a detached comment for baz.)\n" - path: ".message_type[Foo].name" start: { line: 18, column: 32 } end: { line: 18, column: 35 } - path: ".message_type[Foo].options" start: { line: 23, column: 2 } end: { line: 23, column: 18 } - path: ".message_type[Foo].options.0.0" start: { line: 23, column: 2 } end: { line: 23, column: 18 } leading: " Leading comment for message option\n" - path: ".message_type[Foo].options" start: { line: 24, column: 2 } end: { line: 24, column: 18 } - path: ".message_type[Foo].options.0.message_set_wire_format" start: { line: 24, column: 2 } end: { line: 24, column: 18 } trailing: " Trailing comment for the second message option" - path: ".message_type[Foo].field[baz].type" start: { line: 27, column: 2 } end: { line: 27, column: 8 } - path: ".message_type[Foo].field[baz]" start: { line: 27, column: 2 } end: { line: 27, column: 46 } leading: " This is a leading comment for baz.\n" trailing: " This is a trailing comment for baz.\n" - path: ".message_type[Foo].field[baz].name" start: { line: 27, column: 38 } end: { line: 27, column: 41 } - path: ".message_type[Foo].field[baz].number" start: { line: 27, column: 44 } end: { line: 27, column: 45 } - path: ".message_type[Foo].reserved_range" start: { line: 31, column: 2 } end: { line: 31, column: 74 } leading: " This is a leading comment for the reserved range.\n" trailing: " This is a trailing comment for the reserved range." - path: ".message_type[Foo].reserved_range[0]" start: { line: 31, column: 11 } end: { line: 31, column: 12 } - path: ".message_type[Foo].reserved_range[0].start" start: { line: 31, column: 11 } end: { line: 31, column: 12 } - path: ".message_type[Foo].reserved_range[0].end" start: { line: 31, column: 11 } end: { line: 31, column: 12 } - path: ".message_type[Foo].reserved_range[1].start" start: { line: 31, column: 14 } end: { line: 31, column: 15 } - path: ".message_type[Foo].reserved_range[1]" start: { line: 31, column: 14 } end: { line: 31, column: 20 } - path: ".message_type[Foo].reserved_range[1].end" start: { line: 31, column: 19 } end: { line: 31, column: 20 } - path: ".message_type[Foo].reserved_range[2].start" start: { line: 31, column: 66 } end: { line: 31, column: 67 } - path: ".message_type[Foo].reserved_range[2]" start: { line: 31, column: 66 } end: { line: 31, column: 73 } - path: ".message_type[Foo].reserved_range[2].end" start: { line: 31, column: 71 } end: { line: 31, column: 73 } - path: ".message_type[Foo].reserved_name" start: { line: 34, column: 2 } end: { line: 34, column: 42 } leading: " This is a leading comment for the reserved names declaration.\n" trailing: " This is a trailing comment for the reserved range." - path: ".message_type[Foo].reserved_name.0" start: { line: 34, column: 11 } end: { line: 34, column: 14 } - path: ".message_type[Foo].reserved_name.0" start: { line: 34, column: 38 } end: { line: 34, column: 41 } - path: ".message_type[Foo].field[options].label" start: { line: 36, column: 2 } end: { line: 36, column: 10 } - path: ".message_type[Foo].field[options]" start: { line: 36, column: 2 } end: { line: 41, column: 4 } - path: ".message_type[Foo].field[options].type" start: { line: 36, column: 11 } end: { line: 36, column: 16 } - path: ".message_type[Foo].field[options].name" start: { line: 36, column: 17 } end: { line: 36, column: 24 } - path: ".message_type[Foo].field[options].number" start: { line: 36, column: 27 } end: { line: 36, column: 29 } - path: ".message_type[Foo].field[options].options" start: { line: 36, column: 53 } end: { line: 41, column: 3 } - path: ".message_type[Foo].field[options].options.features.repeated_field_encoding" start: { line: 38, column: 4 } end: { line: 38, column: 45 } - path: ".message_type[Foo].field[options].options.0.0" start: { line: 39, column: 4 } end: { line: 39, column: 12 } - path: ".message_type[Foo].field[options].options.0.ctype" start: { line: 40, column: 4 } end: { line: 40, column: 12 } - path: ".message_type[Bar]" start: { line: 58, column: 0 } end: { line: 65, column: 1 } leading: "\n A leading block comment for Bar.\n" detached: - " This IS a detached comment for Bar.\n" - " This is also a detached comment for Bar.\n" - path: ".message_type[Bar].name" start: { line: 58, column: 8 } end: { line: 58, column: 11 } - path: ".message_type[Bar].field[bar].type" start: { line: 62, column: 2 } end: { line: 62, column: 8 } - path: ".message_type[Bar].field[bar]" start: { line: 62, column: 2 } end: { line: 62, column: 17 } leading: "\n\n handle edge-cases for block comments" - path: ".message_type[Bar].field[bar].name" start: { line: 62, column: 9 } end: { line: 62, column: 12 } - path: ".message_type[Bar].field[bar].number" start: { line: 62, column: 15 } end: { line: 62, column: 16 } - path: ".message_type[Bar].field[barbar].type" start: { line: 64, column: 2 } end: { line: 64, column: 8 } - path: ".message_type[Bar].field[barbar]" start: { line: 64, column: 2 } end: { line: 64, column: 20 } leading: " start and end block comment on the same line " - path: ".message_type[Bar].field[barbar].name" start: { line: 64, column: 9 } end: { line: 64, column: 15 } - path: ".message_type[Bar].field[barbar].number" start: { line: 64, column: 18 } end: { line: 64, column: 19 } - path: ".enum_type[Baz]" start: { line: 68, column: 0 } end: { line: 70, column: 1 } leading: " This is the leading comment for enum Baz.\n" trailing: " This is a trailing comment for enum Baz." - path: ".enum_type[Baz].name" start: { line: 68, column: 5 } end: { line: 68, column: 8 } - path: ".enum_type[Baz].value[BAZ_ONE].name" start: { line: 69, column: 2 } end: { line: 69, column: 9 } - path: ".enum_type[Baz].value[BAZ_ONE]" start: { line: 69, column: 2 } end: { line: 69, column: 14 } - path: ".enum_type[Baz].value[BAZ_ONE].number" start: { line: 69, column: 12 } end: { line: 69, column: 13 } - path: ".message_type[Qux]" start: { line: 77, column: 0 } end: { line: 77, column: 14 } leading: "\nA block comment\n\nwith new lines preserved.\n" - path: ".message_type[Qux].name" start: { line: 77, column: 8 } end: { line: 77, column: 11 } - path: ".service[FooService]" start: { line: 80, column: 0 } end: { line: 87, column: 1 } leading: " This is the leading comment for service FooService.\n" trailing: " This is a trailing comment for service FooService." - path: ".service[FooService].name" start: { line: 80, column: 8 } end: { line: 80, column: 18 } - path: ".service[FooService].method[FooForBar]" start: { line: 82, column: 2 } end: { line: 82, column: 35 } leading: " Leading comment for method FooForBar.\n" trailing: " Trailing comment for FooForBar." - path: ".service[FooService].method[FooForBar].name" start: { line: 82, column: 6 } end: { line: 82, column: 15 } - path: ".service[FooService].method[FooForBar].input_type" start: { line: 82, column: 16 } end: { line: 82, column: 19 } - path: ".service[FooService].method[FooForBar].output_type" start: { line: 82, column: 30 } end: { line: 82, column: 33 } - path: ".service[FooService].method[BarForBar]" start: { line: 85, column: 2 } end: { line: 86, column: 3 } leading: " Leading comment for method BarForBar.\n" trailing: " Trailing comment for BarForBar." - path: ".service[FooService].method[BarForBar].name" start: { line: 85, column: 6 } end: { line: 85, column: 15 } - path: ".service[FooService].method[BarForBar].input_type" start: { line: 85, column: 16 } end: { line: 85, column: 19 } - path: ".service[FooService].method[BarForBar].output_type" start: { line: 85, column: 30 } end: { line: 85, column: 33 } - path: ".extension" start: { line: 89, column: 0 } end: { line: 91, column: 1 } - path: ".extension[c].extendee" start: { line: 89, column: 7 } end: { line: 89, column: 35 } - path: ".extension[c].label" start: { line: 90, column: 2 } end: { line: 90, column: 10 } - path: ".extension[c]" start: { line: 90, column: 2 } end: { line: 90, column: 26 } - path: ".extension[c].type" start: { line: 90, column: 11 } end: { line: 90, column: 16 } - path: ".extension[c].name" start: { line: 90, column: 17 } end: { line: 90, column: 18 } - path: ".extension[c].number" start: { line: 90, column: 21 } end: { line: 90, column: 25 } - path: ".extension" start: { line: 93, column: 0 } end: { line: 95, column: 1 } - path: ".extension[a].extendee" start: { line: 93, column: 7 } end: { line: 93, column: 37 } - path: ".extension[a].label" start: { line: 94, column: 2 } end: { line: 94, column: 10 } - path: ".extension[a]" start: { line: 94, column: 2 } end: { line: 94, column: 26 } - path: ".extension[a].type" start: { line: 94, column: 11 } end: { line: 94, column: 16 } - path: ".extension[a].name" start: { line: 94, column: 17 } end: { line: 94, column: 18 } - path: ".extension[a].number" start: { line: 94, column: 21 } end: { line: 94, column: 25 }