@@ -364,21 +364,19 @@ class Lexer {
364
364
enum : char { Literal, Expr } Kind;
365
365
// Loc+Length for the segment inside the string literal, without quotes.
366
366
SourceLoc Loc;
367
- unsigned Length, IndentToStrip, CustomDelimiterLen ;
367
+ unsigned Length, IndentToStrip;
368
368
bool IsFirstSegment, IsLastSegment;
369
369
370
370
static StringSegment getLiteral (SourceLoc Loc, unsigned Length,
371
371
bool IsFirstSegment, bool IsLastSegment,
372
- unsigned IndentToStrip,
373
- unsigned CustomDelimiterLen) {
372
+ unsigned IndentToStrip) {
374
373
StringSegment Result;
375
374
Result.Kind = Literal;
376
375
Result.Loc = Loc;
377
376
Result.Length = Length;
378
377
Result.IsFirstSegment = IsFirstSegment;
379
378
Result.IsLastSegment = IsLastSegment;
380
379
Result.IndentToStrip = IndentToStrip;
381
- Result.CustomDelimiterLen = CustomDelimiterLen;
382
380
return Result;
383
381
}
384
382
@@ -390,7 +388,6 @@ class Lexer {
390
388
Result.IsFirstSegment = false ;
391
389
Result.IsLastSegment = false ;
392
390
Result.IndentToStrip = 0 ;
393
- Result.CustomDelimiterLen = 0 ;
394
391
return Result;
395
392
}
396
393
@@ -407,14 +404,13 @@ class Lexer {
407
404
SmallVectorImpl<char > &Buffer,
408
405
bool IsFirstSegment = false ,
409
406
bool IsLastSegment = false ,
410
- unsigned IndentToStrip = 0 ,
411
- unsigned CustomDelimiterLen = 0 );
407
+ unsigned IndentToStrip = 0 );
412
408
StringRef getEncodedStringSegment (StringSegment Segment,
413
409
SmallVectorImpl<char > &Buffer) const {
414
410
return getEncodedStringSegment (
415
411
StringRef (getBufferPtrForSourceLoc (Segment.Loc ), Segment.Length ),
416
412
Buffer, Segment.IsFirstSegment , Segment.IsLastSegment ,
417
- Segment.IndentToStrip , Segment. CustomDelimiterLen );
413
+ Segment.IndentToStrip );
418
414
}
419
415
420
416
// / \brief Given a string literal token, separate it into string/expr segments
@@ -478,8 +474,7 @@ class Lexer {
478
474
return diagnose (Loc, Diagnostic (DiagID, std::forward<ArgTypes>(Args)...));
479
475
}
480
476
481
- void formToken (tok Kind, const char *TokStart, bool IsMultilineString = false ,
482
- unsigned CustomDelimiterLen = 0 );
477
+ void formToken (tok Kind, const char *TokStart, bool MultilineString = false );
483
478
void formEscapedIdentifierToken (const char *TokStart);
484
479
485
480
// / Advance to the end of the line.
@@ -503,10 +498,10 @@ class Lexer {
503
498
void lexTrivia (syntax::Trivia &T, bool IsForTrailingTrivia);
504
499
static unsigned lexUnicodeEscape (const char *&CurPtr, Lexer *Diags);
505
500
506
- unsigned lexCharacter (const char *&CurPtr, char StopQuote,
507
- bool EmitDiagnostics , bool IsMultilineString = false ,
508
- unsigned CustomDelimiterLen = 0 );
509
- void lexStringLiteral (unsigned CustomDelimiterLen = 0 );
501
+ unsigned lexCharacter (const char *&CurPtr,
502
+ char StopQuote , bool EmitDiagnostics ,
503
+ bool MultilineString = false );
504
+ void lexStringLiteral ();
510
505
void lexEscapedIdentifier ();
511
506
512
507
void tryLexEditorPlaceholder ();
0 commit comments