Skip to content

Commit 360f154

Browse files
committed
Merge tree-sitter-fortran/master
2 parents 210a9dc + ca6c338 commit 360f154

2 files changed

Lines changed: 34 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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff 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))))

0 commit comments

Comments
 (0)