stadelmanma / tree-sitter-fortran

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

Support for intrinsic fortran functions #46

Closed ghost closed 3 years ago

ghost commented 3 years ago

I was looking for grammar rules for intrinsic fortran procedures (listed here), but didn't find any. Should we add it?

stadelmanma commented 3 years ago

Tree-sitter parsers are more targeted towards syntax and code constructs, so all those intrinsic procedures as well as user defined functions fall under the general "call statement" rule. See: https://github.com/stadelmanma/tree-sitter-fortran/blob/68786b2bee892137c3b735df836eabbe25361745/grammar.js#L878

I think some of the atom syntax highlighting stuff has provisions for highlighting specific keywords from the general AST output by the parser but I never looked into it.