71689520b629b0b5e32cd116bfbacbdd82c05f07
Adds native HTML template literals to the El parser. Templates are
detected in value position when Lt is followed by a known HTML tag
name (is_html_tag_name) or by '!' for <!doctype html>.
New parser helpers:
- is_html_tag_name / is_void_element: classify tag names
- parse_html_text_tokens: collect intertoken text content
- parse_html_attrs: parse name, name="val", name={expr} attributes
- parse_html_children: recursive children with {expr}, {#each} support
- parse_html_element / parse_html_template: entry points
Adds Hash token kind ('#') to lexer for {#each} block syntax.
AST nodes: HtmlTemplate, html:Element, html:Text, html:Interp,
html:Raw, html:Each, html:Doctype. Doctype flag is stored on the
root element node rather than as a separate AST layer.
HTML templates parse correctly after 'return' and as the sole
expression in a function body. The 'return' keyword is required when
other let bindings precede the template, as El has no newline-as-
statement-terminator and '<' would otherwise be parsed as comparison.
Description
The Engram programming language — types as knowledge nodes, quantum-sealed prod target
146 MiB
Releases
5
El SDK (latest)
Latest
Languages
Emacs Lisp
74.7%
C
21.8%
HTML
1.5%
Objective-C
0.6%
Shell
0.6%
Other
0.8%