Skip to content
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

Feature request: Provide column number for syntax errors, too #36

Open
billdenney opened this issue Oct 24, 2023 · 0 comments
Open

Feature request: Provide column number for syntax errors, too #36

billdenney opened this issue Oct 24, 2023 · 0 comments

Comments

@billdenney
Copy link

In the R port for dparser, I wanted to have syntax errors clarified as I was having trouble tracing an issue. I made the following PR there: nlmixr2/dparser-R#13

But, @mattfidler indicated that code was auto-generated from the dparser source. I think that the correct location to make the changes would be here:

dparser/parse.c

Lines 1636 to 1639 in c74f863

if (after)
fprintf(stderr, "%s:%d: syntax error after '%s'\n", fn, p->user.loc.line, after);
else
fprintf(stderr, "%s:%d: syntax error\n", fn, p->user.loc.line);

But, I'm not really a C programmer, and I wouldn't know how to test what I'm changing, either. So, would it be possible to make the location indicate the line and column?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant