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

Fix compile errors in fsyacc's output if there is no header in the input file. #228

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

teo-tsirpanis
Copy link
Contributor

@teo-tsirpanis teo-tsirpanis commented Dec 21, 2024

The header in .fsy files is optional. However if it does not exist, FsYacc will emit a #0 "" line directive in the source file, and the compiler will not like the empty string in the file name. This PR fixes FsYacc to not emit any line directives if the header is empty.

Validated by removing the header from the mini project.

…put file.

And remove the header from the mini project as a test.
@nojaf
Copy link
Collaborator

nojaf commented Dec 23, 2024

Could you please explain what this does? In what situations is this beneficial?

@teo-tsirpanis
Copy link
Contributor Author

Updated PR description.

Copy link
Collaborator

@nojaf nojaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nojaf nojaf merged commit 4500cbe into fsprojects:master Dec 23, 2024
3 checks passed
@teo-tsirpanis teo-tsirpanis deleted the fix-no-header branch December 23, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants