$ 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 only occurs when the top-level `extract_content` is called, to which the total range is associated. Thus the error has as the location the entire file. I think improving 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]