mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-13 05:46:17 +00:00
update
This commit is contained in:
parent
9d65db2a3a
commit
ab60c40bd1
40 changed files with 534 additions and 1036 deletions
|
@ -3,6 +3,15 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<!-- HTML comment -->"
|
- Text:
|
||||||
- Comment: Django comment
|
content: "<!-- HTML comment -->"
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 21
|
||||||
|
- Comment:
|
||||||
|
content: Django comment
|
||||||
|
span:
|
||||||
|
start: 21
|
||||||
|
length: 18
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 605
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<!-- HTML comment -->"
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 21
|
|
||||||
- Comment:
|
|
||||||
content: Django comment
|
|
||||||
span:
|
|
||||||
start: 21
|
|
||||||
length: 18
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -12,7 +12,11 @@ nodes:
|
||||||
- ">"
|
- ">"
|
||||||
- "0"
|
- "0"
|
||||||
children:
|
children:
|
||||||
- Text: Positive
|
- Text:
|
||||||
|
content: Positive
|
||||||
|
span:
|
||||||
|
start: 14
|
||||||
|
length: 8
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Branch
|
block_type: Branch
|
||||||
name: elif
|
name: elif
|
||||||
|
@ -21,16 +25,49 @@ nodes:
|
||||||
- "<"
|
- "<"
|
||||||
- "0"
|
- "0"
|
||||||
children:
|
children:
|
||||||
- Text: Negative
|
- Text:
|
||||||
|
content: Negative
|
||||||
|
span:
|
||||||
|
start: 38
|
||||||
|
length: 8
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 8
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 8
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Branch
|
block_type: Branch
|
||||||
name: else
|
name: else
|
||||||
bits: []
|
bits: []
|
||||||
children:
|
children:
|
||||||
- Text: Zero
|
- Text:
|
||||||
|
content: Zero
|
||||||
|
span:
|
||||||
|
start: 56
|
||||||
|
length: 4
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 8
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 8
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endif
|
name: endif
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
|
span:
|
||||||
|
start: 60
|
||||||
|
length: 5
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 8
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 65
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 8
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,75 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 524
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- x
|
|
||||||
- ">"
|
|
||||||
- "0"
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: Positive
|
|
||||||
span:
|
|
||||||
start: 14
|
|
||||||
length: 8
|
|
||||||
- Block:
|
|
||||||
block_type: Branch
|
|
||||||
name: elif
|
|
||||||
bits:
|
|
||||||
- x
|
|
||||||
- "<"
|
|
||||||
- "0"
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: Negative
|
|
||||||
span:
|
|
||||||
start: 38
|
|
||||||
length: 8
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 8
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 8
|
|
||||||
- Block:
|
|
||||||
block_type: Branch
|
|
||||||
name: else
|
|
||||||
bits: []
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: Zero
|
|
||||||
span:
|
|
||||||
start: 56
|
|
||||||
length: 4
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 8
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 8
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endif
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 60
|
|
||||||
length: 5
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 8
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 65
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 8
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -16,15 +16,41 @@ nodes:
|
||||||
bits:
|
bits:
|
||||||
- item
|
- item
|
||||||
filters: []
|
filters: []
|
||||||
|
span:
|
||||||
|
start: 23
|
||||||
|
length: 4
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Branch
|
block_type: Branch
|
||||||
name: empty
|
name: empty
|
||||||
bits: []
|
bits: []
|
||||||
children:
|
children:
|
||||||
- Text: No items
|
- Text:
|
||||||
|
content: No items
|
||||||
|
span:
|
||||||
|
start: 44
|
||||||
|
length: 8
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 17
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 17
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endfor
|
name: endfor
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
|
span:
|
||||||
|
start: 52
|
||||||
|
length: 6
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 17
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 58
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 17
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 515
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: for
|
|
||||||
bits:
|
|
||||||
- for
|
|
||||||
- item
|
|
||||||
- in
|
|
||||||
- items
|
|
||||||
children:
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- item
|
|
||||||
filters: []
|
|
||||||
span:
|
|
||||||
start: 23
|
|
||||||
length: 4
|
|
||||||
- Block:
|
|
||||||
block_type: Branch
|
|
||||||
name: empty
|
|
||||||
bits: []
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: No items
|
|
||||||
span:
|
|
||||||
start: 44
|
|
||||||
length: 8
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 17
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 17
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endfor
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 52
|
|
||||||
length: 6
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 17
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 58
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 17
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -10,10 +10,27 @@ nodes:
|
||||||
- if
|
- if
|
||||||
- user.is_authenticated
|
- user.is_authenticated
|
||||||
children:
|
children:
|
||||||
- Text: Welcome
|
- Text:
|
||||||
|
content: Welcome
|
||||||
|
span:
|
||||||
|
start: 30
|
||||||
|
length: 7
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endif
|
name: endif
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
|
span:
|
||||||
|
start: 37
|
||||||
|
length: 5
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 24
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 42
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 24
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 506
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- user.is_authenticated
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: Welcome
|
|
||||||
span:
|
|
||||||
start: 30
|
|
||||||
length: 7
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endif
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 37
|
|
||||||
length: 5
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 24
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 42
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 24
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -10,4 +10,11 @@ nodes:
|
||||||
filters:
|
filters:
|
||||||
- name: title
|
- name: title
|
||||||
arguments: []
|
arguments: []
|
||||||
|
span:
|
||||||
|
start: 10
|
||||||
|
length: 5
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 15
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 488
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- user
|
|
||||||
- name
|
|
||||||
filters:
|
|
||||||
- name: title
|
|
||||||
arguments: []
|
|
||||||
span:
|
|
||||||
start: 10
|
|
||||||
length: 5
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 15
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -10,8 +10,21 @@ nodes:
|
||||||
- name: default
|
- name: default
|
||||||
arguments:
|
arguments:
|
||||||
- "'nothing'"
|
- "'nothing'"
|
||||||
|
span:
|
||||||
|
start: 6
|
||||||
|
length: 17
|
||||||
- name: title
|
- name: title
|
||||||
arguments: []
|
arguments: []
|
||||||
|
span:
|
||||||
|
start: 24
|
||||||
|
length: 5
|
||||||
- name: upper
|
- name: upper
|
||||||
arguments: []
|
arguments: []
|
||||||
|
span:
|
||||||
|
start: 30
|
||||||
|
length: 5
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 35
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 497
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- value
|
|
||||||
filters:
|
|
||||||
- name: default
|
|
||||||
arguments:
|
|
||||||
- "'nothing'"
|
|
||||||
span:
|
|
||||||
start: 6
|
|
||||||
length: 17
|
|
||||||
- name: title
|
|
||||||
arguments: []
|
|
||||||
span:
|
|
||||||
start: 24
|
|
||||||
length: 5
|
|
||||||
- name: upper
|
|
||||||
arguments: []
|
|
||||||
span:
|
|
||||||
start: 30
|
|
||||||
length: 5
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 35
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,7 +3,11 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "Welcome, "
|
- Text:
|
||||||
|
content: "Welcome, "
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 9
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Standard
|
block_type: Standard
|
||||||
name: if
|
name: if
|
||||||
|
@ -11,7 +15,11 @@ nodes:
|
||||||
- if
|
- if
|
||||||
- user.is_authenticated
|
- user.is_authenticated
|
||||||
children:
|
children:
|
||||||
- Text: "\n "
|
- Text:
|
||||||
|
content: "\n "
|
||||||
|
span:
|
||||||
|
start: 39
|
||||||
|
length: 5
|
||||||
- Variable:
|
- Variable:
|
||||||
bits:
|
bits:
|
||||||
- user
|
- user
|
||||||
|
@ -19,10 +27,23 @@ nodes:
|
||||||
filters:
|
filters:
|
||||||
- name: title
|
- name: title
|
||||||
arguments: []
|
arguments: []
|
||||||
|
span:
|
||||||
|
start: 54
|
||||||
|
length: 5
|
||||||
- name: default
|
- name: default
|
||||||
arguments:
|
arguments:
|
||||||
- "'Guest'"
|
- "'Guest'"
|
||||||
- Text: "\n "
|
span:
|
||||||
|
start: 60
|
||||||
|
length: 15
|
||||||
|
span:
|
||||||
|
start: 44
|
||||||
|
length: 31
|
||||||
|
- Text:
|
||||||
|
content: "\n "
|
||||||
|
span:
|
||||||
|
start: 81
|
||||||
|
length: 5
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Standard
|
block_type: Standard
|
||||||
name: for
|
name: for
|
||||||
|
@ -32,7 +53,11 @@ nodes:
|
||||||
- in
|
- in
|
||||||
- user.groups
|
- user.groups
|
||||||
children:
|
children:
|
||||||
- Text: "\n "
|
- Text:
|
||||||
|
content: "\n "
|
||||||
|
span:
|
||||||
|
start: 116
|
||||||
|
length: 9
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Standard
|
block_type: Standard
|
||||||
name: if
|
name: if
|
||||||
|
@ -40,19 +65,46 @@ nodes:
|
||||||
- if
|
- if
|
||||||
- forloop.first
|
- forloop.first
|
||||||
children:
|
children:
|
||||||
- Text: (
|
- Text:
|
||||||
|
content: (
|
||||||
|
span:
|
||||||
|
start: 147
|
||||||
|
length: 1
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endif
|
name: endif
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
- Text: "\n "
|
span:
|
||||||
|
start: 148
|
||||||
|
length: 5
|
||||||
|
tag_span:
|
||||||
|
start: 125
|
||||||
|
length: 16
|
||||||
|
span:
|
||||||
|
start: 125
|
||||||
|
length: 28
|
||||||
|
tag_span:
|
||||||
|
start: 125
|
||||||
|
length: 16
|
||||||
|
- Text:
|
||||||
|
content: "\n "
|
||||||
|
span:
|
||||||
|
start: 159
|
||||||
|
length: 9
|
||||||
- Variable:
|
- Variable:
|
||||||
bits:
|
bits:
|
||||||
- group
|
- group
|
||||||
- name
|
- name
|
||||||
filters: []
|
filters: []
|
||||||
- Text: "\n "
|
span:
|
||||||
|
start: 168
|
||||||
|
length: 10
|
||||||
|
- Text:
|
||||||
|
content: "\n "
|
||||||
|
span:
|
||||||
|
start: 184
|
||||||
|
length: 9
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Standard
|
block_type: Standard
|
||||||
name: if
|
name: if
|
||||||
|
@ -61,13 +113,33 @@ nodes:
|
||||||
- not
|
- not
|
||||||
- forloop.last
|
- forloop.last
|
||||||
children:
|
children:
|
||||||
- Text: ", "
|
- Text:
|
||||||
|
content: ", "
|
||||||
|
span:
|
||||||
|
start: 218
|
||||||
|
length: 2
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endif
|
name: endif
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
- Text: "\n "
|
span:
|
||||||
|
start: 220
|
||||||
|
length: 5
|
||||||
|
tag_span:
|
||||||
|
start: 193
|
||||||
|
length: 19
|
||||||
|
span:
|
||||||
|
start: 193
|
||||||
|
length: 32
|
||||||
|
tag_span:
|
||||||
|
start: 193
|
||||||
|
length: 19
|
||||||
|
- Text:
|
||||||
|
content: "\n "
|
||||||
|
span:
|
||||||
|
start: 231
|
||||||
|
length: 9
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Standard
|
block_type: Standard
|
||||||
name: if
|
name: if
|
||||||
|
@ -75,35 +147,108 @@ nodes:
|
||||||
- if
|
- if
|
||||||
- forloop.last
|
- forloop.last
|
||||||
children:
|
children:
|
||||||
- Text: )
|
- Text:
|
||||||
|
content: )
|
||||||
|
span:
|
||||||
|
start: 261
|
||||||
|
length: 1
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endif
|
name: endif
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
- Text: "\n "
|
span:
|
||||||
|
start: 262
|
||||||
|
length: 5
|
||||||
|
tag_span:
|
||||||
|
start: 240
|
||||||
|
length: 15
|
||||||
|
span:
|
||||||
|
start: 240
|
||||||
|
length: 27
|
||||||
|
tag_span:
|
||||||
|
start: 240
|
||||||
|
length: 15
|
||||||
|
- Text:
|
||||||
|
content: "\n "
|
||||||
|
span:
|
||||||
|
start: 273
|
||||||
|
length: 5
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Branch
|
block_type: Branch
|
||||||
name: empty
|
name: empty
|
||||||
bits: []
|
bits: []
|
||||||
children:
|
children:
|
||||||
- Text: "\n (no groups)\n "
|
- Text:
|
||||||
|
content: "\n (no groups)\n "
|
||||||
|
span:
|
||||||
|
start: 289
|
||||||
|
length: 25
|
||||||
|
span:
|
||||||
|
start: 86
|
||||||
|
length: 24
|
||||||
|
tag_span:
|
||||||
|
start: 86
|
||||||
|
length: 24
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endfor
|
name: endfor
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
- Text: "\n"
|
span:
|
||||||
|
start: 314
|
||||||
|
length: 6
|
||||||
|
tag_span:
|
||||||
|
start: 86
|
||||||
|
length: 24
|
||||||
|
span:
|
||||||
|
start: 86
|
||||||
|
length: 234
|
||||||
|
tag_span:
|
||||||
|
start: 86
|
||||||
|
length: 24
|
||||||
|
- Text:
|
||||||
|
content: "\n"
|
||||||
|
span:
|
||||||
|
start: 326
|
||||||
|
length: 1
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Branch
|
block_type: Branch
|
||||||
name: else
|
name: else
|
||||||
bits: []
|
bits: []
|
||||||
children:
|
children:
|
||||||
- Text: "\n Guest\n"
|
- Text:
|
||||||
|
content: "\n Guest\n"
|
||||||
|
span:
|
||||||
|
start: 337
|
||||||
|
length: 11
|
||||||
|
span:
|
||||||
|
start: 9
|
||||||
|
length: 24
|
||||||
|
tag_span:
|
||||||
|
start: 9
|
||||||
|
length: 24
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endif
|
name: endif
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
- Text: "!"
|
span:
|
||||||
|
start: 348
|
||||||
|
length: 5
|
||||||
|
tag_span:
|
||||||
|
start: 9
|
||||||
|
length: 24
|
||||||
|
span:
|
||||||
|
start: 9
|
||||||
|
length: 344
|
||||||
|
tag_span:
|
||||||
|
start: 9
|
||||||
|
length: 24
|
||||||
|
- Text:
|
||||||
|
content: "!"
|
||||||
|
span:
|
||||||
|
start: 359
|
||||||
|
length: 1
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,256 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 555
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "Welcome, "
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 9
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- user.is_authenticated
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 39
|
|
||||||
length: 5
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- user
|
|
||||||
- name
|
|
||||||
filters:
|
|
||||||
- name: title
|
|
||||||
arguments: []
|
|
||||||
span:
|
|
||||||
start: 54
|
|
||||||
length: 5
|
|
||||||
- name: default
|
|
||||||
arguments:
|
|
||||||
- "'Guest'"
|
|
||||||
span:
|
|
||||||
start: 60
|
|
||||||
length: 15
|
|
||||||
span:
|
|
||||||
start: 44
|
|
||||||
length: 31
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 81
|
|
||||||
length: 5
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: for
|
|
||||||
bits:
|
|
||||||
- for
|
|
||||||
- group
|
|
||||||
- in
|
|
||||||
- user.groups
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 116
|
|
||||||
length: 9
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- forloop.first
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: (
|
|
||||||
span:
|
|
||||||
start: 147
|
|
||||||
length: 1
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endif
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 148
|
|
||||||
length: 5
|
|
||||||
tag_span:
|
|
||||||
start: 125
|
|
||||||
length: 16
|
|
||||||
span:
|
|
||||||
start: 125
|
|
||||||
length: 28
|
|
||||||
tag_span:
|
|
||||||
start: 125
|
|
||||||
length: 16
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 159
|
|
||||||
length: 9
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- group
|
|
||||||
- name
|
|
||||||
filters: []
|
|
||||||
span:
|
|
||||||
start: 168
|
|
||||||
length: 10
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 184
|
|
||||||
length: 9
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- not
|
|
||||||
- forloop.last
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: ", "
|
|
||||||
span:
|
|
||||||
start: 218
|
|
||||||
length: 2
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endif
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 220
|
|
||||||
length: 5
|
|
||||||
tag_span:
|
|
||||||
start: 193
|
|
||||||
length: 19
|
|
||||||
span:
|
|
||||||
start: 193
|
|
||||||
length: 32
|
|
||||||
tag_span:
|
|
||||||
start: 193
|
|
||||||
length: 19
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 231
|
|
||||||
length: 9
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- forloop.last
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: )
|
|
||||||
span:
|
|
||||||
start: 261
|
|
||||||
length: 1
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endif
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 262
|
|
||||||
length: 5
|
|
||||||
tag_span:
|
|
||||||
start: 240
|
|
||||||
length: 15
|
|
||||||
span:
|
|
||||||
start: 240
|
|
||||||
length: 27
|
|
||||||
tag_span:
|
|
||||||
start: 240
|
|
||||||
length: 15
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 273
|
|
||||||
length: 5
|
|
||||||
- Block:
|
|
||||||
block_type: Branch
|
|
||||||
name: empty
|
|
||||||
bits: []
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: "\n (no groups)\n "
|
|
||||||
span:
|
|
||||||
start: 289
|
|
||||||
length: 25
|
|
||||||
span:
|
|
||||||
start: 86
|
|
||||||
length: 24
|
|
||||||
tag_span:
|
|
||||||
start: 86
|
|
||||||
length: 24
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endfor
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 314
|
|
||||||
length: 6
|
|
||||||
tag_span:
|
|
||||||
start: 86
|
|
||||||
length: 24
|
|
||||||
span:
|
|
||||||
start: 86
|
|
||||||
length: 234
|
|
||||||
tag_span:
|
|
||||||
start: 86
|
|
||||||
length: 24
|
|
||||||
- Text:
|
|
||||||
content: "\n"
|
|
||||||
span:
|
|
||||||
start: 326
|
|
||||||
length: 1
|
|
||||||
- Block:
|
|
||||||
block_type: Branch
|
|
||||||
name: else
|
|
||||||
bits: []
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: "\n Guest\n"
|
|
||||||
span:
|
|
||||||
start: 337
|
|
||||||
length: 11
|
|
||||||
span:
|
|
||||||
start: 9
|
|
||||||
length: 24
|
|
||||||
tag_span:
|
|
||||||
start: 9
|
|
||||||
length: 24
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endif
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 348
|
|
||||||
length: 5
|
|
||||||
tag_span:
|
|
||||||
start: 9
|
|
||||||
length: 24
|
|
||||||
span:
|
|
||||||
start: 9
|
|
||||||
length: 344
|
|
||||||
tag_span:
|
|
||||||
start: 9
|
|
||||||
length: 24
|
|
||||||
- Text:
|
|
||||||
content: "!"
|
|
||||||
span:
|
|
||||||
start: 359
|
|
||||||
length: 1
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -24,14 +24,42 @@ nodes:
|
||||||
- item
|
- item
|
||||||
- name
|
- name
|
||||||
filters: []
|
filters: []
|
||||||
|
span:
|
||||||
|
start: 43
|
||||||
|
length: 9
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endif
|
name: endif
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
|
span:
|
||||||
|
start: 58
|
||||||
|
length: 5
|
||||||
|
tag_span:
|
||||||
|
start: 23
|
||||||
|
length: 14
|
||||||
|
span:
|
||||||
|
start: 23
|
||||||
|
length: 40
|
||||||
|
tag_span:
|
||||||
|
start: 23
|
||||||
|
length: 14
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endfor
|
name: endfor
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
|
span:
|
||||||
|
start: 69
|
||||||
|
length: 6
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 17
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 75
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 17
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 534
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: for
|
|
||||||
bits:
|
|
||||||
- for
|
|
||||||
- item
|
|
||||||
- in
|
|
||||||
- items
|
|
||||||
children:
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- item.active
|
|
||||||
children:
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- item
|
|
||||||
- name
|
|
||||||
filters: []
|
|
||||||
span:
|
|
||||||
start: 43
|
|
||||||
length: 9
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endif
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 58
|
|
||||||
length: 5
|
|
||||||
tag_span:
|
|
||||||
start: 23
|
|
||||||
length: 14
|
|
||||||
span:
|
|
||||||
start: 23
|
|
||||||
length: 40
|
|
||||||
tag_span:
|
|
||||||
start: 23
|
|
||||||
length: 14
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endfor
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 69
|
|
||||||
length: 6
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 17
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 75
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 17
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,7 +3,11 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<div class=\"container\">\n <h1>Header</h1>\n "
|
- Text:
|
||||||
|
content: "<div class=\"container\">\n <h1>Header</h1>\n "
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 48
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Standard
|
block_type: Standard
|
||||||
name: if
|
name: if
|
||||||
|
@ -11,17 +15,44 @@ nodes:
|
||||||
- if
|
- if
|
||||||
- user.is_authenticated
|
- user.is_authenticated
|
||||||
children:
|
children:
|
||||||
- Text: "\n "
|
- Text:
|
||||||
- Comment: This if is unclosed which does matter
|
content: "\n "
|
||||||
- Text: "\n <p>Welcome "
|
span:
|
||||||
|
start: 78
|
||||||
|
length: 9
|
||||||
|
- Comment:
|
||||||
|
content: This if is unclosed which does matter
|
||||||
|
span:
|
||||||
|
start: 87
|
||||||
|
length: 41
|
||||||
|
- Text:
|
||||||
|
content: "\n <p>Welcome "
|
||||||
|
span:
|
||||||
|
start: 130
|
||||||
|
length: 20
|
||||||
- Variable:
|
- Variable:
|
||||||
bits:
|
bits:
|
||||||
- user
|
- user
|
||||||
- name
|
- name
|
||||||
filters: []
|
filters: []
|
||||||
- Text: "</p>\n <div>\n "
|
span:
|
||||||
- Comment: "This div is unclosed which doesn't matter"
|
start: 150
|
||||||
- Text: "\n "
|
length: 9
|
||||||
|
- Text:
|
||||||
|
content: "</p>\n <div>\n "
|
||||||
|
span:
|
||||||
|
start: 165
|
||||||
|
length: 31
|
||||||
|
- Comment:
|
||||||
|
content: "This div is unclosed which doesn't matter"
|
||||||
|
span:
|
||||||
|
start: 196
|
||||||
|
length: 45
|
||||||
|
- Text:
|
||||||
|
content: "\n "
|
||||||
|
span:
|
||||||
|
start: 243
|
||||||
|
length: 9
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Standard
|
block_type: Standard
|
||||||
name: for
|
name: for
|
||||||
|
@ -31,17 +62,51 @@ nodes:
|
||||||
- in
|
- in
|
||||||
- items
|
- items
|
||||||
children:
|
children:
|
||||||
- Text: "\n <span>"
|
- Text:
|
||||||
|
content: "\n <span>"
|
||||||
|
span:
|
||||||
|
start: 275
|
||||||
|
length: 19
|
||||||
- Variable:
|
- Variable:
|
||||||
bits:
|
bits:
|
||||||
- item
|
- item
|
||||||
filters: []
|
filters: []
|
||||||
- Text: "</span>\n "
|
span:
|
||||||
|
start: 294
|
||||||
|
length: 4
|
||||||
|
- Text:
|
||||||
|
content: "</span>\n "
|
||||||
|
span:
|
||||||
|
start: 304
|
||||||
|
length: 16
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endfor
|
name: endfor
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
- Text: "\n <footer>Page Footer</footer>\n</div>"
|
span:
|
||||||
|
start: 320
|
||||||
|
length: 6
|
||||||
|
tag_span:
|
||||||
|
start: 252
|
||||||
|
length: 17
|
||||||
|
span:
|
||||||
|
start: 252
|
||||||
|
length: 74
|
||||||
|
tag_span:
|
||||||
|
start: 252
|
||||||
|
length: 17
|
||||||
|
- Text:
|
||||||
|
content: "\n <footer>Page Footer</footer>\n</div>"
|
||||||
|
span:
|
||||||
|
start: 332
|
||||||
|
length: 40
|
||||||
|
span:
|
||||||
|
start: 48
|
||||||
|
length: 24
|
||||||
|
tag_span:
|
||||||
|
start: 48
|
||||||
|
length: 24
|
||||||
|
line_offsets: []
|
||||||
errors:
|
errors:
|
||||||
- UnclosedTag: if
|
- UnclosedTag: if
|
||||||
|
|
|
@ -1,114 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 681
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<div class=\"container\">\n <h1>Header</h1>\n "
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 48
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- user.is_authenticated
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 78
|
|
||||||
length: 9
|
|
||||||
- Comment:
|
|
||||||
content: This if is unclosed which does matter
|
|
||||||
span:
|
|
||||||
start: 87
|
|
||||||
length: 41
|
|
||||||
- Text:
|
|
||||||
content: "\n <p>Welcome "
|
|
||||||
span:
|
|
||||||
start: 130
|
|
||||||
length: 20
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- user
|
|
||||||
- name
|
|
||||||
filters: []
|
|
||||||
span:
|
|
||||||
start: 150
|
|
||||||
length: 9
|
|
||||||
- Text:
|
|
||||||
content: "</p>\n <div>\n "
|
|
||||||
span:
|
|
||||||
start: 165
|
|
||||||
length: 31
|
|
||||||
- Comment:
|
|
||||||
content: "This div is unclosed which doesn't matter"
|
|
||||||
span:
|
|
||||||
start: 196
|
|
||||||
length: 45
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 243
|
|
||||||
length: 9
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: for
|
|
||||||
bits:
|
|
||||||
- for
|
|
||||||
- item
|
|
||||||
- in
|
|
||||||
- items
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: "\n <span>"
|
|
||||||
span:
|
|
||||||
start: 275
|
|
||||||
length: 19
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- item
|
|
||||||
filters: []
|
|
||||||
span:
|
|
||||||
start: 294
|
|
||||||
length: 4
|
|
||||||
- Text:
|
|
||||||
content: "</span>\n "
|
|
||||||
span:
|
|
||||||
start: 304
|
|
||||||
length: 16
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endfor
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 320
|
|
||||||
length: 6
|
|
||||||
tag_span:
|
|
||||||
start: 252
|
|
||||||
length: 17
|
|
||||||
span:
|
|
||||||
start: 252
|
|
||||||
length: 74
|
|
||||||
tag_span:
|
|
||||||
start: 252
|
|
||||||
length: 17
|
|
||||||
- Text:
|
|
||||||
content: "\n <footer>Page Footer</footer>\n</div>"
|
|
||||||
span:
|
|
||||||
start: 332
|
|
||||||
length: 40
|
|
||||||
span:
|
|
||||||
start: 48
|
|
||||||
length: 24
|
|
||||||
tag_span:
|
|
||||||
start: 48
|
|
||||||
length: 24
|
|
||||||
line_offsets: []
|
|
||||||
errors:
|
|
||||||
- UnclosedTag: if
|
|
|
@ -17,5 +17,15 @@ nodes:
|
||||||
- item
|
- item
|
||||||
- name
|
- name
|
||||||
filters: []
|
filters: []
|
||||||
|
span:
|
||||||
|
start: 23
|
||||||
|
length: 9
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 17
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 17
|
||||||
|
line_offsets: []
|
||||||
errors:
|
errors:
|
||||||
- UnclosedTag: for
|
- UnclosedTag: for
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 639
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: for
|
|
||||||
bits:
|
|
||||||
- for
|
|
||||||
- item
|
|
||||||
- in
|
|
||||||
- items
|
|
||||||
children:
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- item
|
|
||||||
- name
|
|
||||||
filters: []
|
|
||||||
span:
|
|
||||||
start: 23
|
|
||||||
length: 9
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 17
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 17
|
|
||||||
line_offsets: []
|
|
||||||
errors:
|
|
||||||
- UnclosedTag: for
|
|
|
@ -10,6 +10,17 @@ nodes:
|
||||||
- if
|
- if
|
||||||
- user.is_authenticated
|
- user.is_authenticated
|
||||||
children:
|
children:
|
||||||
- Text: Welcome
|
- Text:
|
||||||
|
content: Welcome
|
||||||
|
span:
|
||||||
|
start: 30
|
||||||
|
length: 7
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 24
|
||||||
|
tag_span:
|
||||||
|
start: 0
|
||||||
|
length: 24
|
||||||
|
line_offsets: []
|
||||||
errors:
|
errors:
|
||||||
- UnclosedTag: if
|
- UnclosedTag: if
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 628
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- user.is_authenticated
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: Welcome
|
|
||||||
span:
|
|
||||||
start: 30
|
|
||||||
length: 7
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 24
|
|
||||||
tag_span:
|
|
||||||
start: 0
|
|
||||||
length: 24
|
|
||||||
line_offsets: []
|
|
||||||
errors:
|
|
||||||
- UnclosedTag: if
|
|
|
@ -3,5 +3,10 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<div>"
|
- Text:
|
||||||
|
content: "<div>"
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 5
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 618
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<div>"
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 5
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,5 +3,10 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<script>console.log('test');"
|
- Text:
|
||||||
|
content: "<script>console.log('test');"
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 28
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 650
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<script>console.log('test');"
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 28
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,5 +3,10 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<style>body { color: blue; "
|
- Text:
|
||||||
|
content: "<style>body { color: blue; "
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 27
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 660
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<style>body { color: blue; "
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 27
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,7 +3,11 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<!DOCTYPE html>\n<html>\n <head>\n <style type=\"text/css\">\n /* Style header */\n .header { color: blue; }\n </style>\n <script type=\"text/javascript\">\n // Init app\n const app = {\n /* Config */\n debug: true\n };\n </script>\n </head>\n <body>\n <!-- Header section -->\n <div class=\"header\" id=\"main\" data-value=\"123\" disabled>\n "
|
- Text:
|
||||||
|
content: "<!DOCTYPE html>\n<html>\n <head>\n <style type=\"text/css\">\n /* Style header */\n .header { color: blue; }\n </style>\n <script type=\"text/javascript\">\n // Init app\n const app = {\n /* Config */\n debug: true\n };\n </script>\n </head>\n <body>\n <!-- Header section -->\n <div class=\"header\" id=\"main\" data-value=\"123\" disabled>\n "
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 463
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Standard
|
block_type: Standard
|
||||||
name: if
|
name: if
|
||||||
|
@ -11,9 +15,21 @@ nodes:
|
||||||
- if
|
- if
|
||||||
- user.is_authenticated
|
- user.is_authenticated
|
||||||
children:
|
children:
|
||||||
- Text: "\n "
|
- Text:
|
||||||
- Comment: Welcome message
|
content: "\n "
|
||||||
- Text: "\n <h1>Welcome, "
|
span:
|
||||||
|
start: 493
|
||||||
|
length: 17
|
||||||
|
- Comment:
|
||||||
|
content: Welcome message
|
||||||
|
span:
|
||||||
|
start: 510
|
||||||
|
length: 19
|
||||||
|
- Text:
|
||||||
|
content: "\n <h1>Welcome, "
|
||||||
|
span:
|
||||||
|
start: 531
|
||||||
|
length: 30
|
||||||
- Variable:
|
- Variable:
|
||||||
bits:
|
bits:
|
||||||
- user
|
- user
|
||||||
|
@ -21,10 +37,23 @@ nodes:
|
||||||
filters:
|
filters:
|
||||||
- name: title
|
- name: title
|
||||||
arguments: []
|
arguments: []
|
||||||
|
span:
|
||||||
|
start: 571
|
||||||
|
length: 5
|
||||||
- name: default
|
- name: default
|
||||||
arguments:
|
arguments:
|
||||||
- "'Guest'"
|
- "'Guest'"
|
||||||
- Text: "!</h1>\n "
|
span:
|
||||||
|
start: 577
|
||||||
|
length: 15
|
||||||
|
span:
|
||||||
|
start: 561
|
||||||
|
length: 31
|
||||||
|
- Text:
|
||||||
|
content: "!</h1>\n "
|
||||||
|
span:
|
||||||
|
start: 598
|
||||||
|
length: 23
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Standard
|
block_type: Standard
|
||||||
name: if
|
name: if
|
||||||
|
@ -32,23 +61,70 @@ nodes:
|
||||||
- if
|
- if
|
||||||
- user.is_staff
|
- user.is_staff
|
||||||
children:
|
children:
|
||||||
- Text: "\n <span>Admin</span>\n "
|
- Text:
|
||||||
|
content: "\n <span>Admin</span>\n "
|
||||||
|
span:
|
||||||
|
start: 643
|
||||||
|
length: 56
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Branch
|
block_type: Branch
|
||||||
name: else
|
name: else
|
||||||
bits: []
|
bits: []
|
||||||
children:
|
children:
|
||||||
- Text: "\n <span>User</span>\n "
|
- Text:
|
||||||
|
content: "\n <span>User</span>\n "
|
||||||
|
span:
|
||||||
|
start: 709
|
||||||
|
length: 55
|
||||||
|
span:
|
||||||
|
start: 621
|
||||||
|
length: 16
|
||||||
|
tag_span:
|
||||||
|
start: 621
|
||||||
|
length: 16
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endif
|
name: endif
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
- Text: "\n "
|
span:
|
||||||
|
start: 764
|
||||||
|
length: 5
|
||||||
|
tag_span:
|
||||||
|
start: 621
|
||||||
|
length: 16
|
||||||
|
span:
|
||||||
|
start: 621
|
||||||
|
length: 148
|
||||||
|
tag_span:
|
||||||
|
start: 621
|
||||||
|
length: 16
|
||||||
|
- Text:
|
||||||
|
content: "\n "
|
||||||
|
span:
|
||||||
|
start: 775
|
||||||
|
length: 13
|
||||||
- Block:
|
- Block:
|
||||||
block_type: Closing
|
block_type: Closing
|
||||||
name: endif
|
name: endif
|
||||||
bits: []
|
bits: []
|
||||||
children: ~
|
children: ~
|
||||||
- Text: "\n </div>\n </body>\n</html>"
|
span:
|
||||||
|
start: 788
|
||||||
|
length: 5
|
||||||
|
tag_span:
|
||||||
|
start: 463
|
||||||
|
length: 24
|
||||||
|
span:
|
||||||
|
start: 463
|
||||||
|
length: 330
|
||||||
|
tag_span:
|
||||||
|
start: 463
|
||||||
|
length: 24
|
||||||
|
- Text:
|
||||||
|
content: "\n </div>\n </body>\n</html>"
|
||||||
|
span:
|
||||||
|
start: 799
|
||||||
|
length: 35
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,132 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 725
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<!DOCTYPE html>\n<html>\n <head>\n <style type=\"text/css\">\n /* Style header */\n .header { color: blue; }\n </style>\n <script type=\"text/javascript\">\n // Init app\n const app = {\n /* Config */\n debug: true\n };\n </script>\n </head>\n <body>\n <!-- Header section -->\n <div class=\"header\" id=\"main\" data-value=\"123\" disabled>\n "
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 463
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- user.is_authenticated
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 493
|
|
||||||
length: 17
|
|
||||||
- Comment:
|
|
||||||
content: Welcome message
|
|
||||||
span:
|
|
||||||
start: 510
|
|
||||||
length: 19
|
|
||||||
- Text:
|
|
||||||
content: "\n <h1>Welcome, "
|
|
||||||
span:
|
|
||||||
start: 531
|
|
||||||
length: 30
|
|
||||||
- Variable:
|
|
||||||
bits:
|
|
||||||
- user
|
|
||||||
- name
|
|
||||||
filters:
|
|
||||||
- name: title
|
|
||||||
arguments: []
|
|
||||||
span:
|
|
||||||
start: 571
|
|
||||||
length: 5
|
|
||||||
- name: default
|
|
||||||
arguments:
|
|
||||||
- "'Guest'"
|
|
||||||
span:
|
|
||||||
start: 577
|
|
||||||
length: 15
|
|
||||||
span:
|
|
||||||
start: 561
|
|
||||||
length: 31
|
|
||||||
- Text:
|
|
||||||
content: "!</h1>\n "
|
|
||||||
span:
|
|
||||||
start: 598
|
|
||||||
length: 23
|
|
||||||
- Block:
|
|
||||||
block_type: Standard
|
|
||||||
name: if
|
|
||||||
bits:
|
|
||||||
- if
|
|
||||||
- user.is_staff
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: "\n <span>Admin</span>\n "
|
|
||||||
span:
|
|
||||||
start: 643
|
|
||||||
length: 56
|
|
||||||
- Block:
|
|
||||||
block_type: Branch
|
|
||||||
name: else
|
|
||||||
bits: []
|
|
||||||
children:
|
|
||||||
- Text:
|
|
||||||
content: "\n <span>User</span>\n "
|
|
||||||
span:
|
|
||||||
start: 709
|
|
||||||
length: 55
|
|
||||||
span:
|
|
||||||
start: 621
|
|
||||||
length: 16
|
|
||||||
tag_span:
|
|
||||||
start: 621
|
|
||||||
length: 16
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endif
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 764
|
|
||||||
length: 5
|
|
||||||
tag_span:
|
|
||||||
start: 621
|
|
||||||
length: 16
|
|
||||||
span:
|
|
||||||
start: 621
|
|
||||||
length: 148
|
|
||||||
tag_span:
|
|
||||||
start: 621
|
|
||||||
length: 16
|
|
||||||
- Text:
|
|
||||||
content: "\n "
|
|
||||||
span:
|
|
||||||
start: 775
|
|
||||||
length: 13
|
|
||||||
- Block:
|
|
||||||
block_type: Closing
|
|
||||||
name: endif
|
|
||||||
bits: []
|
|
||||||
children: ~
|
|
||||||
span:
|
|
||||||
start: 788
|
|
||||||
length: 5
|
|
||||||
tag_span:
|
|
||||||
start: 463
|
|
||||||
length: 24
|
|
||||||
span:
|
|
||||||
start: 463
|
|
||||||
length: 330
|
|
||||||
tag_span:
|
|
||||||
start: 463
|
|
||||||
length: 24
|
|
||||||
- Text:
|
|
||||||
content: "\n </div>\n </body>\n</html>"
|
|
||||||
span:
|
|
||||||
start: 799
|
|
||||||
length: 35
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,5 +3,10 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<!DOCTYPE html>"
|
- Text:
|
||||||
|
content: "<!DOCTYPE html>"
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 15
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 457
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<!DOCTYPE html>"
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 15
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,5 +3,10 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<div class=\"container\">Hello</div>"
|
- Text:
|
||||||
|
content: "<div class=\"container\">Hello</div>"
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 34
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 466
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<div class=\"container\">Hello</div>"
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 34
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,5 +3,10 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<input type=\"text\" />"
|
- Text:
|
||||||
|
content: "<input type=\"text\" />"
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 21
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 475
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<input type=\"text\" />"
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 21
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,5 +3,10 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<script type=\"text/javascript\">\n // Single line comment\n const x = 1;\n /* Multi-line\n comment */\n console.log(x);\n</script>"
|
- Text:
|
||||||
|
content: "<script type=\"text/javascript\">\n // Single line comment\n const x = 1;\n /* Multi-line\n comment */\n console.log(x);\n</script>"
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 142
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 574
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<script type=\"text/javascript\">\n // Single line comment\n const x = 1;\n /* Multi-line\n comment */\n console.log(x);\n</script>"
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 142
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
|
@ -3,5 +3,10 @@ source: crates/djls-template-ast/src/parser.rs
|
||||||
expression: ast
|
expression: ast
|
||||||
---
|
---
|
||||||
nodes:
|
nodes:
|
||||||
- Text: "<style type=\"text/css\">\n /* Header styles */\n .header {\n color: blue;\n }\n</style>"
|
- Text:
|
||||||
|
content: "<style type=\"text/css\">\n /* Header styles */\n .header {\n color: blue;\n }\n</style>"
|
||||||
|
span:
|
||||||
|
start: 0
|
||||||
|
length: 97
|
||||||
|
line_offsets: []
|
||||||
errors: []
|
errors: []
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/djls-template-ast/src/parser.rs
|
|
||||||
assertion_line: 592
|
|
||||||
expression: ast
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
nodes:
|
|
||||||
- Text:
|
|
||||||
content: "<style type=\"text/css\">\n /* Header styles */\n .header {\n color: blue;\n }\n</style>"
|
|
||||||
span:
|
|
||||||
start: 0
|
|
||||||
length: 97
|
|
||||||
line_offsets: []
|
|
||||||
errors: []
|
|
Loading…
Add table
Add a link
Reference in a new issue