3 ms·
Yes, but if we're talking about some hypothetical tool that requires a valid AST, there might be a situation where I don't have a valid AST and want to save the
by hardwaregeek 5y ago
Yes, but if we're talking about some hypothetical tool that requires a valid AST, there might be a situation where I don't have a valid AST and want to save the code. Similarly, I had a job where we used pre-commit hooks that ran a linting script. I had to override the hook to commit which was slightly annoying at times.
- lsaferite 5y agoPerhaps you store the invalid syntax portion as an in-tree comment until it's valid syntax.