Closed OCHyams closed 5 years ago
Thinking about it, maybe it would make more sense to escape commands with '\' and consume the whitespace instead of ignoring the command in the scenario outlined in the PR?
whitespace should be optional would be my preference, if I write '.command. .loads of white space. .open_paran.' that should be the same as '.command. .open_paran.'
I agree and think that this PR should be closed.
However, I still think we should be able to escape commands (e.g. \DexLabel('something')
is ignored).
Without this patch, parsing 'command_name (' will cause an exception.
This change means the offending command will be ignored and a helpful warning will be given.
Doing this instead of just ignoring the whitespace lets us refer to commands in a test file without the command being parsed.
Note: Warnings can be suppresed with -w.
NOTE: Without a larger change/refactor I'm not sure how to make this less ugly.