-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed incorrect lexer position reports (#630)
- Loading branch information
Showing
14 changed files
with
212 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{} | ||
--- | ||
{{ 42e+ }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{} | ||
--- | ||
{% raw %}this raw block is missing an end tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{} | ||
--- | ||
{{ 10234237582375823572357238572385723582375827582375238572385723857238572385723523758 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{} | ||
--- | ||
{{ foo @ }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{} | ||
--- | ||
{{ "this string is missing a closing quote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
minijinja/tests/snapshots/test_templates__vm@err_partial_float.txt.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
source: minijinja/tests/test_templates.rs | ||
description: "{{ 42e+ }}" | ||
info: {} | ||
input_file: minijinja/tests/inputs/err_partial_float.txt | ||
--- | ||
!!!SYNTAX ERROR!!! | ||
|
||
Error { | ||
kind: SyntaxError, | ||
detail: "invalid float", | ||
name: "err_partial_float.txt", | ||
line: 1, | ||
} | ||
|
||
syntax error: invalid float (in err_partial_float.txt:1) | ||
---------------------------- err_partial_float.txt ---------------------------- | ||
1 > {{ 42e+ }} | ||
i ^ syntax error | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
No referenced variables | ||
------------------------------------------------------------------------------- |
22 changes: 22 additions & 0 deletions
22
minijinja/tests/snapshots/test_templates__vm@err_raw_block_missing_end.txt.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
source: minijinja/tests/test_templates.rs | ||
description: "{% raw %}this raw block is missing an end tag" | ||
info: {} | ||
input_file: minijinja/tests/inputs/err_raw_block_missing_end.txt | ||
--- | ||
!!!SYNTAX ERROR!!! | ||
|
||
Error { | ||
kind: SyntaxError, | ||
detail: "unexpected end of raw block", | ||
name: "err_raw_block_missing_end.txt", | ||
line: 1, | ||
} | ||
|
||
syntax error: unexpected end of raw block (in err_raw_block_missing_end.txt:1) | ||
------------------------ err_raw_block_missing_end.txt ------------------------ | ||
1 > {% raw %}this raw block is missing an end tag | ||
i ^ syntax error | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
No referenced variables | ||
------------------------------------------------------------------------------- |
22 changes: 22 additions & 0 deletions
22
minijinja/tests/snapshots/test_templates__vm@err_too_large_integer.txt.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
source: minijinja/tests/test_templates.rs | ||
description: "{{ 10234237582375823572357238572385723582375827582375238572385723857238572385723523758 }}" | ||
info: {} | ||
input_file: minijinja/tests/inputs/err_too_large_integer.txt | ||
--- | ||
!!!SYNTAX ERROR!!! | ||
|
||
Error { | ||
kind: SyntaxError, | ||
detail: "invalid integer (too large)", | ||
name: "err_too_large_integer.txt", | ||
line: 1, | ||
} | ||
|
||
syntax error: invalid integer (too large) (in err_too_large_integer.txt:1) | ||
-------------------------- err_too_large_integer.txt -------------------------- | ||
1 > {{ 10234237582375823572357238572385723582375827582375238572385723857238572385723523758 }} | ||
i ^ syntax error | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
No referenced variables | ||
------------------------------------------------------------------------------- |
22 changes: 22 additions & 0 deletions
22
minijinja/tests/snapshots/test_templates__vm@err_unexpected_character.txt.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
source: minijinja/tests/test_templates.rs | ||
description: "{{ foo @ }}" | ||
info: {} | ||
input_file: minijinja/tests/inputs/err_unexpected_character.txt | ||
--- | ||
!!!SYNTAX ERROR!!! | ||
|
||
Error { | ||
kind: SyntaxError, | ||
detail: "unexpected character", | ||
name: "err_unexpected_character.txt", | ||
line: 1, | ||
} | ||
|
||
syntax error: unexpected character (in err_unexpected_character.txt:1) | ||
------------------------ err_unexpected_character.txt ------------------------- | ||
1 > {{ foo @ }} | ||
i ^ syntax error | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
No referenced variables | ||
------------------------------------------------------------------------------- |
Oops, something went wrong.