Mercerenies / gdlisp

Lisp on the Godot platform
GNU General Public License v3.0
139 stars 1 forks source link

Macro stack traces in source offsets #140

Open Mercerenies opened 1 year ago

Mercerenies commented 1 year ago

Currently, any errors during macro expansion or that occur due to code produced by a macro expansion are reported to occur at the site of the original macro call. Ideally, we could make SourceOffset more complex and able to handle macro stacks. So the error could actually say "error occurred at line X, during macro expansion of macro Y at line Z, during macro expansion of ..." and so on.

Mercerenies commented 1 year ago

Point in the code where the source offset is set during macro expansion right now: https://github.com/Mercerenies/gdlisp/blob/6feb3fb/src/ir/incremental.rs#L112