stadelmanma / tree-sitter-fortran

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

Statement functions #102

Closed ZedThree closed 4 days ago

ZedThree commented 2 weeks ago

These look like:

name(x) = x**2

Spec is:

15.6.4 Statement function

A statement function is a function defined by a single statement.

R1547 stmt-function-stmt is function-name ( [ dummy-arg-name-list ] ) = scalar-expr

They're deprecated and should be replaced by normal functions. I don't think they are used very much at all in the wild, but they look like array-indexing syntax -- except that they can appear in the middle of variable declarations, where they trigger an error on the next line.