Skip to content

Commit e198357

Browse files
pedro-ricardokrvajal
authored andcommitted
Minor release for version 1.3.1 (#80)
* Subroutine arguments highlight improvement. * Fix symbol list function regex. * Add '\b' word bound character to avoid false posivites with user variables. * Replace search for ')' with ')'or'&' to mark functions with more than one line of arguments. * Add look for '&' character in 'dummy-variable-list'. * Correct indentation. * Update changelog. * Update Date and Version. * Update package version and correct VSCode warning. * Revert wrong fix of warning (Older vscode version).
1 parent 1968fc9 commit e198357

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ All notable changes to this extension will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## [1.3.0] - 2018-06-18
8+
## [1.3.1] - 2018-06-26
99

1010
### Fixed
11-
* Subroutine symbol list was failing with more than one line arguments (#71)
11+
* Subroutine and function on symbol list were failing with more than one line arguments (#71)
1212
* Minor syntax highlighting issues (#62, #73)
1313

1414
## Added
1515
* Implementation of OpenMP directives highlighting (#17)
16+
* Syntax highlight on multiple line of dummy arguments
1617

1718
## [1.2.0] - 2018-05-25
1819

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "linter-gfortran",
33
"displayName": "Modern Fortran",
44
"description": "Modern Fortran language support, including syntax highlighting and error detection.",
5-
"version": "1.3.0",
5+
"version": "1.3.1",
66
"publisher": "krvajalm",
77
"engines": {
88
"vscode": "^1.19.0"

src/lib/functions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const parseSubroutine = (line: TextLine) => {
7474
return _parse(line, MethodType.Subroutine);
7575
};
7676
export const _parse = (line: TextLine, type: MethodType) => {
77-
const functionRegEx = /([a-zA-Z]+(\([\w.=]+\))*)*\s*function\s*([a-zA-Z_][a-z0-9_]*)\s*\((\s*[a-z_][a-z0-9_,\s]*)*\s*\)\s*(result\([a-z_][\w]*\))*/i;
77+
const functionRegEx = /([a-zA-Z]+(\([\w.=]+\))*)*\s*\bfunction\b\s*([a-zA-Z_][a-z0-9_]*)\s*\((\s*[a-z_][a-z0-9_,\s]*)*\s*(\)|\&)\s*(result\([a-z_][\w]*(\)|\&))*/i;
7878
const subroutineRegEx = /^\s*(?!\bend\b)\w*\s*\bsubroutine\b\s*([a-z][a-z0-9_]*)\s*(?:\((\s*[a-z][a-z0-9_,\s]*)*\s*(\)|\&))*/i;
7979
const regEx =
8080
type === MethodType.Subroutine ? subroutineRegEx : functionRegEx;

syntaxes/fortran_free-form.tmLanguage.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -4786,7 +4786,7 @@
47864786
"name": "punctuation.definition.parameters.begin.fortran"
47874787
}
47884788
},
4789-
"end": "(\\)|(?=\\n))",
4789+
"end": "\\)|(?=\\n)",
47904790
"endCaptures": {
47914791
"0": {
47924792
"name": "punctuation.definition.parameters.end.fortran"
@@ -4795,6 +4795,9 @@
47954795
"patterns": [
47964796
{
47974797
"include": "#dummy-variable"
4798+
},
4799+
{
4800+
"include": "#line-continuation-operator"
47984801
}
47994802
]
48004803
},

0 commit comments

Comments
 (0)