Something went wrong. Try again.
ocaml
Something went wrong. Try again.
1.3 kB · 52 lines
at pp-ast
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 $ 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
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]