[16.2.42] Substitution variable is shown as error in script

I've a script where some triggers are replaced and afterwards enabled / disabled based on the previous state.
The editor shows the following line as error:

ALTER TRIGGER tr_do_something &trigger_action;

However, the script is executed correctly.

Really, this is a question for @avergison , but it seems like a tricky one to me, since this could be any DDL (not just alter trigger) and the substitution could be any text, and the rest of the DDL could come after.

As substitution can be anything all I see is something such as abandoning parsing whenever there is a syntax error AND the statement contains at least one substitution variable.
I.o.w. try parsing.

Would that work?

That would be ok with me.

I forgot to mention that the code formatter doesn't like substitution variables either. :wink:
It inserts 17 blanks between the trigger name and the variable each time the code is formatted.

However, this is also not a high priority for me at the moment, as I have modified the script for another reason, so that substitute variables are no longer used. :smiley: