If it helps I've been doing a lot of projects with TSX (via OCX) as a file format.
It works nicely for these things because it already supports typed parameters and can be treated as a a raw AST without JS engine.
Its also easy to manipulate with the same library.