[v2] Unable to parse continuation section inside enclosure

Report problems with documented functionality
User avatar
lvalkov
Posts: 32
Joined: 08 Mar 2019, 16:39

[v2] Unable to parse continuation section inside enclosure

05 Apr 2019, 15:41

Given:

Code: Select all

boxes := () => (
	MsgBox('
	(
		Multi.
		Line.
		Text.
	)'), 
	MsgBox('Another function.')
)

%boxes%()
A continuation-section nested inside a continuation-by-enclosure cannot be parsed properly, resulting in the following error message:

Code: Select all

E:\enclosure.ahk (1) : ==> Missing "'"
     Specifically: boxes := () => ( MsgBox('Multi.
Line.
Text.'),
To resolve this issue, one can place the first expression on the same line, where the continuation-by-enclosure block began:

Code: Select all

boxes := () => (MsgBox('
	(
		Multi.
		Line.
		Text.
	)'), 
	MsgBox('Another function.')
)
I am of the opinion that this should be supported without having to resort to the workaround, since continuation-by-enclosure blocks, which do not contain nested continuation-sections, are presently being parsed correctly:

Code: Select all

boxes := () => (
	MsgBox('Multi.`nLine.`nText.'),
	MsgBox('Another function.')
)


I was torn between posting in the AHK v2 Dev subforum and here. Apologies if only AHK v1 bugs were meant to be reported here. I did so because it seemed only fitting.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 7 guests