Skip to content

Commit de5aa6b

Browse files
value.text instead of value.description
1 parent dc265af commit de5aa6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1039
-947
lines changed

Public/css/popover.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
.popover-content dd {
5454
margin-bottom: 2px;
5555
margin-left: 0;
56-
padding: 0 0 0 10px;
5756
font-family: Menlo, Consolas, "DejaVu Sans Mono", "Ubuntu Mono", monospace;
5857
word-break: break-all;
5958
}

Resources/branch_main/Sources/parser/TokenVisitor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ final class TokenVisitor: SyntaxRewriter {
107107
StructureProperty(
108108
name: name,
109109
value: StructureValue(
110-
text: "\(value)"
110+
text: "\(value.text)"
111111
.replacingOccurrences(of: " ", with: "")
112112
.replacingOccurrences(of: "\n", with: ""),
113113
kind: "\(value.tokenKind)"

Resources/branch_main/Tests/Tests/Fixtures/test-1-1.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"name": "bindingSpecifier",
160160
"value": {
161161
"kind": "keyword(SwiftSyntax.Keyword.let)",
162-
"text": "let"
162+
"text": "let"
163163
}
164164
},
165165
{
@@ -331,7 +331,7 @@
331331
"name": "identifier",
332332
"value": {
333333
"kind": "identifier("number")",
334-
"text": "number"
334+
"text": "number"
335335
}
336336
},
337337
{
@@ -382,7 +382,7 @@
382382
"name": "equal",
383383
"value": {
384384
"kind": "equal",
385-
"text": "="
385+
"text": "="
386386
}
387387
},
388388
{

Resources/branch_main/Tests/Tests/Fixtures/test-1-2.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"name": "endOfFileToken",
3232
"value": {
3333
"kind": "endOfFile",
34-
"text": "↲↲//␣Prints␣"It's␣really␣warm.␣Don't␣forget␣to␣wear␣sunscreen.""
34+
"text": ""
3535
}
3636
},
3737
{
@@ -159,7 +159,7 @@
159159
"name": "bindingSpecifier",
160160
"value": {
161161
"kind": "keyword(SwiftSyntax.Keyword.var)",
162-
"text": "var"
162+
"text": "var"
163163
}
164164
},
165165
{
@@ -331,7 +331,7 @@
331331
"name": "identifier",
332332
"value": {
333333
"kind": "identifier("temperatureInFahrenheit")",
334-
"text": "temperatureInFahrenheit"
334+
"text": "temperatureInFahrenheit"
335335
}
336336
},
337337
{
@@ -382,7 +382,7 @@
382382
"name": "equal",
383383
"value": {
384384
"kind": "equal",
385-
"text": "="
385+
"text": "="
386386
}
387387
},
388388
{
@@ -575,7 +575,7 @@
575575
"name": "ifKeyword",
576576
"value": {
577577
"kind": "keyword(SwiftSyntax.Keyword.if)",
578-
"text": "↲↲if␣"
578+
"text": "if"
579579
}
580580
},
581581
{
@@ -614,7 +614,7 @@
614614
"name": "elseKeyword",
615615
"value": {
616616
"kind": "keyword(SwiftSyntax.Keyword.else)",
617-
"text": "else"
617+
"text": "else"
618618
}
619619
},
620620
{
@@ -808,7 +808,7 @@
808808
"name": "identifier",
809809
"value": {
810810
"kind": "identifier("temperatureInFahrenheit")",
811-
"text": "temperatureInFahrenheit"
811+
"text": "temperatureInFahrenheit"
812812
}
813813
},
814814
{
@@ -871,7 +871,7 @@
871871
"name": "operator",
872872
"value": {
873873
"kind": "binaryOperator("<=")",
874-
"text": "<="
874+
"text": "<="
875875
}
876876
},
877877
{
@@ -922,7 +922,7 @@
922922
"name": "literal",
923923
"value": {
924924
"kind": "integerLiteral("32")",
925-
"text": "32"
925+
"text": "32"
926926
}
927927
},
928928
{
@@ -999,7 +999,7 @@
999999
"name": "rightBrace",
10001000
"value": {
10011001
"kind": "rightBrace",
1002-
"text": "↲}␣"
1002+
"text": "}"
10031003
}
10041004
},
10051005
{
@@ -1217,7 +1217,7 @@
12171217
"name": "identifier",
12181218
"value": {
12191219
"kind": "identifier("print")",
1220-
"text": "↲␣␣print"
1220+
"text": "print"
12211221
}
12221222
},
12231223
{
@@ -1643,7 +1643,7 @@
16431643
"name": "ifKeyword",
16441644
"value": {
16451645
"kind": "keyword(SwiftSyntax.Keyword.if)",
1646-
"text": "if"
1646+
"text": "if"
16471647
}
16481648
},
16491649
{
@@ -1682,7 +1682,7 @@
16821682
"name": "elseKeyword",
16831683
"value": {
16841684
"kind": "keyword(SwiftSyntax.Keyword.else)",
1685-
"text": "else"
1685+
"text": "else"
16861686
}
16871687
},
16881688
{
@@ -1876,7 +1876,7 @@
18761876
"name": "identifier",
18771877
"value": {
18781878
"kind": "identifier("temperatureInFahrenheit")",
1879-
"text": "temperatureInFahrenheit"
1879+
"text": "temperatureInFahrenheit"
18801880
}
18811881
},
18821882
{
@@ -1939,7 +1939,7 @@
19391939
"name": "operator",
19401940
"value": {
19411941
"kind": "binaryOperator(">=")",
1942-
"text": ">="
1942+
"text": ">="
19431943
}
19441944
},
19451945
{
@@ -1990,7 +1990,7 @@
19901990
"name": "literal",
19911991
"value": {
19921992
"kind": "integerLiteral("86")",
1993-
"text": "86"
1993+
"text": "86"
19941994
}
19951995
},
19961996
{
@@ -2067,7 +2067,7 @@
20672067
"name": "rightBrace",
20682068
"value": {
20692069
"kind": "rightBrace",
2070-
"text": "↲}␣"
2070+
"text": "}"
20712071
}
20722072
},
20732073
{
@@ -2285,7 +2285,7 @@
22852285
"name": "identifier",
22862286
"value": {
22872287
"kind": "identifier("print")",
2288-
"text": "↲␣␣print"
2288+
"text": "print"
22892289
}
22902290
},
22912291
{
@@ -2737,7 +2737,7 @@
27372737
"name": "rightBrace",
27382738
"value": {
27392739
"kind": "rightBrace",
2740-
"text": "}"
2740+
"text": "}"
27412741
}
27422742
},
27432743
{
@@ -2955,7 +2955,7 @@
29552955
"name": "identifier",
29562956
"value": {
29572957
"kind": "identifier("print")",
2958-
"text": "↲␣␣print"
2958+
"text": "print"
29592959
}
29602960
},
29612961
{

0 commit comments

Comments
 (0)