Skip to content

Commit

Permalink
WI #1130 Remove flag FormalizedCommentLineEnd (#1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayanje committed Apr 12, 2019
1 parent dbdaa38 commit e6c201f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions TypeCobol/Compiler/Scanner/MultilineScanState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ public class MultilineScanState
/// </summary>
public bool InsideParamsField { get; private set; }

/// <summary>
/// True if we have reached the end of a Foramlized Comment
/// </summary>
public bool FormalizedCommentLineEnd { get; private set; }

/// <summary>
/// True if we are between two MultilineComments markups
/// </summary>
Expand Down Expand Up @@ -116,15 +111,14 @@ public void AddSymbolicCharacter(string tokenText)
/// Initialize scanner state for the first line
/// </summary>
public MultilineScanState(bool insideDataDivision, bool decimalPointIsComma, bool withDebuggingMode, Encoding encodingForAlphanumericLiterals) :
this(insideDataDivision, false, false, false, false, false, false, false, decimalPointIsComma, withDebuggingMode, encodingForAlphanumericLiterals)
this(insideDataDivision, false, false, false, false, false, false, decimalPointIsComma, withDebuggingMode, encodingForAlphanumericLiterals)
{ }

/// <summary>
/// Initialize scanner state
/// </summary>
public MultilineScanState(bool insideDataDivision, bool insideProcedureDivision, bool insidePseudoText, bool insideSymbolicCharacterDefinitions,
bool insideFormalizedComment, bool insideMultilineComments, bool insideParamsField,
bool formalizedCommentLineEnd,
bool decimalPointIsComma, bool withDebuggingMode, Encoding encodingForAlphanumericLiterals)
{
InsideDataDivision = insideDataDivision;
Expand All @@ -133,7 +127,6 @@ public void AddSymbolicCharacter(string tokenText)
InsideFormalizedComment = insideFormalizedComment;
InsideMultilineComments = insideMultilineComments;
InsideParamsField = insideParamsField;
FormalizedCommentLineEnd = formalizedCommentLineEnd;
InsideSymbolicCharacterDefinitions = insideSymbolicCharacterDefinitions;
DecimalPointIsComma = decimalPointIsComma;
WithDebuggingMode = withDebuggingMode;
Expand All @@ -147,9 +140,7 @@ public MultilineScanState Clone()
{
MultilineScanState clone = new MultilineScanState(InsideDataDivision, InsideProcedureDivision, InsidePseudoText, InsideSymbolicCharacterDefinitions,
InsideFormalizedComment, InsideMultilineComments, InsideParamsField,
FormalizedCommentLineEnd,
DecimalPointIsComma, WithDebuggingMode, EncodingForAlphanumericLiterals);
clone.FormalizedCommentLineEnd = FormalizedCommentLineEnd;
if (LastSignificantToken != null) clone.LastSignificantToken = LastSignificantToken;
if (BeforeLastSignificantToken != null) clone.BeforeLastSignificantToken = BeforeLastSignificantToken;
if (SymbolicCharacters != null)
Expand Down Expand Up @@ -245,7 +236,6 @@ public void AdvanceToNextStateAndAdjustTokenProperties(Token newToken)
break;
case TokenType.FORMALIZED_COMMENTS_STOP:
// Register the end of the formalized Comments
FormalizedCommentLineEnd = true;
InsideFormalizedComment = false;
InsideParamsField = false;
break;
Expand Down Expand Up @@ -506,7 +496,6 @@ public override bool Equals(object obj)
InsideFormalizedComment == otherScanState.InsideFormalizedComment &&
InsideParamsField == otherScanState.InsideParamsField &&
InsideMultilineComments == otherScanState.InsideMultilineComments &&
FormalizedCommentLineEnd == otherScanState.FormalizedCommentLineEnd &&

#if EUROINFO_RULES
InsideRemarksDirective == otherScanState.InsideRemarksDirective &&
Expand Down Expand Up @@ -537,7 +526,6 @@ public override int GetHashCode()
hash = hash * 23 + InsideFormalizedComment.GetHashCode();
hash = hash * 23 + InsideParamsField.GetHashCode();
hash = hash * 23 + InsideMultilineComments.GetHashCode();
hash = hash * 23 + FormalizedCommentLineEnd.GetHashCode();

#if EUROINFO_RULES
hash = hash * 23 + InsideRemarksDirective.GetHashCode();
Expand Down

0 comments on commit e6c201f

Please sign in to comment.