QB64 Phoenix Edition v3.3.0 Released!
#29
(10-14-2022, 04:14 AM)DSMan195276 Wrote:
(10-13-2022, 09:49 PM)Pete Wrote: If you turn SYNTAX CHECKING off, and then paste in something with a syntax error, which is also not indented, auto-indent will not occur. Apparently even though the syntax error is not reported in the IDE, it still notices the error and refuses to auto-indent the code as pasted.

I don't think what you're seeing is new, I'm pretty sure the auto-indent has always worked that way and stops indenting if it finds an invalid line regardless of how it gets there (pasted or just typed in).

I'd have to go digging but I would assume even when you turn the "syntax checker" off it still runs all the compilation logic and the syntax checking is used to do the auto indentation (and just doesn't report errors to you). I don't think this is really fixable because parsing the syntax is necessary to properly do the indentation. Lines like
FOR i = 1 TO 20: NEXT
require parsing the full line to understand the indentation of the following lines, and if you have Ex. a syntax error on a
LOOP
line then the auto indentation would screw everything up if it tried to ignore that line and keep going.

Makes sense the two are married. If a coder screwed up a code line that should trigger an indent, and the system didn't recognize it as a screw up, no indent would occur and that would screw up a correct , I call it a closing tag like the END IF of an IF/THEN statement. So interesting to point it out, have it explained, but I agree, not something to try and fix.

Thanks for having a look,

Pete
Reply


Messages In This Thread
RE: QB64 Phoenix Edition v3.3.0 Released! - by Pete - 10-14-2022, 06:22 AM



Users browsing this thread: 27 Guest(s)