eirik-kjonstad / modern-fortran-syntax

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

Tweak number patterns and update scopes to latest conventions #37

Closed jwortmann closed 3 years ago

jwortmann commented 3 years ago

Tweaked the regex patterns to correctly detect some more valid numbers, and adjusted the scope names to the latest conventions (used in all the default syntaxes now).

Note: I removed the punctuation scope for the _ in numbers here, because I don't find it very useful and there isn't any comparable instance of it in other syntaxes that I know of. I would say the _dp is rather a part of the number token itself, and therefore has constant.number.suffix now. The highlighting for this scope can be adjusted/customized in the color scheme for number suffixes in all languages (assuming the latest syntax definitions are used), if it should have a different color from the rest of the number.