Skip to content

Continuation line works when outside literal #1243

@smedilol

Description

@smedilol

Describe the bug
The continuation line character (- in column 7) is allowed in any statement.

  • It can be used to continue a literal on multiple lines
  • To split a statement in multiple lines even if it's not necessary in this case

Our parser treat the second usage as an error.

To Reproduce
(Type)Cobol code that cause the bug : (if any)

       IDENTIFICATION DIVISION.
       PROGRAM-ID. DVZF0OSM.
       data division.
       working-storage section.
       01 foo pic X(50).
       PROCEDURE DIVISION.
      
             move 'CHAMPS 082 A 085 INTERDITS EN OUVERTURE'
      -        to foo
      
           goback
           .
       END PROGRAM DVZF0OSM.

There is an error on the move statement.

Expected behavior
There should be no error on this program.

Metadata

Metadata

Assignees

Labels

BugCobolUser VisibleVisible by the end user. Useful to priorize issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions