mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-11 12:56:46 +00:00
updates
This commit is contained in:
parent
c57ff43001
commit
fab360bb60
21 changed files with 125 additions and 22 deletions
|
@ -20,11 +20,11 @@ impl Parser {
|
||||||
|
|
||||||
// First pass: collect line offsets
|
// First pass: collect line offsets
|
||||||
for token in self.tokens.tokens() {
|
for token in self.tokens.tokens() {
|
||||||
if token.line() > last_line {
|
if *token.line() > last_line {
|
||||||
if let Some(start) = token.start() {
|
if let Some(start) = token.start() {
|
||||||
line_offsets.add_line(*start as u32);
|
line_offsets.add_line(*start as u32);
|
||||||
}
|
}
|
||||||
last_line = token.line();
|
last_line = *token.line();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,5 +13,7 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 21
|
start: 21
|
||||||
length: 18
|
length: 18
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -69,5 +69,7 @@ nodes:
|
||||||
tag_span:
|
tag_span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 8
|
length: 8
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -52,5 +52,7 @@ nodes:
|
||||||
tag_span:
|
tag_span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 17
|
length: 17
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -32,5 +32,7 @@ nodes:
|
||||||
tag_span:
|
tag_span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 24
|
length: 24
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -16,5 +16,7 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 15
|
length: 15
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -26,5 +26,7 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 35
|
length: 35
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -250,5 +250,19 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 359
|
start: 359
|
||||||
length: 1
|
length: 1
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 39
|
||||||
|
- 81
|
||||||
|
- 116
|
||||||
|
- 159
|
||||||
|
- 184
|
||||||
|
- 231
|
||||||
|
- 273
|
||||||
|
- 289
|
||||||
|
- 309
|
||||||
|
- 326
|
||||||
|
- 337
|
||||||
|
- 347
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -61,5 +61,7 @@ nodes:
|
||||||
tag_span:
|
tag_span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 17
|
length: 17
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -107,6 +107,19 @@ nodes:
|
||||||
tag_span:
|
tag_span:
|
||||||
start: 48
|
start: 48
|
||||||
length: 24
|
length: 24
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 23
|
||||||
|
- 43
|
||||||
|
- 78
|
||||||
|
- 130
|
||||||
|
- 169
|
||||||
|
- 183
|
||||||
|
- 243
|
||||||
|
- 275
|
||||||
|
- 311
|
||||||
|
- 332
|
||||||
|
- 365
|
||||||
errors:
|
errors:
|
||||||
- UnclosedTag: if
|
- UnclosedTag: if
|
||||||
|
|
|
@ -26,6 +26,8 @@ nodes:
|
||||||
tag_span:
|
tag_span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 17
|
length: 17
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors:
|
errors:
|
||||||
- UnclosedTag: for
|
- UnclosedTag: for
|
||||||
|
|
|
@ -21,6 +21,8 @@ nodes:
|
||||||
tag_span:
|
tag_span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 24
|
length: 24
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors:
|
errors:
|
||||||
- UnclosedTag: if
|
- UnclosedTag: if
|
||||||
|
|
|
@ -8,5 +8,7 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 5
|
length: 5
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -8,5 +8,7 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 28
|
length: 28
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -8,5 +8,7 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 27
|
length: 27
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -126,5 +126,36 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 799
|
start: 799
|
||||||
length: 35
|
length: 35
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 15
|
||||||
|
- 22
|
||||||
|
- 33
|
||||||
|
- 65
|
||||||
|
- 96
|
||||||
|
- 133
|
||||||
|
- 150
|
||||||
|
- 190
|
||||||
|
- 214
|
||||||
|
- 240
|
||||||
|
- 269
|
||||||
|
- 297
|
||||||
|
- 312
|
||||||
|
- 330
|
||||||
|
- 342
|
||||||
|
- 353
|
||||||
|
- 385
|
||||||
|
- 450
|
||||||
|
- 493
|
||||||
|
- 531
|
||||||
|
- 604
|
||||||
|
- 643
|
||||||
|
- 682
|
||||||
|
- 709
|
||||||
|
- 747
|
||||||
|
- 775
|
||||||
|
- 799
|
||||||
|
- 814
|
||||||
|
- 826
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -8,5 +8,7 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 15
|
length: 15
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -8,5 +8,7 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 34
|
length: 34
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -8,5 +8,7 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 21
|
length: 21
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -8,5 +8,13 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 142
|
length: 142
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 31
|
||||||
|
- 58
|
||||||
|
- 75
|
||||||
|
- 93
|
||||||
|
- 112
|
||||||
|
- 132
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -8,5 +8,12 @@ nodes:
|
||||||
span:
|
span:
|
||||||
start: 0
|
start: 0
|
||||||
length: 97
|
length: 97
|
||||||
line_offsets: []
|
line_offsets:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 23
|
||||||
|
- 47
|
||||||
|
- 61
|
||||||
|
- 82
|
||||||
|
- 88
|
||||||
errors: []
|
errors: []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue