Mabofoul/move newline to end#5
Open
NoneSince wants to merge 17 commits into
Open
Conversation
…s of header files, removed boost dependancy, removed/added spaces. included @xtrm-en work of PR #1, except his makefile (his makefile is better but i wont copy others work)
general improvement
ordering CON_TOKENTYPE handlers/types like ordered in enum CON_TOKENTYPE
The reason: i want to push the changs one step at a time to make it easier to review.
src/*: whitespaces src/construct.cpp: added a note you explained in the youtube video README.md: added eexplaination for "-o" flag
…he enums in src/construct_types.h
warning 2: functions missing return statements warning 3: for loop index is of type int but is compared to a value of type size_t
…t. also it is used in src/construct_flags.cpp so i added declaration. con_type looks like the token types while also being only used in the file itself so i renamed to _con_type. apply_macro_to_token() is used only in the file itself, so i set it as static and removed it from the header.
cstring is included for strcmp. so I replaced it with std::string comparison. boost is used for split, is_any_of, and to_lower. so I implemented the functionality we need.
… the types and functions you directly use, and not depend on the current header files to complete the needed includes. for example: the file src/construct_flags.h only needs to know the type std::string, so only #include <string>, and since the function implementation appears in src/construct_flags.cpp, it also needs an #include <string>. you should put that same include in both .h and .cpp files, since technically the .h file can be empty, then it won't have includes for arguments types, the .cpp has to do the includes. explaination for the importance of this rule: i remember something like this: <string> under one compiler / operating system does #include <algorithm> inside the header, so the program in the story ran filne without noticing the need of direct #include <algorithm>. once the same code was compiled with a different compiler / OS, it failed compilation since <algorithm> was not included.
…hrow error;". before, an error could go unnoticed, but now the program will end automatically (I didn't do try-catch)
Mabofoul/step by step
Thomas-995
reviewed
Jan 31, 2024
Thomas-995
left a comment
Owner
There was a problem hiding this comment.
I guess this is more of a naming issue, but I see no reason to confine the reg_to_str function to ONLY being able to use the current used bitwidth it just looks cleaner with it as an input parameter. The naming on the bitwidth variable should definitely be something else though to avoid this kind of confusion. Kind of same thing with the static function thing, it's not like the function should NEVER be used from any other file so I see no reason to make it static (though if you have a good reason it could be right). Also you say you changed it to _con_type but I dont see any such change in the code, only for con_condition?
Author
|
Replied in PR #3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
output asm file started with an empty line and didn't end with an empty line