Something went wrong. Try again.
static-site-generator blogging hypertext ocaml
Something went wrong. Try again.
1.3 kB · 54 lines
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 $ forester init > /dev/null
$ cat > trees/index.tree << EOF > \def\my-object{ > \object[self]{ > [method1]{ > \p{Hello method1} > } > } > } > \my-object#method1 > EOF
$ forester build > /dev/null
$ grep -o 'Hello method1' output/index/index.html Hello method1 Hello method1 Hello method1
Unfortunately, the error message here is pretty bad, since the error onlyoccurs when the top-level `extract_content` is called, to which the total rangeis associated. Thus the error has as the location the entire file. I thinkimproving this will require rearchitecting the evaluator.
$ cat > trees/index.tree << EOF > \def\my-object{ > \object[self]{ > [method1]{ > \p{Hello method1} > } > } > } > \patch{\my-object}[self]{ > [method1]{} > } > EOF
$ forester build error[type_mismatch]: mismatched type ┌─ $TESTCASE_ROOT/trees/index.tree:1:1 1 │ ╭ \def\my-object{ 2 │ │ \object[self]{ 3 │ │ [method1]{ 4 │ │ \p{Hello method1} · │ 7 │ │ } 8 │ │ \patch{\my-object}[self]{ 9 │ │ [method1]{} 10 │ │ } │ ╰───^ This is an object. Did you forget to bind this object to an identifier? 11 │ = expected some content [1]