PatternLanguage icon indicating copy to clipboard operation
PatternLanguage copied to clipboard

fix: Some errors related to preprocessor and lexer

Open lenrik1589 opened this issue 1 year ago • 2 comments

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;

lenrik1589 avatar Jan 16 '24 01:01 lenrik1589

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?

WerWolv avatar Mar 05 '24 19:03 WerWolv

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')

paxcut avatar Mar 05 '24 19:03 paxcut

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 avatar May 18 '24 22:05 lenrik1589

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.

paxcut avatar May 19 '24 02:05 paxcut