Bug 149402 - VBA parsing bug with multiline continuation in comment ending with a whitespace
Summary: VBA parsing bug with multiline continuation in comment ending with a whitespace
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.4.0 target:7.3.5
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-31 12:45 UTC by Andreas Heinisch
Modified: 2022-06-06 15:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Heinisch 2022-05-31 12:45:36 UTC
Description:
Consider the following macro code where the line ' _ ends with a whitespace:

sub foo
  ' _ 
  If 1 Then
  Else
  End If
end sub

Steps to Reproduce:
Copy paste the code above to the BASIC IDE in LibreOffice.

Actual Results:
Parsing error.

Expected Results:
Program runs without an error since the line continuation character is not at the end of the line.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (C.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3~rc2-0ubuntu0.18.04.1~lo1
Calc: threaded
Comment 1 Commit Notification 2022-06-06 08:25:08 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fbce18558a58cddf910b788a67c2f2d4d25d68e9

tdf#149402 - BASIC: Don't extend comment if line ends in a whitespace

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2022-06-06 15:09:26 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/ed3d572b730d1873dd66fa2a31695248d506a335

tdf#149402 - BASIC: Don't extend comment if line ends in a whitespace

It will be available in 7.3.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.