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

expressions render in user-facing syntax #79

Open
1 task
alashworth opened this issue Mar 12, 2019 · 3 comments
Open
1 task

expressions render in user-facing syntax #79

alashworth opened this issue Mar 12, 2019 · 3 comments

Comments

@alashworth
Copy link
Owner

Issue by bob-carpenter
Thursday Aug 13, 2015 at 01:45 GMT
Originally opened as stan-dev/stan#1582


There are still some cases that aren't working properly.

  • indexing
@alashworth
Copy link
Owner Author

Comment by VMatthijs
Thursday Dec 13, 2018 at 13:18 GMT


Could you clarify this issue a bit more?

@alashworth
Copy link
Owner Author

Comment by bob-carpenter
Thursday Dec 13, 2018 at 14:10 GMT


We got better at this but right no we can have errors in "a * b" that get translated as "multiply(a, b)" in the error messages, even though the user never wrote "multiply". This is an issue with any kind of intermediate form normalization (* being replaced with multiply here)---we need a path back to the actual user input.

On Dec 13, 2018, at 8:18 AM, Matthijs Vákár notifications@github.com wrote:

Could you clarify this issue a bit more?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@alashworth
Copy link
Owner Author

Comment by VMatthijs
Thursday Dec 13, 2018 at 15:12 GMT


Ah right. This has been fixed in stanc3, then. It comes with a pretty printer to render an AST as Stan syntax. (Can be used for auto-formatting.) The error messages thrown by the compiler render AST nodes using this pretty printer whenever they need to refer to a node in the error. In particular, operators get rendered properly.

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

No branches or pull requests

1 participant