Implement pretty printer + tests

This also adds isStatic / isOperator flags to AST nodes and reenables
previously (accidentally) disabled handling of usage errors