You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that, the srcloc for (let ([a 1]) (+ a 2)) is exactly the srcloc for (+ a 2). Both of them are (1 0 1 1 23).
In general, the description of this bug is: if let or let-rec only has one expression in its body, then the srcloc of this expression will be the same as the outer let or let-rec.
I believe that is because of the weird logic of parse-begin. It seems that when the body of (begin e) only has one expression, this parsing algorithm will omit the outer begin. And all let, let-rec, define transform their bodies into a begin.
The text was updated successfully, but these errors were encountered:
The bug is caused by the parsing algorithm in src/grift/syntax->grift0.rkt.
For example, consider the following Grift program
The syntax->grift0 will give the following AST:
The problem is that, the srcloc for
(let ([a 1]) (+ a 2))
is exactly the srcloc for(+ a 2)
. Both of them are(1 0 1 1 23)
.In general, the description of this bug is: if
let
orlet-rec
only has one expression in its body, then the srcloc of this expression will be the same as the outerlet
orlet-rec
.I believe that is because of the weird logic of
parse-begin
. It seems that when the body of(begin e)
only has one expression, this parsing algorithm will omit the outerbegin
. And alllet
,let-rec
,define
transform their bodies into abegin
.The text was updated successfully, but these errors were encountered: