-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
libexpr: split yacc prologue & epilogue (NFC) #9059
Conversation
Note that we use What does "NFC" mean in this context? |
NFC > > "No Functional Change" |
Thanks for pointing this out, however if use |
69df5ef
to
6985f96
Compare
I am surprised this works with the |
I don't think we should be including |
I would like to change the extension to |
This is an NFC PR that splits epilogue & prologue from parser. As mentioned in NixOS#8812, we can add static checking tools & auto formatting for these files, but if it is written .y directly, the clang parser cannot understand the code is actually "C++".
6985f96
to
b9f5324
Compare
#ifndef BISON_HEADER | ||
#define BISON_HEADER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#ifndef BISON_HEADER | |
#define BISON_HEADER | |
#pragma once |
@@ -0,0 +1,93 @@ | |||
#ifdef __clang__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really avoid custom extensions like .inc
, because that breaks syntax highlighting etc. in most editors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we give it a different extension?
We should really avoid custom extensions like .inc, because that breaks syntax highlighting etc. in most editors.
Would you like to kindly suggest which extension should I use :) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edolstra Yeah the issue is that we don't want the wildcard rules to install this with the other headers with the wildcards that would pick them up.
Besides using a different extension, the only other thing I can think of would be a different directory, e.g. src/*.hh
for private headers, and include/*.hh
for public headers is pretty convention. But I recall you didn't want that public headers moved away from the source files they go with :).
Motivation
This is an NFC PR that splits epilogue & prologue from parser.
As mentioned in #8812, we can add static checking tools & auto
formatting for these files, but if it is written .y directly, the clang
parser cannot understand the code is actually "C++".
Context
#8812
#6721
Priorities
Add 👍 to pull requests you find important.