Replace hacky regex checks with solang, which is a solidity parser. One downside is that we currently lose line number info, but we can get it back in a future update. solang provides location data as start and end offsets in bytes, so we have to manually convert that to line number by mapping it to the input string.
Edit: foundry has the function we need to do that implemented here, so we can use that to report line numbers, h/t/ @rkrasiuk
Replace hacky regex checks with solang, which is a solidity parser. One downside is that we currently lose line number info, but we can get it back in a future update. solang provides location data as start and end offsets in bytes, so we have to manually convert that to line number by mapping it to the input string.
Edit: foundry has the function we need to do that implemented here, so we can use that to report line numbers, h/t/ @rkrasiuk