Most of the ambiguity would be solved if you wrote an ast tree directly, like in scratch (or even lisp).
There's no such thing as writing a conceptual entity like an AST "directly", you always have to use the mediation of some UI, be it text or a GUI. And you can definitively have ambiguous GUIs.