Nov-11-2018, 07:35 PM
yeah, i am looking to modify code. but i am also looking to test if lines of code have a matching pattern. if so, the line will be subject to modification. if not, the line will be printed in whole. some modifications may need to wait until some later lines to determine what the modification is. some lines could be deleted.
the most difficult part is that things i will be looking for could be in quoted string literals. something that breaks up code from quoted string literal contents and comments would be useful, i think.
it is possible that a comment line or a comment at the end of a line could match the pattern as a false-positive. a # could be in a string literal giving a false appearance of a comment. comments could be a tough issue though not as tough for Python as C/Pike code was when i have needed to modify it, due to embedded comments.
the most difficult part is that things i will be looking for could be in quoted string literals. something that breaks up code from quoted string literal contents and comments would be useful, i think.
it is possible that a comment line or a comment at the end of a line could match the pattern as a false-positive. a # could be in a string literal giving a false appearance of a comment. comments could be a tough issue though not as tough for Python as C/Pike code was when i have needed to modify it, due to embedded comments.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.