basic HTML

This commit is contained in:
2026-07-14 15:22:25 +02:00
parent 1bbeebf1a3
commit 47eeb295ef
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -6,4 +6,4 @@ start="<html><head><title>TypoML Preview</title>$style</head><body>"
end="</body></html>"
output="$start$input$end"
echo "$output" > /tmp/preview.html
nohup xdg-open /tmp/preview.html &
nohup xdg-open /tmp/preview.html > /dev/null 2>&1 &
+7
View File
@@ -62,5 +62,12 @@ print_token :: proc(token: ^Token, depth: int = 0) {
main :: proc() {
lines := read_stdin()
parsed := parse(lines)
// print_html(&parsed)
fmt.println("<hr>")
fmt.println("<h1>Token Tree</h1>")
fmt.println("<p>")
fmt.println("<code>")
print_token(&parsed)
fmt.println("</code>")
fmt.println("</p>")
}
+1 -1
View File
@@ -1 +1 @@
clear && make format && cat README.tlm | make run # | ./preview
clear && make format && cat README.tlm | make run | ./preview