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

Less leakage of container type in concrete syntax tree. #2026

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Less leakage of container type in concrete syntax tree. #2026

merged 1 commit into from
Oct 16, 2023

Conversation

hzeller
Copy link
Collaborator

@hzeller hzeller commented Oct 15, 2023

Reduces the leaky abstraction of handing out children() by SyntaxTreeNode, but provide operations to work on them: front(), back(), operator[].

This change does not get rid of handing out children() entirely yet, as they are used in range loops, this will be a separate change.

Reducing the abstraction leak will make it easier to change that implementation later (e.g. for issue #1523)

Reduces the leaky abstraction of handing out children() by
SyntaxTreeNode, but provide operations to work on them:
front(), back(), operator[].

This change does not get rid of handing out children() entirely yet,
as they are used in range loops, this will be a separate change.

Reducing the abstraction leak will make it easier to change that
implementation later (e.g. for issue #1523)
@codecov-commenter
Copy link

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (5be583b) 92.85% compared to head (a4a5670) 92.85%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2026      +/-   ##
==========================================
- Coverage   92.85%   92.85%   -0.01%     
==========================================
  Files         357      357              
  Lines       26397    26394       -3     
==========================================
- Hits        24510    24507       -3     
  Misses       1887     1887              
Files Coverage Δ
common/text/concrete_syntax_tree.cc 100.00% <100.00%> (ø)
common/text/concrete_syntax_tree.h 96.82% <100.00%> (+0.46%) ⬆️
common/text/tree_builder_test_util.cc 100.00% <100.00%> (ø)
common/text/tree_utils.cc 97.27% <100.00%> (-0.02%) ⬇️
common/text/tree_utils.h 100.00% <100.00%> (ø)
verilog/CST/expression.cc 96.10% <100.00%> (-0.10%) ⬇️
verilog/CST/macro.cc 100.00% <100.00%> (ø)
verilog/CST/module.cc 100.00% <100.00%> (ø)
verilog/CST/port.cc 94.36% <100.00%> (ø)
verilog/CST/seq_block.cc 100.00% <100.00%> (ø)
... and 13 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hzeller hzeller requested a review from fangism October 15, 2023 19:32
@hzeller hzeller merged commit 520ca4b into chipsalliance:master Oct 16, 2023
34 checks passed
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.

3 participants