#3989 closed Bug (Wont Fix)
SplashOff() not being parsed correctly by SyntaxCheck Prod and Tidy
Reported by: | GUIDTracker | Owned by: | |
---|---|---|---|
Milestone: | Component: | Au3Check | |
Version: | 3.3.16.1 | Severity: | None |
Keywords: | SplashOff | Cc: |
Description
I have noticed that both the Syntax Checker and Tidy programs used in SciTE don't parse the SplashOff command correctly (my understanding anyway). The Help text lists command as requiring trailing parenthesis ie. 'SplashOff ()', however, both Syntax Checker and Tidy ignore the trailing parenthesis. Scripts both tidy and compile successfully without throwing an error but leaving off the trailing parenthesis with the SplashOff command seems to break the script - see my attached example.
Attachments (1)
Change History (7)
Changed 11 months ago by guidtracker@…
comment:1 Changed 11 months ago by Jpm
- Component changed from AutoIt to Au3Check
comment:2 Changed 11 months ago by Jpm
In fact the SolashOff without parenthesis is legal when assign to a variable.
Local $v = SplashOff
That the reason why Au3check and certainly Tidy don't flag the Function
I don't think we can change that except in documentation
More Autoit builtin functions have the same behavior ProgressOff
comment:3 Changed 11 months ago by Jpm
- Resolution set to Wont Fix
- Status changed from new to closed
comment:4 Changed 10 months ago by anonymous
Jpm, this bug pertains only to Au3Check, NOT to AutoIt. It has nothing to do with the builtin functions; if we use a user-defined func is this *erroneous* way, the result is the same. So, in particular, there's no need to change the documentation.
AutoIt rightfully crashes with "Error parsing function call" because the function is NOT assigned to a variable!
#include <Misc.au3> MsgBox ; of course this will cause a crash! _IsPressed ; and this, too. ;The point is, the SyntaxChecker SHOULD catch this! but it doesn't... hence the ticket.
if it is assigned to a variable, then of course there's no problem.
#include <Misc.au3> $mb = MsgBox ;and this is perfectly fine. $ispressed = _IsPressed ;no problem here.
I recommend reopen the ticket and try to fix it when there's time. It is arguably not a critical bug, but a bug nonetheless.
~anonymous
comment:5 Changed 10 months ago by Jos
Not going to happen as au3check's purpose isn't to execute script but rather precheck for obvious errors. This one as explained is going to stay as it is.
... and I have no clue what Tidy has to do with any of this.
comment:6 Changed 10 months ago by anonymous
ok, a func all by itself on a single line is not a glaringly obvious error. rrrright. someone's got a 4-digit IQ... in binary! >:/
it can even be catched by a dead-simple regexp if anything else is ToO ComTPLicaTeD!
"(?m)^\s*\w+\s*(;.*)?$"
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Example script