Commit graph

13 commits

Author SHA1 Message Date
9845c0e861
switch to maturin build system, include binary in python package (#33) 2024-12-15 16:18:23 -06:00
b1b3e6a5ec
fix django block parsing (for now) (#31)
it's clear i need a rethink of parsing django block tags to nodes,
becuase my mental picture of them differs from the actual use of them.
E.g. I tend to think of them the same as HTML tags as either "void" tags
or ones with end tags and children but not that's not the case at all.
Some have intermediate tags (`{% if %}{% else %}{% endif %}`) which is
not a huge lift to support, but the mind blowing realization was that
it's just convention that the closing tag starts with `end`.

for builtin's, yeah that's it's the case that all of the tags that have
opening and closing tags all close with a matching tag that is the
initial tag with `end` prefixed. but given the flexibility of the django
template engine, a third-party could feasibly use *any* closing tag it
wanted. that makes it very hard to build a structured, full-featured AST
for a Django template.

maybe that's not really needed for an LSP. but i'll need to come up with
*something* eventually.
2024-12-13 23:55:32 -06:00
25f2c45f8d remove comment
Some checks are pending
test / test (macos-latest) (push) Waiting to run
test / test (ubuntu-latest) (push) Waiting to run
test / test (windows-latest) (push) Waiting to run
2024-12-13 08:44:49 -06:00
d1cc9f7ca0 specify dependencies to minor version
Some checks are pending
test / test (macos-latest) (push) Waiting to run
test / test (ubuntu-latest) (push) Waiting to run
test / test (windows-latest) (push) Waiting to run
2024-12-13 07:18:08 -06:00
134f3fea54 fix parseing of django tags with potential intermediates 2024-12-13 01:13:04 -06:00
a5e42fe7a4 swap 2024-12-13 00:50:26 -06:00
b0ba264452 parse doctype tag 2024-12-13 00:48:51 -06:00
61b55641cb add test for void html tag 2024-12-13 00:48:24 -06:00
fbe3fbd493
move thiserror and async-tract to workspace dependencies (#15) 2024-12-10 14:13:53 -06:00
5c8157057a remove token from error
reducing the size a bit
2024-12-10 11:57:50 -06:00
7279746f18 add ast to main crate 2024-12-10 11:28:29 -06:00
5971c23ace
refactor and cleanup parsing logic (#10)
just a little bit
2024-12-09 21:06:32 -06:00
f96b3da951
create djls-ast crate and implement lexer and parser (#8) 2024-12-09 17:48:24 -06:00