[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/9] pkl: add location info to synthesized assignment stmts
From: |
Mohammad-Reza Nabipoor |
Subject: |
Re: [PATCH 7/9] pkl: add location info to synthesized assignment stmts |
Date: |
Thu, 28 Dec 2023 16:29:34 +0100 |
On Thu, Dec 28, 2023 at 03:23:10PM +0100, Jose E. Marchesi wrote:
>
> Hmm, how accurate are these locations?
> Can you please add a couple of tests to make sure the locations make
> sense?
>
These locations are necessary for the "pkl: report evaluation location in
E_constraint exception"
patch.
Example:
(poke) type A = struct { int i == 1; }
(poke) var a = A {}
(poke) a.i++
unhandled constraint violation exception
failed expression
i == 1
in field A.i evaluated at <stdin>:1:1 (defined at <stdin>:1:24)
Reason: In the codegen, we need the location of the synthesized assignment to
report it to the user.
- Re: [PATCH 3/9] pkl: disallow immediate break/continue/return in EXCOND, (continued)
[PATCH 2/9] pkl: report location of constraint definition, Mohammad-Reza Nabipoor, 2023/12/27
[PATCH 4/9] pkl,poke: trivial fixes, Mohammad-Reza Nabipoor, 2023/12/27
[PATCH 7/9] pkl: add location info to synthesized assignment stmts, Mohammad-Reza Nabipoor, 2023/12/27
[PATCH 6/9] pkl: change `pkl_ast_format_loc' function, Mohammad-Reza Nabipoor, 2023/12/27
[PATCH 5/9] pkl: keep track of current filename in codgen, Mohammad-Reza Nabipoor, 2023/12/27
[PATCH 8/9] pkl: report evaluation location in E_constraint exception, Mohammad-Reza Nabipoor, 2023/12/27
[PATCH 9/9] pkl: fix location info for unary/binary/ternary exp, Mohammad-Reza Nabipoor, 2023/12/27