Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Some errors related to preprocessor and lexer #75

Closed
wants to merge 1 commit into from

Conversation

lenrik1589
Copy link

Doc comments (both single line and multiline) now act as comments during preprocessing stage, but are kept for later use by lexer, which now supports single line doc comments now too.
Improved support for older macs! /hj (files with \r as line ending, are now handled by preprocessor by internally converting \r and \r\n line endings into \n).
Using multiline comments no longer mis-aligns execution errors.
Preprocessor directives are now listed in full instead of only "include" "define" and "pragma".
Not having an argument after directives with explicit arguments no longer throws cryptic error if there is no space, and throws an error if there is only a space;

Doc comments (both single line and multiline) now act as comments during preprocessing stage, but are kept for later use by lexer, which now supports single line doc comments now too;
Improved support for older macs! /hj (files with `\r` as line ending, are now handled by preprocessor by internally converting `\r` and `\r\n` line endings into `\n`);
Using multiline comments no longer mis-aligns execution errors;
Preprocessor directives are now listed in full instead of only "include" "define" and "pragma";
Not having an argument after directives with explicit arguments no longer throws cryptic error if there is no space, and throws an error if there is only a space;
@WerWolv
Copy link
Owner

WerWolv commented Mar 5, 2024

Thank you! Sorry, I didn't see your PR until now.
I think this has been mostly superseded by #77 now. What do you say @paxcut?

@paxcut
Copy link
Contributor

paxcut commented Mar 5, 2024

most definitely. The code is still using pre-refactored code so it can't be used as is, but I made sure (or at least tried ) to duplicate some of the fixes made here like handling /**/ and #define (nothing after last 'e')

@WerWolv WerWolv closed this May 3, 2024
@lenrik1589
Copy link
Author

Thank you! Sorry, I didn't see your PR until now.

Sorry for not responding, had life™, there was a discussion in the discord @ the time i posted the PR, you were in it as well, but it was in fact intended as a temporary fix for the old system, if the new system integrates these changes it's fine by me

@lenrik1589 lenrik1589 deleted the fix/misc_preprocessor branch May 18, 2024 22:00
@paxcut
Copy link
Contributor

paxcut commented May 19, 2024

I tried to implement all the changes you made and I did some testing for them. If you have a set of tests to run on the latest nightly it would be great if you could run them real quick in case something was missing.I am now finishing last details on a full syntax highlighter for the pattern editor which has to do with some of the issues addressed in this pr like comment delimiters under some circumstances so I could add more changes if needed.

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.

3 participants