From fde3c7906cdaddc60eee058c33805b4de53b6d10 Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Thu, 17 Oct 2019 14:16:04 +0300 Subject: [PATCH] synthesize positions when splitting import paths; fixes #55 Signed-off-by: Denys Smirnov --- driver/normalizer/normalizer.go | 27 +- fixtures/bench_worktree.go.sem.uast | 1120 +++++++++++++++++++++++++ fixtures/borges.go.sem.uast | 80 ++ fixtures/git1.go.sem.uast | 240 ++++++ fixtures/git2.go.sem.uast | 260 ++++++ fixtures/git3.go.sem.uast | 420 ++++++++++ fixtures/imports.go.sem.uast | 140 ++++ fixtures/json.go.sem.uast | 120 +++ fixtures/u2_import_path.go.sem.uast | 100 +++ fixtures/u2_import_simple.go.sem.uast | 60 ++ 10 files changed, 2566 insertions(+), 1 deletion(-) diff --git a/driver/normalizer/normalizer.go b/driver/normalizer/normalizer.go index 07099c0..98c302b 100644 --- a/driver/normalizer/normalizer.go +++ b/driver/normalizer/normalizer.go @@ -508,9 +508,34 @@ func (op pathSplit) Check(st *State, n nodes.Node) (bool, error) { if err := uast.NodeAs(obj, &path); err != nil { return false, err } + var spos uast.Position + if p := path.Positions.Start(); p != nil { + // make a copy + spos = *p + // the position is from a string, so we should exclude " + // when reconstructing positions for identifiers in the import path + spos.Offset++ + spos.Col++ + } var idents []uast.Identifier for _, name := range strings.Split(path.Value, "/") { - idents = append(idents, uast.Identifier{Name: name}) + id := uast.Identifier{Name: name} + if spos.Valid() { + p := spos + // reconstruct the position + pe := p + pe.Offset += uint32(len(name)) + pe.Col += uint32(len(name)) + id.Positions = uast.Positions{ + uast.KeyStart: p, + uast.KeyEnd: pe, + } + // skip "/" + pe.Offset++ + pe.Col++ + spos = pe + } + idents = append(idents, id) } var out interface{} if len(idents) == 1 { diff --git a/fixtures/bench_worktree.go.sem.uast b/fixtures/bench_worktree.go.sem.uast index 38400a6..d22bb0c 100644 --- a/fixtures/bench_worktree.go.sem.uast +++ b/fixtures/bench_worktree.go.sem.uast @@ -1914,11 +1914,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 68, + line: 8, + col: 13, + }, + end: { '@type': "uast:Position", + offset: 70, + line: 8, + col: 15, + }, }, Name: "io", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 71, + line: 8, + col: 16, + }, + end: { '@type': "uast:Position", + offset: 77, + line: 8, + col: 22, + }, }, Name: "ioutil", }, @@ -2000,11 +2020,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 87, + line: 10, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 91, + line: 10, + col: 7, + }, }, Name: "path", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 92, + line: 10, + col: 8, + }, + end: { '@type': "uast:Position", + offset: 100, + line: 10, + col: 16, + }, }, Name: "filepath", }, @@ -2085,21 +2125,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 116, + line: 13, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 124, + line: 13, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 125, + line: 13, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 130, + line: 13, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 131, + line: 13, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 140, + line: 13, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 141, + line: 13, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 147, + line: 13, + col: 34, + }, }, Name: "config", }, @@ -2143,21 +2223,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 151, + line: 14, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 159, + line: 14, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 160, + line: 14, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 165, + line: 14, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 166, + line: 14, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 175, + line: 14, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 176, + line: 14, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 184, + line: 14, + col: 36, + }, }, Name: "plumbing", }, @@ -2201,26 +2321,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 188, + line: 15, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 196, + line: 15, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 197, + line: 15, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 202, + line: 15, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 203, + line: 15, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 212, + line: 15, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 213, + line: 15, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 221, + line: 15, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 222, + line: 15, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 230, + line: 15, + col: 45, + }, }, Name: "filemode", }, @@ -2264,31 +2434,91 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 234, + line: 16, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 242, + line: 16, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 243, + line: 16, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 248, + line: 16, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 249, + line: 16, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 258, + line: 16, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 259, + line: 16, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 267, + line: 16, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 268, + line: 16, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 274, + line: 16, + col: 43, + }, }, Name: "format", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 275, + line: 16, + col: 44, + }, + end: { '@type': "uast:Position", + offset: 284, + line: 16, + col: 53, + }, }, Name: "gitignore", }, @@ -2332,31 +2562,91 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 288, + line: 17, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 296, + line: 17, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 297, + line: 17, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 302, + line: 17, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 303, + line: 17, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 312, + line: 17, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 313, + line: 17, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 321, + line: 17, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 322, + line: 17, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 328, + line: 17, + col: 43, + }, }, Name: "format", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 329, + line: 17, + col: 44, + }, + end: { '@type': "uast:Position", + offset: 334, + line: 17, + col: 49, + }, }, Name: "index", }, @@ -2400,26 +2690,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 338, + line: 18, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 346, + line: 18, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 347, + line: 18, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 352, + line: 18, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 353, + line: 18, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 362, + line: 18, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 363, + line: 18, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 371, + line: 18, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 372, + line: 18, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 378, + line: 18, + col: 43, + }, }, Name: "object", }, @@ -2463,26 +2803,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 382, + line: 19, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 390, + line: 19, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 391, + line: 19, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 396, + line: 19, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 397, + line: 19, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 406, + line: 19, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 407, + line: 19, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 415, + line: 19, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 416, + line: 19, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 422, + line: 19, + col: 43, + }, }, Name: "storer", }, @@ -2526,26 +2916,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 426, + line: 20, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 434, + line: 20, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 435, + line: 20, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 440, + line: 20, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 441, + line: 20, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 450, + line: 20, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 451, + line: 20, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 456, + line: 20, + col: 33, + }, }, Name: "utils", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 457, + line: 20, + col: 34, + }, + end: { '@type': "uast:Position", + offset: 463, + line: 20, + col: 40, + }, }, Name: "ioutil", }, @@ -2589,26 +3029,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 467, + line: 21, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 475, + line: 21, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 476, + line: 21, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 481, + line: 21, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 482, + line: 21, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 491, + line: 21, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 492, + line: 21, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 497, + line: 21, + col: 33, + }, }, Name: "utils", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 498, + line: 21, + col: 34, + }, + end: { '@type': "uast:Position", + offset: 508, + line: 21, + col: 44, + }, }, Name: "merkletrie", }, @@ -2652,16 +3142,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 513, + line: 23, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 521, + line: 23, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 522, + line: 23, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 527, + line: 23, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 528, + line: 23, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 539, + line: 23, + col: 29, + }, }, Name: "go-billy.v4", }, @@ -2705,21 +3225,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 543, + line: 24, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 551, + line: 24, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 552, + line: 24, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 557, + line: 24, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 558, + line: 24, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 569, + line: 24, + col: 29, + }, }, Name: "go-billy.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 570, + line: 24, + col: 30, + }, + end: { '@type': "uast:Position", + offset: 574, + line: 24, + col: 34, + }, }, Name: "util", }, @@ -67639,11 +68199,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 68, + line: 8, + col: 13, + }, + end: { '@type': "uast:Position", + offset: 70, + line: 8, + col: 15, + }, }, Name: "io", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 71, + line: 8, + col: 16, + }, + end: { '@type': "uast:Position", + offset: 77, + line: 8, + col: 22, + }, }, Name: "ioutil", }, @@ -67725,11 +68305,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 87, + line: 10, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 91, + line: 10, + col: 7, + }, }, Name: "path", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 92, + line: 10, + col: 8, + }, + end: { '@type': "uast:Position", + offset: 100, + line: 10, + col: 16, + }, }, Name: "filepath", }, @@ -67810,21 +68410,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 116, + line: 13, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 124, + line: 13, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 125, + line: 13, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 130, + line: 13, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 131, + line: 13, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 140, + line: 13, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 141, + line: 13, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 147, + line: 13, + col: 34, + }, }, Name: "config", }, @@ -67868,21 +68508,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 151, + line: 14, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 159, + line: 14, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 160, + line: 14, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 165, + line: 14, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 166, + line: 14, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 175, + line: 14, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 176, + line: 14, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 184, + line: 14, + col: 36, + }, }, Name: "plumbing", }, @@ -67926,26 +68606,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 188, + line: 15, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 196, + line: 15, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 197, + line: 15, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 202, + line: 15, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 203, + line: 15, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 212, + line: 15, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 213, + line: 15, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 221, + line: 15, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 222, + line: 15, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 230, + line: 15, + col: 45, + }, }, Name: "filemode", }, @@ -67989,31 +68719,91 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 234, + line: 16, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 242, + line: 16, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 243, + line: 16, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 248, + line: 16, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 249, + line: 16, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 258, + line: 16, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 259, + line: 16, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 267, + line: 16, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 268, + line: 16, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 274, + line: 16, + col: 43, + }, }, Name: "format", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 275, + line: 16, + col: 44, + }, + end: { '@type': "uast:Position", + offset: 284, + line: 16, + col: 53, + }, }, Name: "gitignore", }, @@ -68057,31 +68847,91 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 288, + line: 17, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 296, + line: 17, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 297, + line: 17, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 302, + line: 17, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 303, + line: 17, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 312, + line: 17, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 313, + line: 17, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 321, + line: 17, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 322, + line: 17, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 328, + line: 17, + col: 43, + }, }, Name: "format", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 329, + line: 17, + col: 44, + }, + end: { '@type': "uast:Position", + offset: 334, + line: 17, + col: 49, + }, }, Name: "index", }, @@ -68125,26 +68975,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 338, + line: 18, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 346, + line: 18, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 347, + line: 18, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 352, + line: 18, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 353, + line: 18, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 362, + line: 18, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 363, + line: 18, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 371, + line: 18, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 372, + line: 18, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 378, + line: 18, + col: 43, + }, }, Name: "object", }, @@ -68188,26 +69088,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 382, + line: 19, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 390, + line: 19, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 391, + line: 19, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 396, + line: 19, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 397, + line: 19, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 406, + line: 19, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 407, + line: 19, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 415, + line: 19, + col: 36, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 416, + line: 19, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 422, + line: 19, + col: 43, + }, }, Name: "storer", }, @@ -68251,26 +69201,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 426, + line: 20, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 434, + line: 20, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 435, + line: 20, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 440, + line: 20, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 441, + line: 20, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 450, + line: 20, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 451, + line: 20, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 456, + line: 20, + col: 33, + }, }, Name: "utils", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 457, + line: 20, + col: 34, + }, + end: { '@type': "uast:Position", + offset: 463, + line: 20, + col: 40, + }, }, Name: "ioutil", }, @@ -68314,26 +69314,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 467, + line: 21, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 475, + line: 21, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 476, + line: 21, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 481, + line: 21, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 482, + line: 21, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 491, + line: 21, + col: 27, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 492, + line: 21, + col: 28, + }, + end: { '@type': "uast:Position", + offset: 497, + line: 21, + col: 33, + }, }, Name: "utils", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 498, + line: 21, + col: 34, + }, + end: { '@type': "uast:Position", + offset: 508, + line: 21, + col: 44, + }, }, Name: "merkletrie", }, @@ -68377,16 +69427,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 513, + line: 23, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 521, + line: 23, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 522, + line: 23, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 527, + line: 23, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 528, + line: 23, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 539, + line: 23, + col: 29, + }, }, Name: "go-billy.v4", }, @@ -68430,21 +69510,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 543, + line: 24, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 551, + line: 24, + col: 11, + }, }, Name: "gopkg.in", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 552, + line: 24, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 557, + line: 24, + col: 17, + }, }, Name: "src-d", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 558, + line: 24, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 569, + line: 24, + col: 29, + }, }, Name: "go-billy.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 570, + line: 24, + col: 30, + }, + end: { '@type': "uast:Position", + offset: 574, + line: 24, + col: 34, + }, }, Name: "util", }, diff --git a/fixtures/borges.go.sem.uast b/fixtures/borges.go.sem.uast index 6bb893c..5b837c1 100644 --- a/fixtures/borges.go.sem.uast +++ b/fixtures/borges.go.sem.uast @@ -197,21 +197,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 58, + line: 8, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 68, + line: 8, + col: 13, + }, }, Name: "github.com", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 69, + line: 8, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 77, + line: 8, + col: 22, + }, }, Name: "stretchr", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 78, + line: 8, + col: 23, + }, + end: { '@type': "uast:Position", + offset: 85, + line: 8, + col: 30, + }, }, Name: "testify", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 86, + line: 8, + col: 31, + }, + end: { '@type': "uast:Position", + offset: 93, + line: 8, + col: 38, + }, }, Name: "require", }, @@ -5941,21 +5981,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 58, + line: 8, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 68, + line: 8, + col: 13, + }, }, Name: "github.com", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 69, + line: 8, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 77, + line: 8, + col: 22, + }, }, Name: "stretchr", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 78, + line: 8, + col: 23, + }, + end: { '@type': "uast:Position", + offset: 85, + line: 8, + col: 30, + }, }, Name: "testify", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 86, + line: 8, + col: 31, + }, + end: { '@type': "uast:Position", + offset: 93, + line: 8, + col: 38, + }, }, Name: "require", }, diff --git a/fixtures/git1.go.sem.uast b/fixtures/git1.go.sem.uast index 6d96c27..5bb54ce 100644 --- a/fixtures/git1.go.sem.uast +++ b/fixtures/git1.go.sem.uast @@ -435,16 +435,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 65, + line: 10, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 75, + line: 10, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 76, + line: 10, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 85, + line: 10, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 86, + line: 10, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 94, + line: 10, + col: 32, + }, }, Name: "plumbing", }, @@ -488,26 +518,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 98, + line: 11, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 108, + line: 11, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 109, + line: 11, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 118, + line: 11, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 119, + line: 11, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 127, + line: 11, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 128, + line: 11, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 134, + line: 11, + col: 39, + }, }, Name: "format", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 135, + line: 11, + col: 40, + }, + end: { '@type': "uast:Position", + offset: 140, + line: 11, + col: 45, + }, }, Name: "index", }, @@ -551,21 +631,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 144, + line: 12, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 154, + line: 12, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 155, + line: 12, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 164, + line: 12, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 165, + line: 12, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 173, + line: 12, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 174, + line: 12, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 180, + line: 12, + col: 39, + }, }, Name: "object", }, @@ -21882,16 +22002,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 65, + line: 10, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 75, + line: 10, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 76, + line: 10, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 85, + line: 10, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 86, + line: 10, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 94, + line: 10, + col: 32, + }, }, Name: "plumbing", }, @@ -21935,26 +22085,76 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 98, + line: 11, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 108, + line: 11, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 109, + line: 11, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 118, + line: 11, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 119, + line: 11, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 127, + line: 11, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 128, + line: 11, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 134, + line: 11, + col: 39, + }, }, Name: "format", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 135, + line: 11, + col: 40, + }, + end: { '@type': "uast:Position", + offset: 140, + line: 11, + col: 45, + }, }, Name: "index", }, @@ -21998,21 +22198,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 144, + line: 12, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 154, + line: 12, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 155, + line: 12, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 164, + line: 12, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 165, + line: 12, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 173, + line: 12, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 174, + line: 12, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 180, + line: 12, + col: 39, + }, }, Name: "object", }, diff --git a/fixtures/git2.go.sem.uast b/fixtures/git2.go.sem.uast index a855c54..9a4d4be 100644 --- a/fixtures/git2.go.sem.uast +++ b/fixtures/git2.go.sem.uast @@ -2281,11 +2281,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 72, + line: 9, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 79, + line: 9, + col: 10, + }, }, Name: "unicode", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 9, + col: 11, + }, + end: { '@type': "uast:Position", + offset: 84, + line: 9, + col: 15, + }, }, Name: "utf8", }, @@ -2329,16 +2349,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 89, + line: 11, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 99, + line: 11, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 100, + line: 11, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 109, + line: 11, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 110, + line: 11, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 118, + line: 11, + col: 32, + }, }, Name: "plumbing", }, @@ -2382,21 +2432,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 122, + line: 12, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 132, + line: 12, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 133, + line: 12, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 142, + line: 12, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 143, + line: 12, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 151, + line: 12, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 152, + line: 12, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 158, + line: 12, + col: 39, + }, }, Name: "object", }, @@ -2440,21 +2530,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 162, + line: 13, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 172, + line: 13, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 173, + line: 13, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 182, + line: 13, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 183, + line: 13, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 188, + line: 13, + col: 29, + }, }, Name: "utils", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 189, + line: 13, + col: 30, + }, + end: { '@type': "uast:Position", + offset: 193, + line: 13, + col: 34, + }, }, Name: "diff", }, @@ -22322,11 +22452,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 72, + line: 9, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 79, + line: 9, + col: 10, + }, }, Name: "unicode", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 9, + col: 11, + }, + end: { '@type': "uast:Position", + offset: 84, + line: 9, + col: 15, + }, }, Name: "utf8", }, @@ -22370,16 +22520,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 89, + line: 11, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 99, + line: 11, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 100, + line: 11, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 109, + line: 11, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 110, + line: 11, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 118, + line: 11, + col: 32, + }, }, Name: "plumbing", }, @@ -22423,21 +22603,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 122, + line: 12, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 132, + line: 12, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 133, + line: 12, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 142, + line: 12, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 143, + line: 12, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 151, + line: 12, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 152, + line: 12, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 158, + line: 12, + col: 39, + }, }, Name: "object", }, @@ -22481,21 +22701,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 162, + line: 13, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 172, + line: 13, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 173, + line: 13, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 182, + line: 13, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 183, + line: 13, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 188, + line: 13, + col: 29, + }, }, Name: "utils", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 189, + line: 13, + col: 30, + }, + end: { '@type': "uast:Position", + offset: 193, + line: 13, + col: 34, + }, }, Name: "diff", }, diff --git a/fixtures/git3.go.sem.uast b/fixtures/git3.go.sem.uast index f9d25f0..0073707 100644 --- a/fixtures/git3.go.sem.uast +++ b/fixtures/git3.go.sem.uast @@ -2026,16 +2026,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 48, + line: 8, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 58, + line: 8, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 59, + line: 8, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 68, + line: 8, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 69, + line: 8, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 75, + line: 8, + col: 30, + }, }, Name: "config", }, @@ -2079,16 +2109,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 79, + line: 9, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 89, + line: 9, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 90, + line: 9, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 99, + line: 9, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 100, + line: 9, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 108, + line: 9, + col: 32, + }, }, Name: "plumbing", }, @@ -2132,21 +2192,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 112, + line: 10, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 122, + line: 10, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 123, + line: 10, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 132, + line: 10, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 133, + line: 10, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 141, + line: 10, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 142, + line: 10, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 148, + line: 10, + col: 39, + }, }, Name: "object", }, @@ -2190,21 +2290,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 152, + line: 11, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 162, + line: 11, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 163, + line: 11, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 172, + line: 11, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 173, + line: 11, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 181, + line: 11, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 182, + line: 11, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 188, + line: 11, + col: 39, + }, }, Name: "storer", }, @@ -2248,21 +2388,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 192, + line: 12, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 202, + line: 12, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 203, + line: 12, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 212, + line: 12, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 213, + line: 12, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 220, + line: 12, + col: 31, + }, }, Name: "storage", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 221, + line: 12, + col: 32, + }, + end: { '@type': "uast:Position", + offset: 231, + line: 12, + col: 42, + }, }, Name: "filesystem", }, @@ -2306,16 +2486,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 236, + line: 14, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 246, + line: 14, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 247, + line: 14, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 258, + line: 14, + col: 25, + }, }, Name: "go-billy.v1", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 259, + line: 14, + col: 26, + }, + end: { '@type': "uast:Position", + offset: 263, + line: 14, + col: 30, + }, }, Name: "osfs", }, @@ -47310,16 +47520,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 48, + line: 8, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 58, + line: 8, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 59, + line: 8, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 68, + line: 8, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 69, + line: 8, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 75, + line: 8, + col: 30, + }, }, Name: "config", }, @@ -47363,16 +47603,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 79, + line: 9, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 89, + line: 9, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 90, + line: 9, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 99, + line: 9, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 100, + line: 9, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 108, + line: 9, + col: 32, + }, }, Name: "plumbing", }, @@ -47416,21 +47686,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 112, + line: 10, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 122, + line: 10, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 123, + line: 10, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 132, + line: 10, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 133, + line: 10, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 141, + line: 10, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 142, + line: 10, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 148, + line: 10, + col: 39, + }, }, Name: "object", }, @@ -47474,21 +47784,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 152, + line: 11, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 162, + line: 11, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 163, + line: 11, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 172, + line: 11, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 173, + line: 11, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 181, + line: 11, + col: 32, + }, }, Name: "plumbing", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 182, + line: 11, + col: 33, + }, + end: { '@type': "uast:Position", + offset: 188, + line: 11, + col: 39, + }, }, Name: "storer", }, @@ -47532,21 +47882,61 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 192, + line: 12, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 202, + line: 12, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 203, + line: 12, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 212, + line: 12, + col: 23, + }, }, Name: "go-git.v4", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 213, + line: 12, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 220, + line: 12, + col: 31, + }, }, Name: "storage", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 221, + line: 12, + col: 32, + }, + end: { '@type': "uast:Position", + offset: 231, + line: 12, + col: 42, + }, }, Name: "filesystem", }, @@ -47590,16 +47980,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 236, + line: 14, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 246, + line: 14, + col: 13, + }, }, Name: "srcd.works", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 247, + line: 14, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 258, + line: 14, + col: 25, + }, }, Name: "go-billy.v1", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 259, + line: 14, + col: 26, + }, + end: { '@type': "uast:Position", + offset: 263, + line: 14, + col: 30, + }, }, Name: "osfs", }, diff --git a/fixtures/imports.go.sem.uast b/fixtures/imports.go.sem.uast index 524b433..3b374ed 100644 --- a/fixtures/imports.go.sem.uast +++ b/fixtures/imports.go.sem.uast @@ -157,11 +157,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 43, + line: 6, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 44, + line: 6, + col: 4, + }, }, Name: ".", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 45, + line: 6, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 50, + line: 6, + col: 10, + }, }, Name: "local", }, @@ -242,16 +262,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 63, + line: 8, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 73, + line: 8, + col: 13, + }, }, Name: "github.com", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 74, + line: 8, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 80, + line: 8, + col: 20, + }, }, Name: "bblfsh", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 81, + line: 8, + col: 21, + }, + end: { '@type': "uast:Position", + offset: 88, + line: 8, + col: 28, + }, }, Name: "bblfshd", }, @@ -334,11 +384,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 107, + line: 10, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 114, + line: 10, + col: 12, + }, }, Name: "runtime", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 115, + line: 10, + col: 13, + }, + end: { '@type': "uast:Position", + offset: 120, + line: 10, + col: 18, + }, }, Name: "debug", }, @@ -479,11 +549,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 43, + line: 6, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 44, + line: 6, + col: 4, + }, }, Name: ".", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 45, + line: 6, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 50, + line: 6, + col: 10, + }, }, Name: "local", }, @@ -564,16 +654,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 63, + line: 8, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 73, + line: 8, + col: 13, + }, }, Name: "github.com", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 74, + line: 8, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 80, + line: 8, + col: 20, + }, }, Name: "bblfsh", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 81, + line: 8, + col: 21, + }, + end: { '@type': "uast:Position", + offset: 88, + line: 8, + col: 28, + }, }, Name: "bblfshd", }, @@ -656,11 +776,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 107, + line: 10, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 114, + line: 10, + col: 12, + }, }, Name: "runtime", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 115, + line: 10, + col: 13, + }, + end: { '@type': "uast:Position", + offset: 120, + line: 10, + col: 18, + }, }, Name: "debug", }, diff --git a/fixtures/json.go.sem.uast b/fixtures/json.go.sem.uast index b9a08b3..489fd65 100644 --- a/fixtures/json.go.sem.uast +++ b/fixtures/json.go.sem.uast @@ -6107,11 +6107,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 520, + line: 16, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 528, + line: 16, + col: 11, + }, }, Name: "encoding", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 529, + line: 16, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 535, + line: 16, + col: 18, + }, }, Name: "base64", }, @@ -6451,11 +6471,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 614, + line: 25, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 618, + line: 25, + col: 7, + }, }, Name: "sync", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 619, + line: 25, + col: 8, + }, + end: { '@type': "uast:Position", + offset: 625, + line: 25, + col: 14, + }, }, Name: "atomic", }, @@ -6536,11 +6576,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 640, + line: 27, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 647, + line: 27, + col: 10, + }, }, Name: "unicode", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 648, + line: 27, + col: 11, + }, + end: { '@type': "uast:Position", + offset: 652, + line: 27, + col: 15, + }, }, Name: "utf8", }, @@ -105351,11 +105411,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 520, + line: 16, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 528, + line: 16, + col: 11, + }, }, Name: "encoding", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 529, + line: 16, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 535, + line: 16, + col: 18, + }, }, Name: "base64", }, @@ -105695,11 +105775,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 614, + line: 25, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 618, + line: 25, + col: 7, + }, }, Name: "sync", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 619, + line: 25, + col: 8, + }, + end: { '@type': "uast:Position", + offset: 625, + line: 25, + col: 14, + }, }, Name: "atomic", }, @@ -105780,11 +105880,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 640, + line: 27, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 647, + line: 27, + col: 10, + }, }, Name: "unicode", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 648, + line: 27, + col: 11, + }, + end: { '@type': "uast:Position", + offset: 652, + line: 27, + col: 15, + }, }, Name: "utf8", }, diff --git a/fixtures/u2_import_path.go.sem.uast b/fixtures/u2_import_path.go.sem.uast index 87a79d0..710c053 100644 --- a/fixtures/u2_import_path.go.sem.uast +++ b/fixtures/u2_import_path.go.sem.uast @@ -86,16 +86,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 26, + line: 3, + col: 9, + }, + end: { '@type': "uast:Position", + offset: 36, + line: 3, + col: 19, + }, }, Name: "github.com", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 37, + line: 3, + col: 20, + }, + end: { '@type': "uast:Position", + offset: 40, + line: 3, + col: 23, + }, }, Name: "foo", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 41, + line: 3, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 44, + line: 3, + col: 27, + }, }, Name: "bar", }, @@ -173,11 +203,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 54, + line: 4, + col: 9, + }, + end: { '@type': "uast:Position", + offset: 55, + line: 4, + col: 10, + }, }, Name: ".", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 56, + line: 4, + col: 11, + }, + end: { '@type': "uast:Position", + offset: 61, + line: 4, + col: 16, + }, }, Name: "local", }, @@ -227,16 +277,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 26, + line: 3, + col: 9, + }, + end: { '@type': "uast:Position", + offset: 36, + line: 3, + col: 19, + }, }, Name: "github.com", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 37, + line: 3, + col: 20, + }, + end: { '@type': "uast:Position", + offset: 40, + line: 3, + col: 23, + }, }, Name: "foo", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 41, + line: 3, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 44, + line: 3, + col: 27, + }, }, Name: "bar", }, @@ -280,11 +360,31 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 54, + line: 4, + col: 9, + }, + end: { '@type': "uast:Position", + offset: 55, + line: 4, + col: 10, + }, }, Name: ".", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 56, + line: 4, + col: 11, + }, + end: { '@type': "uast:Position", + offset: 61, + line: 4, + col: 16, + }, }, Name: "local", }, diff --git a/fixtures/u2_import_simple.go.sem.uast b/fixtures/u2_import_simple.go.sem.uast index 3c783d4..e01a863 100644 --- a/fixtures/u2_import_simple.go.sem.uast +++ b/fixtures/u2_import_simple.go.sem.uast @@ -194,16 +194,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 52, + line: 6, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 62, + line: 6, + col: 13, + }, }, Name: "github.com", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 63, + line: 6, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 66, + line: 6, + col: 17, + }, }, Name: "foo", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 67, + line: 6, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 70, + line: 6, + col: 21, + }, }, Name: "bar", }, @@ -327,16 +357,46 @@ Names: [ { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 52, + line: 6, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 62, + line: 6, + col: 13, + }, }, Name: "github.com", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 63, + line: 6, + col: 14, + }, + end: { '@type': "uast:Position", + offset: 66, + line: 6, + col: 17, + }, }, Name: "foo", }, { '@type': "uast:Identifier", '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 67, + line: 6, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 70, + line: 6, + col: 21, + }, }, Name: "bar", },