Skip to content

Comments

Explicitly setting the line number fixes #44#54

Open
dr0ps wants to merge 1 commit intoMichael-F-Bryan:masterfrom
dr0ps:master
Open

Explicitly setting the line number fixes #44#54
dr0ps wants to merge 1 commit intoMichael-F-Bryan:masterfrom
dr0ps:master

Conversation

@dr0ps
Copy link

@dr0ps dr0ps commented Jan 4, 2022

I added a bunch of tests code for the various parts of the tool. I stepped through the failing tests with a debugger. I found that the test at the beginning of the parser line loop does not correctly break the loop at the next line as the current line is still empty. This is because the gcode will only be pushed by the next mnemonic, there is no comment and the line number is none. Therefore it helps to immediately set the line number when processing the first word. Unfortunately this seems to break the "G\n" case in the docs. I personally do not care for this case at all so I did not look into it. Now it parses Fusion360 generated code perfectly and that matters to me.

@dr0ps dr0ps changed the title Setting the line numer explicitly fixes #44 Explicitly Setting the line number fixes #44 Jan 4, 2022
@dr0ps dr0ps changed the title Explicitly Setting the line number fixes #44 Explicitly setting the line number fixes #44 Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant