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 file name information for .included code. #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

athas
Copy link

@athas athas commented Sep 23, 2022

This means that ProgramStatements now refer to the file they actually occur in, like is the case for the original SourceLine. This is used for various diagnostics messages.

Fixes #160.

@athas
Copy link
Author

athas commented Sep 23, 2022

Hm, this seems to break the assembler for some other programs somehow.

@athas athas marked this pull request as draft September 23, 2022 13:58
The sourceProgram is not correct for statements that come from an
.include, and the assembler depends on the sourceProgram actually
being the "top-level" program, not the actual file.

Fixes TheThirdOne#160.
@athas athas marked this pull request as ready for review September 23, 2022 14:06
@athas
Copy link
Author

athas commented Sep 23, 2022

Man is the assembler logic tangled. I made it work by having a specific field (only used for diagnostics) that contains the file name of the statement.

@athas athas changed the title Use original program when constructing ProgramStatement. Fix file name information for .included code. Sep 23, 2022
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.

Incorrect file name in errors when using .import
1 participant