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
parser: cmd style check tuple to list #1315
Conversation
visualfc
commented
Jul 3, 2022
•
edited
edited
Codecov Report
@@ Coverage Diff @@
## main #1315 +/- ##
==========================================
+ Coverage 90.88% 90.89% +0.01%
==========================================
Files 22 22
Lines 8482 8503 +21
==========================================
+ Hits 7709 7729 +20
- Misses 623 624 +1
Partials 150 150
Continue to review full report at Codecov.
|
for p.tok != endTok && p.tok != token.EOF && !ellipsis.IsValid() { | ||
list = append(list, p.parseRHSOrType()) // builtins may expect a type: make(some type, ...) | ||
expr := p.parseRHSOrType(isCmd && len(list) == 0) | ||
if tuple, ok := expr.(*tupleExpr); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing
println (1, 2)*2
should return an error.
So, we should check if this statement is ended or not.