-
Notifications
You must be signed in to change notification settings - Fork 29
Implement code expander #49
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
Conversation
Do you think the "problems" should be resolved in the future? They seem to be hard to resolve with naive text-processing. Just to be sure, could you list pros & cons of text searching in Python and token parsing in Rust that you think? |
I think it's hard to solve the problem with a simple implement.
I think the following. Advantages of this script:
Disadvantages of this script:
|
Here are advantages/disadvantages of Rust implementation that I thought.
By the way, does "It works with a single file" mean "small, so it's easy to maintain"? If so, I agree with it. Anyway, without the "removing docs & tests" function, I think that script is reasonable to Rust implementation. |
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.
Why not apply Rustfmt with subprocess.run(..)
?
I added the process of rustfmt. |
Co-authored-by: Ryo Yamashita <[email protected]>
Co-authored-by: Ryo Yamashita <[email protected]>
493f875
to
7363691
Compare
Co-authored-by: Ryo Yamashita <[email protected]>
ed35949
to
fcacbc1
Compare
Co-authored-by: Ryo Yamashita <[email protected]>
e42d97c
to
2bcaf15
Compare
Closes #9
Closes #34
I have developed a script to combine the code into a single file at submission.
Usage
./expand.py dsu
./expand.py dsu fenwicktree
./expand.py convolution
- Import dsu with comments./expand.py --output-comment dsu
Problems
I removed the process to erase comments and test codes.
These problems were resolved.
- Removing test codeIt removes the test code by looking for#[cfg(test)]
on the source code and not reading after it in this implement.Therefore,if another code exists below the test code, it will disappear.- Removing commentIt simply looks for the // and delete the comment by not loading that line.It can't remove multiple line comments(using /* ... */).