Hi Noah, Noah Lavine <noah.b.lav...@gmail.com> writes: > I am not an expert, but this is my guess about what's happening: you > get the form from the file with scm_read. scm_read returns a regular > s-expression, not a syntax object.
Actually, source location information is not stored in syntax objects. Instead, it is associated with each raw s-expression using a weak-key `eq?' hash table. This is done automatically by 'read' if the 'positions' read-option is enabled (the default). Note that this strategy implies that source location can only be associated with parenthesized expressions, not atoms. See 'Source Properties' in the Guile manual for details. Best, Mark