Page 1 of 1

[v2] Unable to parse continuation section inside enclosure

Posted: 05 Apr 2019, 15:41
by lvalkov
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.