[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] Add line number info for some forms introduced
From: |
Evan Hanson |
Subject: |
[Chicken-hackers] [PATCH] Add line number info for some forms introduced by reader |
Date: |
Sun, 10 Mar 2019 15:33:47 +1300 |
Hello hackers,
This patch adds entries to the line number database for the forms
introduced by the reader when it encounters "#$" (location), "#+"
(cond-expand), and the various quotation sigils. Previously, such forms
would either have no line number information (when occuring at the
toplevel), or the info would be inaccurate (when occuring inside another
form, it would use the line number of the outermost list).
You can see a before and after with the attached Scheme programs using
this command:
csc -X x.scm -A a.scm
The before looks like this:
(#f (quote toplevel))
("a.scm:3" (quote local))
(#f (location toplevel))
("a.scm:8" (location local))
(#f (cond-expand (toplevel foo) (else)))
("a.scm:13" (cond-expand (local foo) (else)))
And the after:
("a.scm:1" (quote toplevel))
("a.scm:4" (quote local))
("a.scm:6" (location toplevel))
("a.scm:9" (location local))
("a.scm:11" (cond-expand (toplevel foo) (else)))
("a.scm:14" (cond-expand (local foo) (else)))
Cheers,
Evan
0001-Add-line-number-info-for-some-forms-introduced-by-re.patch
Description: Text Data
x.scm
Description: Text document
a.scm
Description: Text document
- [Chicken-hackers] [PATCH] Add line number info for some forms introduced by reader,
Evan Hanson <=