Skip to content

Suggestions for supporting line numbers #101

@cblc

Description

@cblc

I found that there were previous issue tickets asking for line numbers, and I feel that you don't plan to support them. I really need them, so I'm thinking in two possibilities: either modifying the parser (probably in the _get_symbol_type() function) so that every integer at the beginning of a line is understood as a label even if it doesn't end in ':', or writing a simple preprocessor that just inserts a ':' after every integer that appears at the beginning of a line, and issue an error if a line number is smaller than the previous line, in order to detect out-of-order lines (I tend to prefer this preprocessor idea, because that way I can keep my_basic unmodified, but if you think that the modification of the parser would be straightforward and safe, please just say it).

Now the question: would having a label in every line impact the performance of my_basic when running programs? (I don't mind if the parser takes more time, it's only the execution time what can worry me).

Thanks a lot!

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