Skip to content

Conversation

@jmert
Copy link
Owner

@jmert jmert commented Nov 13, 2023

Extend the capability of the expression generator to wrap the resulting definitions within a baremodule, thereby introducing a scope to isolate flag value names.

This requires some mild rewiring of the macro expansion to "flip" the interpretation of the name in BitFlagName::BaseType to instead become the module name, and a new optional first argument adds support for choosing the actual type name (defaulting to T) within the module.

Fixes #13.

@jmert jmert force-pushed the jw/scoped_bitflags branch from 07c8e22 to a52ba21 Compare November 13, 2023 02:18
@codecov
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Merging #15 (6cf32a0) into master (e222c1e) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #15   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          155       190   +35     
=========================================
+ Hits           155       190   +35     
Files Coverage Δ
src/BitFlags.jl 100.00% <100.00%> (ø)

Extend the capability of the expression generator to wrap the resulting
definitions within a `baremodule`, thereby introducing a scope to
isolate flag value names.

This requires some mild rewiring of the macro expansion to "flip" the
interpretation of the name in `BitFlagName::BaseType` to instead
become the module name, and a new optional first argument adds support
for choosing the actual type name (defaulting to `T`) within the
module.

Fixes #13.
@jmert jmert force-pushed the jw/scoped_bitflags branch from a52ba21 to 6cf32a0 Compare November 13, 2023 02:20
@jmert jmert merged commit d3d6a84 into master Nov 13, 2023
@jmert jmert deleted the jw/scoped_bitflags branch November 13, 2023 02:22
@jmert jmert mentioned this pull request Nov 13, 2023
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.

Scoped Names

2 participants