TL;DR It’s complicated
As described in a current meet up, syntax colouring is coming to some† codes spaces in Tinderbox 9.
A problem with the syntax is much of it is optional and extensible whilst at the same time lightly documented. My own aTbRef notes are under constant change as we discover that something is more—or less—flexible in parsing input than we imagined. Export code was originally conceived for HTML export of blogging and there used to be a separated #-prefixed 'code method for queries. The latter and much of the former have ben subsumed into Action code which started out as a very permissive coding style following the concept of things like AppleScript. IOW, you write what makes sense and the computer figures it out.
In fact, as hubristic failures in Machine Learning have shown, human writing is hard to parse for meaning, even without typos—rather in the way it is said that the English language is defined by the exceptions to its rules.
So, whilst one could write a plugin for BBEdit or such, my sense as a long time user and documenter of the app is that we don’t have accurate enough underlying statements of design intent to write a reliable parser while both correctly captures code terms and matches Tinderbox’s, err, ‘flexibility’ in interpretation of input. I’d note many of the conventions or ‘rules’ in my documentation are my own additions to avoid learners being faced with a learning scenario of “type what you want, it may work or it may not”. Even after quite deep use of the app for 17 years, I still trip over limitations that have never—to my knowledge—ever been described and can’t easily be guessed.
Please don’t be tempted to read the latter as criticism. Rather it is a statement of fact. Action code wasn’t added as a deliberate ‘full’ coding environment. Instead, it grew out of simple macros and has been growing ever since, in response to user’s requests. It also services an open-ended toolbox meaning have all sort of potential combinations in which to give the app things it never really expected by way of code.
For instance, this could be legal code:
Quite why one might want a string value of
"green is a separate question (though I can probably think of some).
†. Whether it is just the Action Inspector, or other places like Displayed Attributes or stamps in the Inspector is yet to be decided.