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

Add syntax rewriter framework and some decompiler simplification rewriters #953

Merged
merged 9 commits into from
Nov 23, 2020

Conversation

anthony-c-martin
Copy link
Member

@anthony-c-martin anthony-c-martin commented Nov 19, 2020

Preview these changes on the quickstart repo here.

@codecov-io
Copy link

codecov-io commented Nov 19, 2020

Codecov Report

Merging #953 (9ebe449) into main (89f57eb) will decrease coverage by 0.08%.
The diff coverage is 90.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #953      +/-   ##
==========================================
- Coverage   94.33%   94.24%   -0.09%     
==========================================
  Files         316      326      +10     
  Lines       14771    15575     +804     
  Branches       12       12              
==========================================
+ Hits        13934    14679     +745     
- Misses        837      896      +59     
Flag Coverage Δ
dotnet 94.81% <90.36%> (-0.12%) ⬇️
typescript 25.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Bicep.Core.IntegrationTests/ScenarioTests.cs 100.00% <ø> (ø)
src/Bicep.Core.UnitTests/Text/SpellCheckerTests.cs 100.00% <ø> (ø)
...p.Core.UnitTests/Utils/TestResourceTypeProvider.cs 75.00% <0.00%> (ø)
src/Bicep.Core/Syntax/BooleanLiteralSyntax.cs 100.00% <ø> (ø)
src/Bicep.Core/Syntax/NumericLiteralSyntax.cs 100.00% <ø> (ø)
src/Bicep.Core/Syntax/ObjectSyntax.cs 100.00% <ø> (ø)
...rc/Bicep.Core/Syntax/ParameterDeclarationSyntax.cs 100.00% <ø> (ø)
src/Bicep.Core/Syntax/ProgramSyntax.cs 100.00% <ø> (ø)
src/Bicep.Core/Syntax/SeparatedSyntaxList.cs 54.16% <0.00%> (ø)
src/Bicep.Core/Syntax/StringSyntax.cs 100.00% <ø> (ø)
... and 67 more

@majastrz
Copy link
Member

You have an empty file called InvalidOperationException.cs btw.

return syntax;
}

// TODO what to do with lexerDiagnostics?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lexerDiagnostics [](start = 36, length = 16)

This makes me wonder if we need to have errors on tokens that get collected like parse errors. (Most tokens don't have errors so it could also be a new ErrorToken class derived from Token to avoids allocating extra space for mostly null pointers.)

@anthony-c-martin
Copy link
Member Author

You have an empty file called InvalidOperationException.cs btw.

Thanks for the heads-up :) Omnisharp makes it annoyingly easy to accidentally do that...

@anthony-c-martin anthony-c-martin linked an issue Nov 20, 2020 that may be closed by this pull request
Copy link
Member

@majastrz majastrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@anthony-c-martin anthony-c-martin merged commit 4ffcead into main Nov 23, 2020
@anthony-c-martin anthony-c-martin deleted the antmarti/decompiler_improvements branch November 23, 2020 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants