Skip to content

[Feature request] File-local defines #342

Description

@aaaaaa123456789

Some projects are a hairy mess of file inclusions. It happens, and there's not much we can do about it after some time.

The consequence of this is that, after resolving all the inclusions (imagine a rgbasm option equivalent to gcc -E), the actually assembled file is tens of thousands (or hundreds of thousands) of lines long. Anything defined anywhere through this chain of includes is visible anywhere afterwards, including in the parent, things included by the parent, and so on. This is often desirable (think of a constants file), but not always.

Thus, what I'm requesting are equivalents to EQU, EQUS and MACRO (and any other similar keywords you can think of) that don't traverse file inclusions — whatever they define is local to the file, isn't inherited by included files, and is purged automatically when the file ends. This would make it a lot simpler to define local constants, etc., without having to end files with a long stream of PURGE commands.

Thoughts? Comments?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementTypically new features; lesser priority than bugsrgbasmThis affects RGBASM

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions