There isn't really any formal documentation at this point. Just code.
First clone the following directory:
https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/ATS-parse-emitSay you want atscc2XYZ for a language called XYZ.
Create a directory of the name XYZ (or any other name you like) and some symbolic links:
mkdir XYZ
cd XYZ
ln -s ../*.?ats .
Now you can study atscc2py, atscc2js and atscc2php.
1) atscc2py is the hardest as
it does not support (1) goto labels or (2) switch statements
2) atscc2php is the easiest as it supports both (1) and (2)
3) atscc2js is in the middle: it suports (2) but not (1)
It is a bit unfortunate that atscc2lua seems to need to take the
atscc2py route as Lua does not support either (1) or (2).