Skip to content

Commit

Permalink
Issue #1243 Remove diagnostic: first char after continuation line sho…
Browse files Browse the repository at this point in the history
…uld be a quotation mark
  • Loading branch information
BALLMA authored and BALLMA committed Feb 12, 2019
1 parent 48277cf commit 1bcff52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Line -1[5,6] <22, Error, Tokens> - Because the alphanumeric literal on the previ
[2,5: ]<SpaceSeparator>
=>continuation:[6,15:"toto and titi4"]<AlphanumericLiteral>(",Y,Y){toto and titi4}
[16,16+:.]<PeriodSeparator>
Line -1[5,5] <21, Error, Tokens> - The first non blank character of this continuation line must be " (continuation of the alphanumeric literal on the previous line)

-- Line 11 --
=>continued:[1,7:"toto 'and titi5"]<AlphanumericLiteral>(",Y,Y){toto 'and titi5}
Expand All @@ -48,7 +47,6 @@ Line -1[5,5] <21, Error, Tokens> - The first non blank character of this continu
[2,5: ]<SpaceSeparator>
=>continuation:[6,16:"toto 'and titi5"]<AlphanumericLiteral>(",Y,Y){toto 'and titi5}
[17,17+:.]<PeriodSeparator>
Line -1[5,5] <21, Error, Tokens> - The first non blank character of this continuation line must be " (continuation of the alphanumeric literal on the previous line)

-- Line 13 --
=>continued:[1,8:"toto ""and titi6"]<AlphanumericLiteral>(",Y,Y){toto "and titi6}
Expand Down Expand Up @@ -108,7 +106,6 @@ Line -1[5,6] <22, Error, Tokens> - Because the alphanumeric literal on the previ
-- Line 27 --
[2,5: ]<SpaceSeparator>
[6,19:"and titi11c' ]<AlphanumericLiteral>(",Y,N){and titi11c' }
Line -1[5,5] <21, Error, Tokens> - The first non blank character of this continuation line must be ' (continuation of the alphanumeric literal on the previous line)

-- Line 28 --
=>continued:[1,7:'toto "and titi11d']<AlphanumericLiteral>(',Y,Y){toto "and titi11d}
Expand All @@ -117,7 +114,6 @@ Line -1[5,5] <21, Error, Tokens> - The first non blank character of this continu
[2,5: ]<SpaceSeparator>
=>continuation:[6,18:'toto "and titi11d']<AlphanumericLiteral>(',Y,Y){toto "and titi11d}
[19,19: ]<SpaceSeparator>
Line -1[5,5] <21, Error, Tokens> - The first non blank character of this continuation line must be ' (continuation of the alphanumeric literal on the previous line)

-- Line 30 --
[1,1: ]<SpaceSeparator>
Expand Down
9 changes: 2 additions & 7 deletions TypeCobol/Compiler/Scanner/Scanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,8 @@ public static void ScanTokensLineContinuationGroup(IList<TokensLine> continuatio
// Check if the last token so far is an alphanumeric or national literal
if (lastTokenOfConcatenatedLineSoFar.TokenFamily == TokenFamily.AlphanumericLiteral)
{
// The continuation line must contain a hyphen in the indicator area, and the first nonblank character must be a quotation mark
if (line[startOfContinuationIndex] != lastTokenOfConcatenatedLineSoFar.ExpectedClosingDelimiter)
{
continuationLine.AddDiagnostic(MessageCode.InvalidFirstCharForContinuationLine, startOfContinuationIndex, startOfContinuationIndex, lastTokenOfConcatenatedLineSoFar.ExpectedClosingDelimiter);
}
// The continuation of the literal begins with the character immediately following the quotation mark.
else
//// The continuation of the literal begins with the character immediately following the quotation mark.
if (line[startOfContinuationIndex] == lastTokenOfConcatenatedLineSoFar.ExpectedClosingDelimiter)
{
offsetForLiteralContinuation = 1;

Expand Down

0 comments on commit 1bcff52

Please sign in to comment.