fix: add scoped error logging for lexer/parser errors
- Add std.log.scoped(.pugz) to template.zig and view_engine.zig - Log detailed error info (code, line, column, message) when parsing fails - Log template path context in ViewEngine on parse errors - Remove debug print from lexer, use proper scoped logging instead - Move benchmarks, docs, examples, playground, tests out of src/ to project root - Update build.zig and documentation paths accordingly - Bump version to 0.3.1
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
a(href=
|
||||
'asfd
|
||||
asfd')
|
||||
@@ -0,0 +1 @@
|
||||
case thisWillNotWork(
|
||||
@@ -0,0 +1 @@
|
||||
case
|
||||
@@ -0,0 +1 @@
|
||||
default foo
|
||||
@@ -0,0 +1,4 @@
|
||||
if true
|
||||
.foo
|
||||
else false
|
||||
.bar
|
||||
1
tests/sample_data/pug-lexer/errors/extends-no-path.pug
Normal file
1
tests/sample_data/pug-lexer/errors/extends-no-path.pug
Normal file
@@ -0,0 +1 @@
|
||||
extends
|
||||
@@ -0,0 +1 @@
|
||||
include:foo
|
||||
@@ -0,0 +1 @@
|
||||
include:foo
|
||||
@@ -0,0 +1 @@
|
||||
include:foo()foo.£
|
||||
1
tests/sample_data/pug-lexer/errors/include-no-path.pug
Normal file
1
tests/sample_data/pug-lexer/errors/include-no-path.pug
Normal file
@@ -0,0 +1 @@
|
||||
include
|
||||
@@ -0,0 +1,4 @@
|
||||
html
|
||||
body
|
||||
p Hey
|
||||
p Is this in <body> or in <p>?
|
||||
5
tests/sample_data/pug-lexer/errors/interpolated-call.pug
Normal file
5
tests/sample_data/pug-lexer/errors/interpolated-call.pug
Normal file
@@ -0,0 +1,5 @@
|
||||
mixin a
|
||||
p hey
|
||||
|
||||
- var myMixin = 'a'
|
||||
+#{myMixin]}
|
||||
@@ -0,0 +1 @@
|
||||
.95
|
||||
@@ -0,0 +1 @@
|
||||
.-
|
||||
@@ -0,0 +1 @@
|
||||
.ä
|
||||
1
tests/sample_data/pug-lexer/errors/invalid-id.pug
Normal file
1
tests/sample_data/pug-lexer/errors/invalid-id.pug
Normal file
@@ -0,0 +1 @@
|
||||
#ä
|
||||
1
tests/sample_data/pug-lexer/errors/malformed-each.pug
Normal file
1
tests/sample_data/pug-lexer/errors/malformed-each.pug
Normal file
@@ -0,0 +1 @@
|
||||
each foo bar
|
||||
1
tests/sample_data/pug-lexer/errors/malformed-extend.pug
Normal file
1
tests/sample_data/pug-lexer/errors/malformed-extend.pug
Normal file
@@ -0,0 +1 @@
|
||||
extend(data-foo='bar') I'm pretending to be a tag
|
||||
1
tests/sample_data/pug-lexer/errors/malformed-include.pug
Normal file
1
tests/sample_data/pug-lexer/errors/malformed-include.pug
Normal file
@@ -0,0 +1 @@
|
||||
include(data-foo='bar') I'm pretending to be a tag
|
||||
@@ -0,0 +1,2 @@
|
||||
//- #1871
|
||||
p #[strong a}
|
||||
@@ -0,0 +1,2 @@
|
||||
#{
|
||||
'abc'
|
||||
@@ -0,0 +1,4 @@
|
||||
p.
|
||||
#[strong This strong text is really really long. This strong
|
||||
text is really really long. This strong text is really really
|
||||
long.]
|
||||
3
tests/sample_data/pug-lexer/errors/old-prefixed-each.pug
Normal file
3
tests/sample_data/pug-lexer/errors/old-prefixed-each.pug
Normal file
@@ -0,0 +1,3 @@
|
||||
ul
|
||||
- each foo in bar
|
||||
li= foo
|
||||
@@ -0,0 +1 @@
|
||||
p #[strong this is some terrible brackets mismatching
|
||||
@@ -0,0 +1 @@
|
||||
when
|
||||
@@ -0,0 +1 @@
|
||||
while
|
||||
Reference in New Issue
Block a user