@@ -9,11 +9,11 @@ Subject: Parse whitespaces
99 test/corpus/constructs.txt | 810 +++++++++++++-
1010 test/corpus/cudafortran.txt | 39 +-
1111 test/corpus/expressions.txt | 675 ++++++++++-
12- test/corpus/line_continuations.txt | 117 +-
12+ test/corpus/line_continuations.txt | 124 + +-
1313 test/corpus/preprocessor.txt | 339 +++++-
1414 test/corpus/regressions.txt | 140 ++-
1515 test/corpus/statements.txt | 1660 +++++++++++++++++++++++++++-
16- 9 files changed, 3744 insertions(+), 83 deletions(-)
16+ 9 files changed, 3751 insertions(+), 83 deletions(-)
1717
1818diff --git a/grammar.js b/grammar.js
1919index c8ce7d9..a546930 100644
@@ -52,7 +52,7 @@ index c8ce7d9..a546930 100644
5252 $._external_end_of_statement,
5353 ),
5454diff --git a/src/scanner.c b/src/scanner.c
55- index e5a37ee..5fabf79 100644
55+ index 2c348ff..fc1b6bd 100644
5656--- a/src/scanner.c
5757+++ b/src/scanner.c
5858@@ -15,6 +15,7 @@ enum TokenType {
@@ -63,7 +63,7 @@ index e5a37ee..5fabf79 100644
6363 };
6464
6565 typedef Array(char *) StringArray;
66- @@ -451 ,10 +452 ,28 @@ static bool scan_preproc_unary_operator(TSLexer *lexer) {
66+ @@ -452 ,10 +453 ,28 @@ static bool scan_preproc_unary_operator(TSLexer *lexer) {
6767 return false;
6868 }
6969
@@ -95,7 +95,7 @@ index e5a37ee..5fabf79 100644
9595 }
9696
9797 // Close the current statement if we can
98- @@ -468 ,6 +487 ,16 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) {
98+ @@ -469 ,6 +488 ,16 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) {
9999 // statements, so we should eat all whitespace including
100100 // newlines, until we come to something more interesting
101101 while (iswspace(lexer->lookahead)) {
@@ -4437,7 +4437,7 @@ index 870a02e..c4b4bfe 100644
44374437 (number_literal)
44384438 (string_literal)))
44394439diff --git a/test/corpus/line_continuations.txt b/test/corpus/line_continuations.txt
4440- index ba12587..32739bf 100644
4440+ index caa7bf2..440f58e 100644
44414441--- a/test/corpus/line_continuations.txt
44424442+++ b/test/corpus/line_continuations.txt
44434443@@ -13,23 +13,34 @@ end program
@@ -4760,7 +4760,7 @@ index ba12587..32739bf 100644
47604760 (end_of_statement))))
47614761
47624762 ================================================================================
4763- @@ -338,21 +437,35 @@ end program test
4763+ @@ -338,22 +437,36 @@ end program test
47644764 (translation_unit
47654765 (program
47664766 (program_statement
@@ -4794,6 +4794,30 @@ index ba12587..32739bf 100644
47944794 (end_of_statement)
47954795 (end_program_statement
47964796+ (whitespace)
4797+ + (whitespace)
4798+ (name)
4799+ (end_of_statement))))
4800+
4801+ @@ -370,15 +483,22 @@ end program main
4802+ (translation_unit
4803+ (program
4804+ (program_statement
4805+ + (whitespace)
4806+ (name)
4807+ (end_of_statement))
4808+ + (whitespace)
4809+ (comment)
4810+ + (whitespace)
4811+ (print_statement
4812+ + (whitespace)
4813+ (format_identifier)
4814+ + (whitespace)
4815+ (output_item_list
4816+ (prefixed_string_literal
4817+ (string_literal))))
4818+ (end_of_statement)
4819+ (end_program_statement
4820+ + (whitespace)
47974821+ (whitespace)
47984822 (name)
47994823 (end_of_statement))))
0 commit comments