File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -389,6 +389,7 @@ static bool scan_string_literal(TSLexer *lexer) {
389389 advance (lexer );
390390 }
391391 }
392+ continue ;
392393 }
393394
394395 // If we hit the same kind of quote that opened this literal,
Original file line number Diff line number Diff line change @@ -469,3 +469,36 @@ end program test
469469 (whitespace)
470470 (name)
471471 (end_of_statement))))
472+
473+ ================================================================================
474+ Line continuation as part of string
475+ ================================================================================
476+ program main
477+ ! This should print "I like fish&chips"
478+ print *, "I like fish&&
479+ &chips"
480+ end program main
481+ --------------------------------------------------------------------------------
482+
483+ (translation_unit
484+ (program
485+ (program_statement
486+ (whitespace)
487+ (name)
488+ (end_of_statement))
489+ (whitespace)
490+ (comment)
491+ (whitespace)
492+ (print_statement
493+ (whitespace)
494+ (format_identifier)
495+ (whitespace)
496+ (output_item_list
497+ (prefixed_string_literal
498+ (string_literal))))
499+ (end_of_statement)
500+ (end_program_statement
501+ (whitespace)
502+ (whitespace)
503+ (name)
504+ (end_of_statement))))
You can’t perform that action at this time.
0 commit comments