eirik-kjonstad / modern-fortran-syntax

Modern Fortran syntax highlighting for Sublime Text 3/4
MIT License
10 stars 2 forks source link

Acc and OMP fixes #64

Closed MeraX closed 3 years ago

MeraX commented 3 years ago

Hi Erik,

Here comes a quick patch for the latest release. This adds device and host to addClauses and fixes issue with term order.

I hope the patches are self explanatory.

The term order fix is some how a workaround for an order dependency in the clauses lists. Somehow, the regexp code depends on the order of these clauses. It's not a big issue, if you order the terms carefully (i.e. FooBar before Foo), but maybe there it a simple regexp trick to make the matching more greedy. With the old syntax file, the line !$omp taskgroup would have been only detected as task not as taskgroup.

And thanks again for merging my previous PR so quickly. I hope this time, there are no errors with the new tests ;-) .

eirik-kjonstad commented 3 years ago

Thanks a lot for the PR! Sorry for the slow response - I'll take a look at the changes tomorrow!