My grammar is given by:
Model:
    'module' (mn=ID)?
        (func+=Function)+
    'end_module'
;
Function:
    'function' name=ID '('')'
        (vars+=ID)*
    'end_function'
;
I can find the token like 'function', '(' etc.
- How can If force a new line after the token 'module' if the optional data mn does not exist and after mn if it does exist?
 - How can I indent the block begin 'module' and 'end_module' as well as 'function' and 'end_function'?
 
The formatting I am looking for:
module test
  function fdf ()
    str1
    str2
  end_function
  function ff ()
  end_function
end_module
So far I do generate the formatting stubs by using: formatter = { generateStub = true }