stadelmanma / tree-sitter-fortran

Fortran grammar for tree-sitter
MIT License
30 stars 15 forks source link

Even more features and fixes #76

Closed ZedThree closed 1 year ago

ZedThree commented 1 year ago

New features:

Fixes:

Plus tests for all of the above

Closes #3 Closes #47 Closes #73

ZedThree commented 1 year ago

Comments after line continuations are still a bit broken as it doesn't handle the & at the start of the next line:

    write(*, "('Testing line continuation')", &
       &  advance='no', &  ! Comment after line continuation
       &  iostat=istat)

gives:

  (write_statement
      (unit_identifier)
      (format_identifier (string_literal))
      (keyword_argument (identifier) (string_literal))
-      (ERROR
-        (comment)
-        (UNEXPECTED '&')))
+     (comment)
+     (keyword_argument (identifier) (identifier)))