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

Generate file with file name #100

Closed
wants to merge 3 commits into from
Closed

Conversation

splasky
Copy link

@splasky splasky commented May 5, 2018

No description provided.

@codecov-io
Copy link

codecov-io commented May 5, 2018

Codecov Report

Merging #100 into master will decrease coverage by 0.04%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #100      +/-   ##
==========================================
- Coverage   98.82%   98.78%   -0.05%     
==========================================
  Files          26       26              
  Lines        3840     3855      +15     
==========================================
+ Hits         3795     3808      +13     
- Misses         45       47       +2
Impacted Files Coverage Δ
shivyc/tree/nodes.py 100% <100%> (ø) ⬆️
tests/test_all.py 98% <100%> (+0.02%) ⬆️
shivyc/parser/declaration.py 98.59% <75%> (-0.92%) ⬇️

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 929345e...5e3476f. Read the comment docs.

@splasky
Copy link
Author

splasky commented May 8, 2018

Also solve issue #81

@splasky
Copy link
Author

splasky commented May 9, 2018

solve issue #71

Copy link
Owner

@ShivamSarodia ShivamSarodia left a comment

Choose a reason for hiding this comment

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

Apologies for my late review -- I've had a busy few weeks. I've left some comments on your changes :) FYI for next time, it's easiest to keep unrelated fixes in separate PRs so we can look at each individually and merge them faster.

Also, feel free to add yourself to the contributors list in the README.

"-o",
nargs="?",
metavar="file",
help="Place output into <file>",
Copy link
Owner

Choose a reason for hiding this comment

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

Nitpicky: for consistency, could you make the first letter of the help string lowercase?

@@ -118,6 +122,12 @@ def get_arguments():
parser.add_argument("-z-reg-alloc-perf",
help="display register allocator performance info",
dest="show_reg_alloc_perf", action="store_true")
parser.add_argument(
"-o",
nargs="?",
Copy link
Owner

Choose a reason for hiding this comment

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

If I am not mistaken, as written this will accept the command shivyc -o without warning or error. However, it appears GCC prints an error here, so we should do the same.

Copy link
Author

Choose a reason for hiding this comment

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

Fix this on new pull request #101 .Code review is required.

and token_is(index + 1, token_kinds.close_paren):
if token_is(index + 2, token_kinds.open_brack):
return params, index + 1
elif token_is(index + 1, token_kinds.identifier):
Copy link
Owner

Choose a reason for hiding this comment

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

I'm a little confused by this code. Isn't the token at index + 1 always going to be a close parenthesis here?

I think it would be easier to implement this in the semantic stage of the compiler (i.e. in the tree/ directory) rather than in the parser, since this isn't really a parsing issue as much as it's a semantic one.

Copy link
Author

Choose a reason for hiding this comment

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

Fix this on new pull request #102

@@ -600,6 +600,8 @@ def _generate_array_ctype(self, decl, prev_ctype):

def _generate_func_ctype(self, decl, prev_ctype):
"""Generate a function ctype from a given a decl_node."""
# save identifiers
identifiers = []
Copy link
Owner

Choose a reason for hiding this comment

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

Could you do this more easily on line 546 instead?

Copy link
Author

@splasky splasky May 23, 2018

Choose a reason for hiding this comment

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

Do you mean checking redefinition of identifier inside make_ctype?

Copy link
Author

Choose a reason for hiding this comment

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

Fix this on #104

@splasky
Copy link
Author

splasky commented May 23, 2018

OK.I will fix it! Thanks for your code reviewing and comment! :)

@splasky splasky closed this Sep 20, 2018
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