[Bug 56480] New: vbscript: underscore line continue issues
https://bugs.winehq.org/show_bug.cgi?id=56480 Bug ID: 56480 Summary: vbscript: underscore line continue issues Product: Wine Version: 9.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs(a)winehq.org Reporter: francisdb(a)gmail.com Distribution: ---
cat test.vbs Class Tween Public Function Delay(length) Set Delay = Me WScript.Echo "Delay " & length End Function
Public Function Clear() Set Clear = Me WScript.Echo "Clear" End Function End Class Dim instance Set instance = new Tween WScript.Echo "chained" instance.Clear().Delay(1) WScript.Echo "chained with continuation dots after" ' works as expected instance. _ Clear(). _ Delay(1) WScript.Echo "chained with continuation dots before" ' 0114:fixme:wscript:ActiveScriptSite_OnScriptError instance.Clear() _ .Delay(1) WScript.Echo "chained with continuation dots before2" ' 0114:fixme:wscript:run_script ParseScriptText failed: 80004005 instance _ .Clear() _ .Delay(1) WScript.Echo "done" -- Linux Wine.
wine cscript test.vbs 0114:fixme:vbscript:parser_error L".Delay(1)\n\nWScript.Echo \"done\"\n": "syntax error" 0114:fixme:wscript:ActiveScriptSite_OnScriptError () 0114:fixme:wscript:run_script ParseScriptText failed: 80004005
-- Windows cscript
cscript test.vbs Microsoft (R) Windows Script Host Version 5.812 Copyright (C) Microsoft Corporation. All rights reserved.
chained Clear Delay 1 chained with continuation dots after Clear Delay 1 chained with continuation dots before Clear Delay 1 chained with continuation dots before2 Clear Delay 1 done -- Some more notes: * On wine by commenting out the last section you get a different error * I have also seen different errors depending on weather the functions called have arguments or not * Other uses of underscore do seem to work. Eg multiline Dim, multiline if. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56480 Jason Millard <jsm174(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm174(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56480 Robert Wilhelm <sloper42(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sloper42(a)yahoo.com Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Robert Wilhelm <sloper42(a)yahoo.com> --- confirming. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56480 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56480 --- Comment #2 from Robert Wilhelm <sloper42(a)yahoo.com> --- This is a lexer issue. In lex.c line 432ff, we check the char before the dot (ctx->ptr[-1]). This is wrong for line continuation. lex.c: case '.': /* * We need to distinguish between '.' used as part of a member expression and * a beginning of a dot expression (a member expression accessing with statement * expression) and a floating point number like ".2" . */ c = ctx->ptr > ctx->code ? ctx->ptr[-1] : '\n'; -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla