diff --git a/CHANGELOG.md b/CHANGELOG.md index 43d0d382..b30ff72a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed +- Fixed `error stop variable` syntax highlighting + ([#486](https://github.com/fortran-lang/vscode-fortran-support/issues/486)) - Fixed issue with linter cache containing outdated folders ([#464](https://github.com/fortran-lang/vscode-fortran-support/issues/464)) - Fixed slow performance of very long lines by using a different solution for diff --git a/syntaxes/fortran_free-form.tmLanguage.json b/syntaxes/fortran_free-form.tmLanguage.json index 7f187bd0..27830548 100644 --- a/syntaxes/fortran_free-form.tmLanguage.json +++ b/syntaxes/fortran_free-form.tmLanguage.json @@ -2203,6 +2203,9 @@ { "include": "#string-operators" }, + { + "include": "#variable" + }, { "include": "#invalid-character" } diff --git a/test/resources/error-stop.f90 b/test/resources/error-stop.f90 new file mode 100644 index 00000000..43adf081 --- /dev/null +++ b/test/resources/error-stop.f90 @@ -0,0 +1,4 @@ +error stop +error stop 10 +error stop "val"//"10" +error stop label diff --git a/test/resources/error-stop.f90.snap b/test/resources/error-stop.f90.snap new file mode 100644 index 00000000..38bab146 --- /dev/null +++ b/test/resources/error-stop.f90.snap @@ -0,0 +1,21 @@ +>error stop +#^^^^^^^^^^ source.fortran.free meta.statement.control.errorstop.fortran keyword.control.errorstop.fortran +>error stop 10 +#^^^^^^^^^^ source.fortran.free meta.statement.control.errorstop.fortran keyword.control.errorstop.fortran +# ^ source.fortran.free meta.statement.control.errorstop.fortran +# ^^ source.fortran.free meta.statement.control.errorstop.fortran constant.numeric.fortran +>error stop "val"//"10" +#^^^^^^^^^^ source.fortran.free meta.statement.control.errorstop.fortran keyword.control.errorstop.fortran +# ^ source.fortran.free meta.statement.control.errorstop.fortran +# ^ source.fortran.free meta.statement.control.errorstop.fortran string.quoted.double.fortran punctuation.definition.string.begin.fortran +# ^^^ source.fortran.free meta.statement.control.errorstop.fortran string.quoted.double.fortran +# ^ source.fortran.free meta.statement.control.errorstop.fortran string.quoted.double.fortran punctuation.definition.string.end.fortran +# ^^ source.fortran.free meta.statement.control.errorstop.fortran keyword.other.concatination.fortran +# ^ source.fortran.free meta.statement.control.errorstop.fortran string.quoted.double.fortran punctuation.definition.string.begin.fortran +# ^^ source.fortran.free meta.statement.control.errorstop.fortran string.quoted.double.fortran +# ^ source.fortran.free meta.statement.control.errorstop.fortran string.quoted.double.fortran punctuation.definition.string.end.fortran +>error stop label +#^^^^^^^^^^ source.fortran.free meta.statement.control.errorstop.fortran keyword.control.errorstop.fortran +# ^ source.fortran.free meta.statement.control.errorstop.fortran +# ^^^^^ source.fortran.free meta.statement.control.errorstop.fortran meta.parameter.fortran +> \ No newline at end of file