diff --git a/codee/patches/0005-Consume-end_of_statement.patch b/codee/patches/0005-Consume-end_of_statement.patch index 11ed528..8964f43 100644 --- a/codee/patches/0005-Consume-end_of_statement.patch +++ b/codee/patches/0005-Consume-end_of_statement.patch @@ -13,7 +13,7 @@ they can also be consumed as `comment` tokens). 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scanner.c b/src/scanner.c -index 188fa2b..66f3fc9 100644 +index b11f0b2..846a5d8 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -288,7 +288,7 @@ static bool scan_end_of_statement(Scanner *scanner, TSLexer *lexer) { diff --git a/codee/patches/0012-Stop-parsing-continuation-lines-in-number-literals.patch b/codee/patches/0012-Stop-parsing-continuation-lines-in-number-literals.patch index 7ab2173..0e6bb90 100644 --- a/codee/patches/0012-Stop-parsing-continuation-lines-in-number-literals.patch +++ b/codee/patches/0012-Stop-parsing-continuation-lines-in-number-literals.patch @@ -9,12 +9,12 @@ them as a parsing error. This allows library users to handle such cases explicitly. --- src/scanner.c | 104 +++++++++++++++++++---------- - test/corpus/expressions.txt | 33 ++++----- + test/corpus/expressions.txt | 31 ++++----- test/corpus/line_continuations.txt | 3 +- - 3 files changed, 86 insertions(+), 54 deletions(-) + 3 files changed, 85 insertions(+), 53 deletions(-) diff --git a/src/scanner.c b/src/scanner.c -index 66f3fc9..86d4135 100644 +index 846a5d8..4b1a626 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -41,6 +41,7 @@ typedef struct { @@ -166,7 +166,7 @@ index 66f3fc9..86d4135 100644 return result; } -@@ -540,37 +561,41 @@ static bool scan_do_label_continue(Scanner *scanner, TSLexer *lexer, int32_t lab +@@ -542,37 +563,41 @@ static bool scan_do_label_continue(Scanner *scanner, TSLexer *lexer, int32_t lab } // check for label, number of boz token @@ -215,7 +215,7 @@ index 66f3fc9..86d4135 100644 } static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { -@@ -627,8 +652,13 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { +@@ -629,8 +654,13 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { valid_symbols[BOZ_LITERAL] || valid_symbols[DO_LABEL] || valid_symbols[DO_LABEL_CONTINUE]) { @@ -231,18 +231,9 @@ index 66f3fc9..86d4135 100644 } diff --git a/test/corpus/expressions.txt b/test/corpus/expressions.txt -index c6b7225..f55923b 100644 +index c6b7225..623668b 100644 --- a/test/corpus/expressions.txt +++ b/test/corpus/expressions.txt -@@ -964,7 +964,7 @@ program test - iostat=istat, & ! Comment followed by line continuation - & iomsg=imsg) - ! Note trailing whitespace after line continuation on next line -- error & -+ error & - stop - end program - @@ -1048,9 +1048,11 @@ end program (variable_declaration (intrinsic_type) diff --git a/codee/patches/0013-Ensure-nodes-appear-in-the-syntax-tree.patch b/codee/patches/0013-Ensure-nodes-appear-in-the-syntax-tree.patch index 261da99..3e8d170 100644 --- a/codee/patches/0013-Ensure-nodes-appear-in-the-syntax-tree.patch +++ b/codee/patches/0013-Ensure-nodes-appear-in-the-syntax-tree.patch @@ -40,7 +40,7 @@ index 4714989..bf52443 100644 // Due to the fact Fortran uses parentheses for both function calls and // array access there is no way to differentiate the two except for the diff --git a/test/corpus/expressions.txt b/test/corpus/expressions.txt -index f55923b..f1f67b5 100644 +index 623668b..2c56a86 100644 --- a/test/corpus/expressions.txt +++ b/test/corpus/expressions.txt @@ -1070,8 +1070,12 @@ end program diff --git a/codee/patches/0014-Allow-to-parse-macro-identifiers.patch b/codee/patches/0014-Allow-to-parse-macro-identifiers.patch index b9a10f8..3ea4eb1 100644 --- a/codee/patches/0014-Allow-to-parse-macro-identifiers.patch +++ b/codee/patches/0014-Allow-to-parse-macro-identifiers.patch @@ -45,7 +45,7 @@ index bf52443..afec324 100644 parenthesized_expression: $ => seq( diff --git a/src/scanner.c b/src/scanner.c -index 86d4135..2c83a47 100644 +index 4b1a626..87cb1b7 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -1,8 +1,9 @@ @@ -173,7 +173,7 @@ index 86d4135..2c83a47 100644 /// Need an external scanner to catch '!' before its parsed as a comment static bool scan_preproc_unary_operator(TSLexer *lexer) { const char next_char = lexer->lookahead; -@@ -672,14 +720,34 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { +@@ -674,14 +722,34 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { return true; } @@ -211,7 +211,7 @@ index 86d4135..2c83a47 100644 return false; } -@@ -689,6 +757,25 @@ void *tree_sitter_fortran_external_scanner_create() { +@@ -691,6 +759,25 @@ void *tree_sitter_fortran_external_scanner_create() { scanner->depth = 0; scanner->pending_label_virtual = 0; scanner->is_pending_eos_virtual = false; @@ -237,7 +237,7 @@ index 86d4135..2c83a47 100644 return scanner; } -@@ -724,6 +811,9 @@ unsigned tree_sitter_fortran_external_scanner_serialize(void *payload, +@@ -726,6 +813,9 @@ unsigned tree_sitter_fortran_external_scanner_serialize(void *payload, buffer[size] = (char)scanner->is_pending_eos_virtual; size += 1; @@ -247,7 +247,7 @@ index 86d4135..2c83a47 100644 return size; } -@@ -766,9 +856,18 @@ void tree_sitter_fortran_external_scanner_deserialize(void *payload, +@@ -768,9 +858,18 @@ void tree_sitter_fortran_external_scanner_deserialize(void *payload, scanner->is_pending_eos_virtual = buffer[size]; size += 1; diff --git a/codee/patches/0015-Unhide-_string_literal.patch b/codee/patches/0015-Unhide-_string_literal.patch index e26f594..9003351 100644 --- a/codee/patches/0015-Unhide-_string_literal.patch +++ b/codee/patches/0015-Unhide-_string_literal.patch @@ -172,7 +172,7 @@ index ed23535..8ffadde 100644 (identifier)) (end_of_statement)) diff --git a/test/corpus/expressions.txt b/test/corpus/expressions.txt -index f1f67b5..d1df55b 100644 +index 2c56a86..89412d2 100644 --- a/test/corpus/expressions.txt +++ b/test/corpus/expressions.txt @@ -191,55 +191,67 @@ END PROGRAM diff --git a/codee/patches/0017-Parse-whitespaces.patch b/codee/patches/0017-Parse-whitespaces.patch index 08dd102..d3160aa 100644 --- a/codee/patches/0017-Parse-whitespaces.patch +++ b/codee/patches/0017-Parse-whitespaces.patch @@ -8,12 +8,12 @@ Subject: Parse whitespaces src/scanner.c | 35 +- test/corpus/constructs.txt | 1118 ++++++++++++++--- test/corpus/cudafortran.txt | 43 +- - test/corpus/expressions.txt | 728 ++++++++++- + test/corpus/expressions.txt | 733 ++++++++++- test/corpus/line_continuations.txt | 136 ++- test/corpus/preprocessor.txt | 347 +++++- test/corpus/regressions.txt | 144 ++- test/corpus/statements.txt | 1829 ++++++++++++++++++++++++++-- - 9 files changed, 4042 insertions(+), 350 deletions(-) + 9 files changed, 4045 insertions(+), 352 deletions(-) diff --git a/grammar.js b/grammar.js index e006244..cf370b6 100644 @@ -52,7 +52,7 @@ index e006244..cf370b6 100644 $._external_end_of_statement, ), diff --git a/src/scanner.c b/src/scanner.c -index 2c83a47..4e9e5eb 100644 +index 87cb1b7..b3f0b24 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -19,6 +19,7 @@ enum TokenType { @@ -63,7 +63,7 @@ index 2c83a47..4e9e5eb 100644 }; typedef Array(char *) StringArray; -@@ -646,6 +647,22 @@ static BoolOrErr scan_label_number_boz(Scanner *scanner, TSLexer *lexer, +@@ -648,6 +649,22 @@ static BoolOrErr scan_label_number_boz(Scanner *scanner, TSLexer *lexer, return False; } @@ -86,7 +86,7 @@ index 2c83a47..4e9e5eb 100644 static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { // handle pending virtual labels and eos first if (valid_symbols[END_OF_STATEMENT]) { -@@ -660,9 +677,11 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { +@@ -662,9 +679,11 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { } } @@ -101,7 +101,7 @@ index 2c83a47..4e9e5eb 100644 } // Close the current statement if we can -@@ -676,6 +695,16 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { +@@ -678,6 +697,16 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { // statements, so we should eat all whitespace including // newlines, until we come to something more interesting while (iswspace(lexer->lookahead)) { @@ -2646,7 +2646,7 @@ index 8345910..6a9fae4 100644 + (whitespace)) (end_of_statement))) diff --git a/test/corpus/expressions.txt b/test/corpus/expressions.txt -index d1df55b..b06b578 100644 +index 89412d2..9688894 100644 --- a/test/corpus/expressions.txt +++ b/test/corpus/expressions.txt @@ -36,130 +36,214 @@ END PROGRAM @@ -3828,7 +3828,7 @@ index d1df55b..b06b578 100644 (name)) (end_of_statement))) -@@ -986,30 +1387,48 @@ end program +@@ -986,30 +1387,49 @@ end program (translation_unit (program (program_statement @@ -3871,6 +3871,7 @@ index d1df55b..b06b578 100644 + (whitespace) + (stop_statement + (whitespace) ++ (whitespace) + (whitespace)) (end_of_statement) - (end_program_statement) @@ -3879,7 +3880,7 @@ index d1df55b..b06b578 100644 (end_of_statement))) ================================================================================ -@@ -1026,15 +1445,20 @@ end program test +@@ -1026,15 +1446,20 @@ end program test (translation_unit (program (program_statement @@ -3900,14 +3901,14 @@ index d1df55b..b06b578 100644 (name)) (end_of_statement))) -@@ -1059,43 +1483,70 @@ end program +@@ -1059,43 +1484,70 @@ end program (translation_unit (program (program_statement + (whitespace) (name) (end_of_statement)) -+ (whitespace) ++ (whitespace) (variable_declaration (intrinsic_type) + (whitespace) @@ -3915,14 +3916,17 @@ index d1df55b..b06b578 100644 + (whitespace) + (whitespace) (identifier)) -+ (whitespace) - (ERROR +- (ERROR - (ERROR -+ (whitespace) -+ (whitespace) +- (number_literal)) +- (statement_label_reference)) ++ (whitespace) ++ (ERROR ++ (whitespace) ++ (whitespace) + (ERROR - (number_literal)) - (statement_label_reference)) ++ (number_literal)) ++ (statement_label_reference)) (end_of_statement) + (whitespace) (variable_declaration @@ -3943,7 +3947,7 @@ index d1df55b..b06b578 100644 + (whitespace) + (whitespace) (number_literal)) -+ (whitespace) ++ (whitespace) (identifier) + (whitespace) (call_expression @@ -3958,10 +3962,9 @@ index d1df55b..b06b578 100644 (implicit_range_letter) + (whitespace)) + (whitespace) ++ (ERROR (ERROR -- (number_literal)) -+ (ERROR -+ (number_literal)) + (number_literal)) (user_defined_operator_name) (number_literal)) + (whitespace) @@ -3974,7 +3977,7 @@ index d1df55b..b06b578 100644 (end_of_statement))) ================================================================================ -@@ -1121,34 +1572,54 @@ end program array_constructors +@@ -1121,34 +1573,54 @@ end program array_constructors (translation_unit (program (program_statement @@ -4030,7 +4033,7 @@ index d1df55b..b06b578 100644 (intrinsic_type (kind (keyword_argument -@@ -1159,15 +1630,22 @@ end program array_constructors +@@ -1159,15 +1631,22 @@ end program array_constructors (number_literal) (number_literal)))))) (end_of_statement) @@ -4053,7 +4056,7 @@ index d1df55b..b06b578 100644 (array_literal (implied_do_loop_expression (parenthesized_expression -@@ -1177,20 +1655,31 @@ end program array_constructors +@@ -1177,20 +1656,31 @@ end program array_constructors (argument_list (math_expression (identifier) @@ -4085,7 +4088,7 @@ index d1df55b..b06b578 100644 (output_item_list (call_expression (identifier) -@@ -1200,24 +1689,34 @@ end program array_constructors +@@ -1200,24 +1690,34 @@ end program array_constructors (kind (identifier))) (number_literal) @@ -4120,7 +4123,7 @@ index d1df55b..b06b578 100644 (output_item_list (array_literal (intrinsic_type -@@ -1225,14 +1724,20 @@ end program array_constructors +@@ -1225,14 +1725,20 @@ end program array_constructors (keyword_argument (identifier) (number_literal)))) @@ -4141,7 +4144,7 @@ index d1df55b..b06b578 100644 (name)) (end_of_statement))) -@@ -1267,108 +1772,168 @@ end subroutine foo +@@ -1267,108 +1773,168 @@ end subroutine foo (translation_unit (program (program_statement @@ -4311,7 +4314,7 @@ index d1df55b..b06b578 100644 (assignment_statement (call_expression (identifier) -@@ -1376,6 +1941,8 @@ end subroutine foo +@@ -1376,6 +1942,8 @@ end subroutine foo (extent_specifier (number_literal) (number_literal)))) @@ -4320,7 +4323,7 @@ index d1df55b..b06b578 100644 (concatenation_expression (identifier) (concatenation_expression -@@ -1383,14 +1950,19 @@ end subroutine foo +@@ -1383,14 +1951,19 @@ end subroutine foo (string_literal)) (identifier)))) (end_of_statement) @@ -4340,7 +4343,7 @@ index d1df55b..b06b578 100644 (name)) (end_of_statement))) -@@ -1410,43 +1982,71 @@ end subroutine test +@@ -1410,43 +1983,71 @@ end subroutine test (translation_unit (subroutine (subroutine_statement @@ -4412,7 +4415,7 @@ index d1df55b..b06b578 100644 (name)) (end_of_statement))) -@@ -1469,10 +2069,14 @@ end program test +@@ -1469,10 +2070,14 @@ end program test (translation_unit (program (program_statement @@ -4427,7 +4430,7 @@ index d1df55b..b06b578 100644 (call_expression (identifier) (argument_list -@@ -1480,36 +2084,53 @@ end program test +@@ -1480,36 +2085,53 @@ end program test (array_literal (number_literal) (number_literal)))))) @@ -4481,7 +4484,7 @@ index d1df55b..b06b578 100644 (call_expression (identifier) (argument_list -@@ -1523,10 +2144,14 @@ end program test +@@ -1523,10 +2145,14 @@ end program test (array_literal (number_literal) (number_literal)))))) @@ -4496,7 +4499,7 @@ index d1df55b..b06b578 100644 (call_expression (identifier) (argument_list -@@ -1538,10 +2163,14 @@ end program test +@@ -1538,10 +2164,14 @@ end program test (number_literal) (number_literal)) (number_literal))))) @@ -4511,7 +4514,7 @@ index d1df55b..b06b578 100644 (call_expression (identifier) (argument_list -@@ -1552,9 +2181,12 @@ end program test +@@ -1552,9 +2182,12 @@ end program test (array_literal (number_literal) (number_literal)))))) @@ -4524,7 +4527,7 @@ index d1df55b..b06b578 100644 (name)) (end_of_statement))) -@@ -1572,22 +2204,31 @@ end +@@ -1572,22 +2205,31 @@ end (translation_unit (program (program_statement @@ -4556,7 +4559,7 @@ index d1df55b..b06b578 100644 (number_literal)) (end_of_statement) (end_program_statement) -@@ -1614,50 +2255,73 @@ end +@@ -1614,50 +2256,73 @@ end (translation_unit (subroutine (subroutine_statement diff --git a/codee/patches/0019-Allow-macro_identifier-everywhere-an-identifier-is.patch b/codee/patches/0019-Allow-macro_identifier-everywhere-an-identifier-is.patch index 99a003c..5ed7280 100644 --- a/codee/patches/0019-Allow-macro_identifier-everywhere-an-identifier-is.patch +++ b/codee/patches/0019-Allow-macro_identifier-everywhere-an-identifier-is.patch @@ -7,13 +7,13 @@ Subject: Allow macro_identifier everywhere an identifier is grammar.js | 134 ++++---- test/corpus/constructs.txt | 441 ++++++++++++++++-------- test/corpus/cudafortran.txt | 15 +- - test/corpus/expressions.txt | 126 ++++--- + test/corpus/expressions.txt | 108 ++++-- test/corpus/floating.txt | 48 ++- test/corpus/line_continuations.txt | 54 ++- test/corpus/preprocessor.txt | 204 +++++++---- test/corpus/regressions.txt | 48 ++- test/corpus/statements.txt | 525 +++++++++++++++++++---------- - 9 files changed, 1039 insertions(+), 556 deletions(-) + 9 files changed, 1030 insertions(+), 547 deletions(-) diff --git a/grammar.js b/grammar.js index 674c697..99c1d05 100644 @@ -1947,7 +1947,7 @@ index 6a9fae4..ef80ee3 100644 (whitespace) (subroutine_call diff --git a/test/corpus/expressions.txt b/test/corpus/expressions.txt -index b06b578..4db06bc 100644 +index 9688894..2b0aa07 100644 --- a/test/corpus/expressions.txt +++ b/test/corpus/expressions.txt @@ -37,7 +37,8 @@ END PROGRAM @@ -2147,7 +2147,7 @@ index b06b578..4db06bc 100644 (end_of_statement)) (whitespace) (write_statement -@@ -1446,7 +1467,8 @@ end program test +@@ -1447,7 +1468,8 @@ end program test (program (program_statement (whitespace) @@ -2157,7 +2157,7 @@ index b06b578..4db06bc 100644 (end_of_statement)) (whitespace) (print_statement -@@ -1459,7 +1481,8 @@ end program test +@@ -1460,7 +1482,8 @@ end program test (end_program_statement (whitespace) (whitespace) @@ -2167,7 +2167,7 @@ index b06b578..4db06bc 100644 (end_of_statement))) ================================================================================ -@@ -1484,9 +1507,10 @@ end program +@@ -1485,7 +1508,8 @@ end program (program (program_statement (whitespace) @@ -2175,55 +2175,19 @@ index b06b578..4db06bc 100644 + (name + (identifier)) (end_of_statement)) -- (whitespace) -+ (whitespace) - (variable_declaration - (intrinsic_type) - (whitespace) -@@ -1494,13 +1518,13 @@ end program - (whitespace) - (whitespace) - (identifier)) -+ (whitespace) -+ (ERROR -+ (whitespace) - (whitespace) -- (ERROR -- (whitespace) -- (whitespace) - (ERROR -- (number_literal)) -- (statement_label_reference)) -+ (number_literal)) -+ (statement_label_reference)) - (end_of_statement) (whitespace) (variable_declaration -@@ -1521,7 +1545,7 @@ end program - (whitespace) - (whitespace) - (number_literal)) -- (whitespace) -+ (whitespace) - (identifier) - (whitespace) - (call_expression -@@ -1536,11 +1560,10 @@ end program - (implicit_range_letter) - (whitespace)) - (whitespace) -+ (ERROR +@@ -1540,8 +1564,7 @@ end program + (ERROR (ERROR -- (ERROR -- (number_literal)) + (number_literal)) - (user_defined_operator_name) - (number_literal)) -+ (number_literal)) + (user_defined_operator_name)) (whitespace) (whitespace) (number_literal)))) -@@ -1573,7 +1596,8 @@ end program array_constructors +@@ -1574,7 +1597,8 @@ end program array_constructors (program (program_statement (whitespace) @@ -2233,7 +2197,7 @@ index b06b578..4db06bc 100644 (end_of_statement)) (whitespace) (implicit_statement -@@ -1738,7 +1762,8 @@ end program array_constructors +@@ -1739,7 +1763,8 @@ end program array_constructors (end_program_statement (whitespace) (whitespace) @@ -2243,7 +2207,7 @@ index b06b578..4db06bc 100644 (end_of_statement))) ================================================================================ -@@ -1773,7 +1798,8 @@ end subroutine foo +@@ -1774,7 +1799,8 @@ end subroutine foo (program (program_statement (whitespace) @@ -2253,7 +2217,7 @@ index b06b578..4db06bc 100644 (end_of_statement)) (whitespace) (variable_declaration -@@ -1890,7 +1916,8 @@ end subroutine foo +@@ -1891,7 +1917,8 @@ end subroutine foo (subroutine (subroutine_statement (whitespace) @@ -2263,7 +2227,7 @@ index b06b578..4db06bc 100644 (end_of_statement)) (whitespace) (variable_declaration -@@ -1963,7 +1990,8 @@ end subroutine foo +@@ -1964,7 +1991,8 @@ end subroutine foo (end_subroutine_statement (whitespace) (whitespace) @@ -2273,7 +2237,7 @@ index b06b578..4db06bc 100644 (end_of_statement))) ================================================================================ -@@ -1983,7 +2011,8 @@ end subroutine test +@@ -1984,7 +2012,8 @@ end subroutine test (subroutine (subroutine_statement (whitespace) @@ -2283,7 +2247,7 @@ index b06b578..4db06bc 100644 parameters: (parameters (identifier) (whitespace) -@@ -2047,7 +2076,8 @@ end subroutine test +@@ -2048,7 +2077,8 @@ end subroutine test (end_subroutine_statement (whitespace) (whitespace) @@ -2293,7 +2257,7 @@ index b06b578..4db06bc 100644 (end_of_statement))) ================================================================================ -@@ -2070,7 +2100,8 @@ end program test +@@ -2071,7 +2101,8 @@ end program test (program (program_statement (whitespace) @@ -2303,7 +2267,7 @@ index b06b578..4db06bc 100644 (end_of_statement)) (whitespace) (assignment_statement -@@ -2187,7 +2218,8 @@ end program test +@@ -2188,7 +2219,8 @@ end program test (end_program_statement (whitespace) (whitespace) @@ -2313,7 +2277,7 @@ index b06b578..4db06bc 100644 (end_of_statement))) ================================================================================ -@@ -2205,7 +2237,8 @@ end +@@ -2206,7 +2238,8 @@ end (program (program_statement (whitespace) @@ -2323,7 +2287,7 @@ index b06b578..4db06bc 100644 (end_of_statement)) (whitespace) (variable_declaration -@@ -2256,7 +2289,8 @@ end +@@ -2257,7 +2290,8 @@ end (subroutine (subroutine_statement (whitespace) diff --git a/codee/patches/0021-Allow-call-expressions-in-derived-type-definitions.patch b/codee/patches/0021-Allow-call-expressions-in-derived-type-definitions.patch new file mode 100644 index 0000000..551cca2 --- /dev/null +++ b/codee/patches/0021-Allow-call-expressions-in-derived-type-definitions.patch @@ -0,0 +1,87 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Daniel Otero +Date: Thu, 16 Apr 2026 16:12:01 +0200 +Subject: Allow call expressions in derived type definitions + +To support macro calls that declare type members +--- + grammar.js | 4 +++ + test/corpus/constructs.txt | 53 ++++++++++++++++++++++++++++++++++++++ + 2 files changed, 57 insertions(+) + +diff --git a/grammar.js b/grammar.js +index 57d9d08..c93b475 100644 +--- a/grammar.js ++++ b/grammar.js +@@ -811,6 +811,10 @@ module.exports = grammar({ + $.preproc_call, + alias($.preproc_if_in_derived_type, $.preproc_if), + alias($.preproc_ifdef_in_derived_type, $.preproc_ifdef), ++ // This is required so that macro function calls are allowed to declare ++ // derived type field. The precedence is required for resolving ++ // ambiguity with ++ {"code":"deadline_exceeded","msg":"operation timed out"}