Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line control macros #1833

Open
PaulBatchelor opened this issue Dec 15, 2018 · 1 comment
Open

Line control macros #1833

PaulBatchelor opened this issue Dec 15, 2018 · 1 comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone

Comments

@PaulBatchelor
Copy link

I'm not a Zig user (yet), but I was wondering if Zig had anything similar to the line control macros that you see in GCC. I am very interested in using writing programs in Zig using my literate programming environment, which utilize these macros to make debugging possible.

Many thanks!

@thejoshwolfe
Copy link
Sponsor Contributor

Line control macros do not exist in Zig. There is no current plan to implement them, but there probably should be.

The line control macros should probably be in Zig comments, rather than being "macros" (which Zig doesn't have), keywords and first-class syntactic constructs, or a builtin functions. They are not necessary to understand the semantics of the Zig code, and so they would fit nicely into comments for tools that don't care about reading them.

Line control macros can be generalized into source maps. I don't exactly know what information source maps contain, but I expect they can contain details at a higher resolution than line numbers. That may be a better idea than just line control macros.

@andrewrk andrewrk added the proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. label Dec 16, 2018
@andrewrk andrewrk added this to the 0.5.0 milestone Dec 16, 2018
@andrewrk andrewrk modified the milestones: 0.5.0, 0.6.0 Aug 19, 2019
@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Oct 17, 2019
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Oct 10, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 May 19, 2021
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 Nov 23, 2021
@andrewrk andrewrk modified the milestones: 0.10.0, 0.11.0 Apr 16, 2022
@andrewrk andrewrk modified the milestones: 0.11.0, 0.12.0 Apr 9, 2023
@andrewrk andrewrk modified the milestones: 0.13.0, 0.12.0 Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

No branches or pull requests

3 participants