add ToTree
no need to expose constants
add single-character escapes