alashworth / test-issue-import

0 stars 0 forks source link

expressions render in user-facing syntax #79

Open alashworth opened 5 years ago

alashworth commented 5 years ago

Issue by bob-carpenter Thursday Aug 13, 2015 at 01:45 GMT Originally opened as https://github.com/stan-dev/stan/issues/1582


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

alashworth commented 5 years ago

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


Could you clarify this issue a bit more?

alashworth commented 5 years ago

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 commented 5 years ago

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.