Skip to content

Commit

Permalink
v2.0.8 release (#108)
Browse files Browse the repository at this point in the history
* RegEx fix for labels with leading spaces.

* 98-Issue linting with multiple levels of quoting

* RegEx improvement for quoted strings

* Replace parenthesis and quoted strings with empty ones.
- Removed repetitive Trim()s
- Removed unnecessary RegEx tests
- Simplified line split on semicolon due to above changes.
- Results: Faster execution. Better coverage for split on semicolon

* - Cleanup lines[] array at start so repeated test/replace not needed
- Removed unnecessary trim()s
- Removed boolean equality tests. if(x.test == true) vs if(x.test)
- Fixed GOTO/GOSUB when followed by more than one space GOTO <s><s> 100

* RegEx fix-ups to support recent changes

* Corrected comment

* Linter RegEx cleanup

* FOR/NEXT tracking improvements and updated error messages
- Nested For/Next statements now validated
- NEXT with no variable is now allowed
- One line per error: Removed extraneous, repeated diagnostic messages
- Reworded / Clarified some error messages for consistency

* Minor code clean-up

* Replace char-at-a-time split on ; with split(";")

* Maintain original character spacing for Intellisense error markers
- RegEx improvements and consistency between client and server
- Improved getWord() function

* Corrected indentation for ELSE END with trailing comment (issue #45)

* Corrects Label error with GOTO/GOSUB. Issue #99
- Also now allows dotted numeric labels such as GOTO 100.5

* Revert "Corrects Label error with GOTO/GOSUB. Issue #99"

This reverts commit 68b0166.

* Inspect TM Scopes->Inspect Editor Token and Scopes

* Fix error processing customWordPath when last
line is blank. May relate to #24.

* Changed GOTO/GOSUB scope jumping message from Error to Warning

* Numerous updates related to For/Next and Label tracking
- Issue #45: Alignment of If/Else
- Issue #96: Allow periods in labels
- Issue #99: Corrected Label error with GOTO/GOSUB.
- Issue #104: Corrected For/Next with leading label
- Issue #105: Changed GOTO scope jumping message from Error to Warning
- RegEx: Label comments to include "REM, *, and !"
- NEXT can be used without FOR variable.

* Shipping 2.0.7

* Re-introduce accidentally deleted /doc files

* Fixes issue 107: FOR/NEXT error when no whitespace after FOR variable.

* Shipping 2.0.8

Co-authored-by: Kevin Powick <[email protected]>
Co-authored-by: Ian McGowan <[email protected]>
Co-authored-by: Peter Schellenbach <[email protected]>
  • Loading branch information
4 people authored Jun 11, 2020
1 parent 33522ff commit a452ca5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@
- Fixed bug with space-prefixed labels (#96)
- Improved linting (#98)
- Improved label detection with GOTO/GOSUB (#99)
- Fixed bug with FOR/NEXT linting with labels (#104)
- Fixed bug with FOR/NEXT linting with labels (#104)

## 2.0.8

- Fixed a bug with FOR/NEXT recognition and spacing (#107)
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mvbasic",
"displayName": "MV Basic",
"description": "MV Basic",
"version": "2.0.7",
"version": "2.0.8",
"publisher": "mvextensions",
"license": "MIT",
"icon": "../images/mvbasic-logo.png",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mvbasic",
"displayName": "MV Basic",
"description": "MV Basic",
"version": "2.0.7",
"version": "2.0.8",
"publisher": "mvextensions",
"license": "MIT",
"icon": "images/mvbasic-logo.png",
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mvbasic",
"displayName": "MV Basic",
"description": "MV Basic",
"version": "2.0.7",
"version": "2.0.8",
"publisher": "mvextensions",
"license": "MIT",
"icon": "../images/mvbasic-logo.png",
Expand Down
6 changes: 3 additions & 3 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function validateTextDocument(textDocument: TextDocument): void {
let rBlockAlways = new RegExp("(^| )(for |loop( |$))", "i");
let rBlockContinue = new RegExp(" (then|else|case|on error|locked)$", "i");
let rBlockEnd = new RegExp("(^| )(end|end case|next|next\\s+.+|repeat)$", "i");
let rStartFor = new RegExp("(^| )for\\s+.+", "i");
let rStartFor = new RegExp("(^| )for\\s+[\\w.]+\\s*=", "i");
let rEndFor = new RegExp("(^| )next($|\\s+.+$)", "i");
let rStartLoop = new RegExp("(^| )loop\\s*?", "i");
let rEndLoop = new RegExp("(^| )repeat\\s*$", "i");
Expand Down Expand Up @@ -327,7 +327,8 @@ function validateTextDocument(textDocument: TextDocument): void {
// and build errors list (forNextErr[]).
let arrFor = rStartFor.exec(line.lineOfCode)
if (arrFor !== null) {
let forvar = getWord(arrFor[0], 2);
let sFor = arrFor[0].split("=");
let forvar = getWord(sFor[0], 2);
forNext.push({ forVar: forvar, forLine: i });
}
let arrNext = rEndFor.exec(line.lineOfCode)
Expand Down Expand Up @@ -901,7 +902,6 @@ connection.onDefinition(params => {
});
return newProgram;
}
//let rLabel = new RegExp("(^[0-9]+\\s)|(^[0-9]+:\\s)|(^[\\w\\.]+:)", "i");
let rLabel = new RegExp(
"(^[0-9]+\\b)|(^[0-9]+)|(^[0-9]+:\\s)|(^[\\w\\.]+:(?!\\=))",
"i"
Expand Down

0 comments on commit a452ca5

Please sign in to comment.