Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 52267bf

Browse files
Denys Smirnovdennwc
authored andcommitted
update sdk and add unicode fixture
Signed-off-by: Denys Smirnov <[email protected]>
1 parent c60cdc5 commit 52267bf

File tree

6 files changed

+93
-3
lines changed

6 files changed

+93
-3
lines changed

Gopkg.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

driver/normalizer/annotation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var Native = Transformers([][]Transformer{
1818
}...)
1919

2020
var Code = []CodeTransformer{
21-
positioner.NewFillOffsetFromLineCol(),
21+
positioner.FromLineCol(),
2222
}
2323

2424
func annotateTypeToken(typ, token string, roles ...role.Role) Mapping {

fixtures/unicode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"𝓏"

fixtures/unicode.py.native

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
'PY3AST': {
3+
'ast_type': "Module",
4+
body: [
5+
{
6+
'ast_type': "Expr",
7+
'col_offset': 1,
8+
lineno: 1,
9+
value: {
10+
'ast_type': "Str",
11+
'col_offset': 1,
12+
'end_col_offset': 4,
13+
'end_lineno': 1,
14+
lineno: 1,
15+
s: "𝓏",
16+
},
17+
},
18+
],
19+
},
20+
}

fixtures/unicode.py.sem.uast

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{ '@type': "python:Module",
2+
'@role': [File, Module],
3+
'@pos': { '@type': "uast:Positions",
4+
},
5+
body: [
6+
{ '@type': "python:Expr",
7+
'@role': [Expression],
8+
'@pos': { '@type': "uast:Positions",
9+
start: { '@type': "uast:Position",
10+
offset: 0,
11+
line: 1,
12+
col: 1,
13+
},
14+
},
15+
value: { '@type': "python:BoxedStr",
16+
'@role': [Unannotated],
17+
'boxed_value': { '@type': "uast:String",
18+
'@pos': { '@type': "uast:Positions",
19+
start: { '@type': "uast:Position",
20+
offset: 0,
21+
line: 1,
22+
col: 1,
23+
},
24+
end: { '@type': "uast:Position",
25+
offset: 3,
26+
line: 1,
27+
col: 4,
28+
},
29+
},
30+
Format: "",
31+
Value: "𝓏",
32+
},
33+
},
34+
},
35+
],
36+
}

fixtures/unicode.py.uast

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{ '@type': "Module",
2+
'@role': [File, Module],
3+
'@pos': { '@type': "uast:Positions",
4+
},
5+
body: [
6+
{ '@type': "Expr",
7+
'@role': [Expression],
8+
'@pos': { '@type': "uast:Positions",
9+
start: { '@type': "uast:Position",
10+
offset: 0,
11+
line: 1,
12+
col: 1,
13+
},
14+
},
15+
value: { '@type': "Str",
16+
'@token': "𝓏",
17+
'@role': [Expression, Literal, Primitive, String],
18+
'@pos': { '@type': "uast:Positions",
19+
start: { '@type': "uast:Position",
20+
offset: 0,
21+
line: 1,
22+
col: 1,
23+
},
24+
end: { '@type': "uast:Position",
25+
offset: 3,
26+
line: 1,
27+
col: 4,
28+
},
29+
},
30+
},
31+
},
32+
],
33+
}

0 commit comments

Comments
 (0)