tidied ast for lang(), format() and counter() functions