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

Update Parser_expressions.cpp #669

Merged
merged 6 commits into from
Nov 26, 2022

Conversation

godblesszhouzhou
Copy link
Contributor

For 'always@( )' lexed as '@' '(' ',' , there will be a error for the parser. The commit can correct the error.

For 'always@( *)' lexed as '@' '(' '*,' , there will be a error for the parser. The commit can correct the error.
Copy link
Owner

@MikePopoloski MikePopoloski left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. The logic looks good to me, just one small fix to make.

@@ -1135,6 +1135,13 @@ TimingControlSyntax* Parser::parseTimingControl() {
expect(TokenKind::CloseParenthesis));
}

// Special case since @(*) will be lexed as '@' '(' '*)'
if (peek(TokenKind::StarCloseParenthesis)) {
auto startclosePara = consume();
Copy link
Owner

Choose a reason for hiding this comment

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

Typo here, should be something like starCloseParen not "start"

@MikePopoloski
Copy link
Owner

Also it would be good to add a test that exercises this. Probably something simple in ExpressionParsingTests.cpp

@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Merging #669 (fc81ae6) into master (0f5933d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #669   +/-   ##
=======================================
  Coverage   91.14%   91.14%           
=======================================
  Files         186      186           
  Lines       43172    43180    +8     
=======================================
+ Hits        39348    39356    +8     
  Misses       3824     3824           
Impacted Files Coverage Δ
source/parsing/Parser_expressions.cpp 98.88% <100.00%> (+<0.01%) ⬆️
source/driver/Driver.cpp 98.72% <0.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f5933d...fc81ae6. Read the comment docs.

@godblesszhouzhou
Copy link
Contributor Author

Thanks for suggestions. I have corrected the typo and added a test.

@MikePopoloski MikePopoloski merged commit 662ba37 into MikePopoloski:master Nov 26, 2022
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