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

chore: remove steps to parse CloudFormation templates #120

Merged
merged 2 commits into from
May 2, 2023

Conversation

RomainMuller
Copy link
Contributor

Parse directly into the *ParseTree structures instead of going through serde_yaml::Value as an initial step. This replaces a bunch of Derive implementations of serde::Deserialize with hand-coded ones, and completely removes the build_resource_recursively function (in favor of directly parsing).

This is not the complete implementation of the refactor (it'd be too big), and instead of an initial pass that focuses specifically on the ResourceValue enum. It also refactored intrinsics into an IntrinsicFunction enum to make the semantics a little easier to track here, and also to consolidate the parsing logic in a separate location.

@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Patch coverage: 75.09% and project coverage change: +3.02 🎉

Comparison is base (b0f7103) 44.45% compared to head (981f49b) 47.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #120      +/-   ##
==========================================
+ Coverage   44.45%   47.48%   +3.02%     
==========================================
  Files          20       21       +1     
  Lines        2641     2622      -19     
==========================================
+ Hits         1174     1245      +71     
+ Misses       1467     1377      -90     
Impacted Files Coverage Δ
src/ir/resources.rs 20.76% <0.00%> (+0.61%) ⬆️
src/parser/output.rs 8.06% <0.00%> (-0.42%) ⬇️
src/primitives/mod.rs 43.47% <25.00%> (-20.16%) ⬇️
src/parser/intrinsics.rs 95.23% <95.23%> (ø)
src/parser/resource.rs 94.24% <95.80%> (+12.67%) ⬆️
src/parser/condition.rs 7.46% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@HBobertz HBobertz merged commit 97fa628 into main May 2, 2023
@HBobertz HBobertz deleted the rmuller/refactor-parsing branch May 2, 2023 19:17
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