Skip to content

Comment detection bug in assembler.py #28

@iaminfinityiq

Description

@iaminfinityiq

In assembler.py, there is this section of the code:

# Remove comments and blanklines
    for comment_symbol in ['/', ';', '#']:
        lines = [line.split(comment_symbol)[0] for line in lines]
    lines = [line for line in lines if line.strip()]

which is for comment detections and removing the comments immediately. One of the bugs that this snippet can have is that I can do something like // ADD r1 r2 r3 and it would still assemble normally. Syntactically, this line of code is supposed to be a comment, but it isn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions