Skip to content

Commit

Permalink
fixes due to findings by Grover (P1 testing)
Browse files Browse the repository at this point in the history
- Clean up Syntax recognition of block names - Statements like 'DAT{{' caused problems (exposed other potential issues, which are now fixed)
- Clean up Semantic highlighting of code in presence of statements like 'DAT{{'
- P2 BUGFIX repair VAR name detection when storage type not provided
  • Loading branch information
ironsheep committed Jan 2, 2024
1 parent 2877930 commit b0df2d1
Show file tree
Hide file tree
Showing 21 changed files with 1,061 additions and 1,063 deletions.
8 changes: 8 additions & 0 deletions spin2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Possible next additions:
- Add new-file templates as Snippets
- Add additional Snippets as the community identifies them

## [2.2.12] 2024-01-02

Update P1 and P2

- Clean up Syntax recognition of block names - Statements like 'DAT{{' caused problems (exposed other potential issues, which are now fixed)
- Clean up Semantic highlighting of code in presence of statements like 'DAT{{'
- P2 BUGFIX repair VAR name detection when storage type not provided

## [2.2.11] 2023-12-30

Update P2 Only
Expand Down
2 changes: 1 addition & 1 deletion spin2/TEST_LANG_SERVER/spin/_method_signature_demo.spin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CON

PUB main() : ok
PUB main : ok
'' our main entry point
''
'' @returns ok - return T/F where T means start succeeded
Expand Down
3 changes: 1 addition & 2 deletions spin2/TEST_LANG_SERVER/spin2/221206-fixes.spin2
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ pn_ res 1 'pin(s)
' -----------------------------------------------------------------

CON
_clkfreq = 100_000_000
debug_main 'single-step through main code <---- BAD debug_main is NOT a constant

debug_coginit 'single-step through main code <---- BAD debug_main is NOT a constant
Expand Down Expand Up @@ -105,7 +104,7 @@ DAT
launch_spin loc ptrb,#\$80000 'point to zeroes in empty hub space

' -----------------------------------------------------------------
CON _clkfreq = 200_000_000
CON

'debug_main 'uncomment to single-step through everything, even COGINITs
'debug_coginit 'uncomment to break on COGINITs
Expand Down
13 changes: 2 additions & 11 deletions spin2/TEST_LANG_SERVER/spin2/debug_coloring_examples.spin2
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ PUB go() | i
' -----------------
' SCOPE (2)

CON _clkfreq = 100_000_000

PUB go2() | a, af, b, bf
debug(`SCOPE MyScope)
Expand All @@ -63,7 +62,6 @@ PUB go2() | a, af, b, bf

' -----------------
' TERM (1)
CON _clkfreq = 10_000_000

PUB go3() | i
debug(`TERM MyTerm SIZE 9 1 TEXTSIZE 40)
Expand All @@ -75,7 +73,6 @@ PUB go3() | i
' -----------------
' LOGIC (1)

CON _clkfreq = 10_000_000
PUB go4() | i
debug(`LOGIC MyLogic SAMPLES 32 'Low' 3 'Mid' 2 'High')
debug(`MyLogic TRIGGER $07 $04 HOLDOFF 2)
Expand All @@ -87,14 +84,13 @@ PUB go4() | i
' -----------------
' LOGIC (2)

CON _clkfreq = 333_333_333 'go really fast, 3ns clock period
rxpin = 24
CON rxpin = 24
txpin = rxpin + 1
samps = 32
bufflongs = samps / 16
xmode = $D0800000 + rxpin << 17 + samps 'streamer mode

VAR buff[bufflongs]
VAR buff[bufflongs + samps]

PUB go5() | i, buffaddr

Expand Down Expand Up @@ -125,7 +121,6 @@ repeat
' -----------------
' FFT

CON _clkfreq = 100_000_000
PUB go6() | i, j, k
' Set up FFT
debug(`FFT MyFFT SIZE 250 200 SAMPLES 2048 0 127 RATE 256 LOGSCALE COLOR YELLOW 4 YELLOW 5)
Expand All @@ -143,7 +138,6 @@ PUB go6() | i, j, k
' -----------------
' Spectro

CON _clkfreq = 100_000_000
PUB go7() | i, j, k
' Set up SPECTRO
debug(`SPECTRO MySpectro SAMPLES 2048 0 236 RANGE 1000 LUMA8X GREEN)
Expand All @@ -160,7 +154,6 @@ PUB go7() | i, j, k
' -----------------
' Plot

CON _clkfreq = 10_000_000
PUB go8(): i, j, k
debug(`plot myplot size 400 480 backcolor white update)
debug(`myplot origin 200 200 polar -64 -16)
Expand Down Expand Up @@ -189,7 +182,6 @@ PUB go8(): i, j, k
' -----------------
' Bitmap

CON _clkfreq = 10_000_000
PUB go9() | i
debug(`bitmap MyBitmap SIZE 32 16 DOTSIZE 8 LUT2 LONGS_2BIT)
debug(`MyBitmap TRACE 14 LUTCOLORS WHITE RED BLUE YELLOW 6)
Expand Down Expand Up @@ -233,7 +225,6 @@ flag long %%3333333333333330
' -----------------
' Bitmap (2)

CON _clkfreq = 100_000_000
PUB go10() | i
debug(`bitmap a title 'LUT1' pos 100 100 trace 2 lut1 longs_1bit alt)
debug(`bitmap b title 'LUT2' pos 370 100 trace 2 lut2 longs_2bit alt)
Expand Down
6 changes: 3 additions & 3 deletions spin2/TEST_LANG_SERVER/spin2/docs-spin2-language.spin2
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ CON
' -----------------------------------------------------------------------------

CON_NAME = CLKMODE
CON_NAME = CLKFREQ
CON_NAME2 = CLKFREQ

CON

CON_NAME = CLKMODE
CON_NAME = CLKFREQ
CON_NAME3 = CLKMODE
CON_NAME4 = CLKFREQ

PUB something()

Expand Down
2 changes: 1 addition & 1 deletion spin2/client/src/spin.code.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class SpinCodeUtils {
}
}
if (startStatus) {
this._logMessage("** isSectStart line=[" + line + "]");
this._logMessage(`** isSectStart codeUt line=[${line}]`);
}
return {
isSectionStart: startStatus,
Expand Down
2 changes: 1 addition & 1 deletion spin2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"icon": "images/Propeller.ico",
"author": "IronSheep",
"license": "MIT",
"version": "2.2.11",
"version": "2.2.12",
"repository": {
"type": "git",
"url": "https://github.com/ironsheep/P2-vscode-langserv-extension"
Expand Down
2 changes: 1 addition & 1 deletion spin2/scripts/LIVE-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"icon": "images/Propeller.ico",
"author": "IronSheep",
"license": "MIT",
"version": "2.2.11",
"version": "2.2.12",
"repository": {
"type": "git",
"url": "https://github.com/ironsheep/P2-vscode-langserv-extension"
Expand Down
2 changes: 1 addition & 1 deletion spin2/scripts/TEST-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "P1 and P2 Spin/Pasm Syntax/Semantic Highlighting w/Code Outline, Object Outline and Custom tabbing support",
"author": "IronSheep",
"license": "MIT",
"version": "2.2.11",
"version": "2.2.12",
"repository": {
"type": "git",
"url": "https://github.com/ironsheep/P2-vscode-langserv-extension"
Expand Down
2 changes: 1 addition & 1 deletion spin2/server/src/parser/spin.extension.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class ExtensionUtils {
}
}
if (startStatus) {
this._logMessage("** isSectStart line=[" + line + "]");
this._logMessage(`** isSectStart extUt line=[${line}]`);
}
return {
isSectionStart: startStatus,
Expand Down
2 changes: 1 addition & 1 deletion spin2/server/src/parser/spin.semantic.findings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ export class DocumentFindings {
}

public setOutlineSymbol(newSymbol: OutLineSymbol) {
this._logMessage(` OUTLINE setOutlineSymbol(${newSymbol.label}) = ${newSymbol.kind}`);
this._logMessage(` OUTLINE setOutlineSymbol(${newSymbol.label}) = ${newSymbol.kind()}`);
this.outlineSymbols.push(newSymbol);
}

Expand Down
Loading

0 comments on commit b0df2d1

Please sign in to comment.