Skip to content

Commit 865555f

Browse files
committed
Merge branch 'master' into codee
2 parents 210a9dc + ca6c338 commit 865555f

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

src/scanner.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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,

test/corpus/line_continuations.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,3 +469,25 @@ 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+
(name))
487+
(comment)
488+
(print_statement
489+
(format_identifier)
490+
(output_item_list
491+
(string_literal)))
492+
(end_program_statement
493+
(name))))

0 commit comments

Comments
 (0)