-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
errorMatch: option to capture character range #359
Comments
Character 48 to 57 is equal to |
@C-Bouthoorn you're right, i forgot i edited the script but did not update the error message |
This would only have any effect when used with the Atom Linter integration, right? |
If it's the linter integration that highlights the line of the — yes! |
The new version does not close this. The compiler does not output
The above means the error occured between the 31st and 40th character in the file. |
Oh I misunderstood. That is indeed an unusual way of outputting error locations. To solve this we're gonna need new error matcher categories and translate those to row/col. That'll be really tricky and would involve opening the file and inspecting the content. I can think of a million things that might go wrong while doing this. Is there no way to get it to output row/col instead? |
Unfortunately, there is no way to modify the output. In theory, the Open Scripting Architecture can be used for other scripting languages, but I think it's only been used for AppleScript and JavaScript (JSOSA) in practice. Since JavaScript OSA was since replaced by JavaScript for Automation (JXA), support for character ranges is probably a very small niche. Maybe keep it on your list if you ever have plans for a major rewrite. Otherwise, forget about it! 😄 |
It feels very niched indeed. I would not be opposed to it, but I don't expect I will prioritize it anytime soon 😄 |
I'm closing this. It seems too big of an effort and too little of a gain. |
Alright, this might sound odd. I've come across a compiler that does not report the error in the common
<line>:<col>
scheme, but the character range in which the error occurred.Example:
Here is an AppleScript that will break on build
Building would produce the following error
The number
48
marks the beginning of the range where the error occurs,57
marks the end.I'm not sure how many compilers follow this, but it would be nice to have a pattern that allows us to capture this, e.g.
?<from>
and?<to>
.The text was updated successfully, but these errors were encountered: