Skip to content

Commit

Permalink
Merge pull request #4 from ironsheep/develop
Browse files Browse the repository at this point in the history
release latest work: new Object Hierarchy Report, Obj Hier TreeView updates and P2 semantic fixes
  • Loading branch information
ironsheep committed Apr 10, 2024
2 parents ec96e84 + a763709 commit de7c013
Show file tree
Hide file tree
Showing 60 changed files with 3,450 additions and 1,212 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,8 @@ spin2/scripts/mode.flg
f1.txt
filt-*.log
spin2/TEST_LANG_SERVER/spin2/USB_Packet_Driver.spin2
spin2/TEST_LANG_SERVER/spin2/chk_code_comment_demo.readme.txt
/spin2/TEST_LANG_SERVER/FmAda
/spin2/TEST_LANG_SERVER/FmJose
/spin2/TEST_LANG_SERVER/FlexSpin
EditingSPIN2.md
Binary file added DOCs/Spin2Ext-Settings1of3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DOCs/Spin2Ext-Settings2of3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DOCs/Spin2Ext-Settings3of3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions EXTENSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


![Project Maintenance][maintenance-shield]

[![License][license-shield]](LICENSE)

Scine i've been using VSCode and now especially after having extended VScode to support our new favortie language Spin2 (Spin for the P2) I have found a number of VScode Extensions useful when writing Spin2 and Pasm2 code.
Expand Down Expand Up @@ -42,8 +43,8 @@ Lastly, you could PM [me in the Paralax forums](https://forums.parallax.com/prof

## License

Licensed under the MIT License. <br>
<br>
Licensed under the MIT License.

Follow these links for more information:

### [Copyright](copyright) | [License](LICENSE)
Expand All @@ -52,4 +53,5 @@ Follow these links for more information:

[maintenance-shield]: https://img.shields.io/badge/maintainer-stephen%40ironsheep%2ebiz-blue.svg?style=for-the-badge

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg

4 changes: 3 additions & 1 deletion InsertMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


![Project Maintenance][maintenance-shield]

[![License][license-shield]](LICENSE)


Expand Down Expand Up @@ -253,5 +254,6 @@ Follow these links for more information:

[maintenance-shield]: https://img.shields.io/badge/maintainer-stephen%40ironsheep%2ebiz-blue.svg?style=for-the-badge

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg


3 changes: 2 additions & 1 deletion PT-Color-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,5 @@ Follow these links for more information:

[marketplace-rating]: https://vsmarketplacebadge.apphb.com/rating-short/ironsheepproductionsllc.spin2.svg

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg

9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ The **P1 Forum Thread** containing discussion of [this VSCode support](https://f
- **P1: Syntax and Semantic Highlighting** for both Spin and Pasm
- **P1: Show Hovers Feature** Hovers show information about the symbol/object that's below the mouse cursor. In our case this is for both user written code and for Spin built-ins.
- **P1: Signature Help Feature** As you are typing a method name show signature help for both user written methods and for Spin built-in methods.
- **Object Public interface documentation generation** via keystroke [Ctrl+Alt+d], doc opens on right side of editor
- **Object Public interface Documentation generation** via keystroke [Ctrl+Alt+d] - Ctrl+Alt+( d )ocument. <br>- Document opens on right side of editor
- **Object Hierarchy Report generation** via keystroke [Ctrl+Alt+r] - Ctrl+Alt+( r )eport. <br>- Report opens on right side of editor
- **Doc-Comment Generation** for PUB and PRI methods via keystroke [Ctrl+Alt+c] - Ctrl+Alt+( c )omment. <br>- Comment is inserted immediately below the PUB or PRI line.
- Editor **Screen Coloring** support per section à la Parallax **Propeller Tool**
- **Custom tabbing** Tab-stop support per section à la Parallax **Propeller Tool**
Expand All @@ -44,13 +45,13 @@ The **P1 Forum Thread** containing discussion of [this VSCode support](https://f
### Up next
We are working on the next updates:

- Code folding support
- Improve Hover support (more doc details such as pasm code help)

These are not yet definate but I'm:

- Looking into adding a setting to our extension allowing one to change a "PNut Enable Debug" setting which would be used when building with on windows with PNut
- Looking into developing a Task Provider (to be built into our extension) which would recognize the tools installed and the OS and then provide only the tasks appropriate for the OS with the tools installed.
- Looking into customizable Spin code formatter with features like format on save.

### Future directions

Expand Down Expand Up @@ -118,8 +119,8 @@ George (GitHub [DrMerfy](https://github.com/DrMerfy)) for the latest [VSCode-Ove

## License

Licensed under the MIT License. <br>
<br>
Licensed under the MIT License.

Follow these links for more information:

### [Copyright](copyright) | [License](LICENSE)
Expand Down
21 changes: 10 additions & 11 deletions Spin2-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ In general To open the Settings editor, navigate to **[Code]** > **Settings** >

The Spin2 extension settings are in 3 sections. If when you get to settings and type in "**SpinExt**" as a filter and you'll see the 3 sections of our new Spin2 Extension settings:

![Settings 1 of 3](./Spin2/DOCs/images/Spin2Ext-Settings1of3.png)
![Settings 1 of 3](./DOCs/Spin2Ext-Settings1of3.png)
**FIGURE 1**: Our three sections, with the first section selected

- **Color Editor Background** - check this to turn on Propeller Tool coloring (you'll also need to adjust the color theme to make this readable!)
- **Editor Background Alpha** - if you wnat to something a bit darker then you can adjust this.
- **Highlight FlexSpin directives** - This adds support for #if, #else, etc. FlexSpin directives
- **Highlight FlexSpin directives** - This enables support for #if, #else, etc. FlexSpin directives
- **Max Number of Reported Issues** - This allows you to limit how many messages are shown per file
- **Trace Server**- boared? want to see how the client interacts with the server then select a value here other then off. (this can slow things down)
- **Color Editor Background** - check this to turn on Propeller Tool coloring (you'll also need to adjust the color theme to make this readable!)
- **Editor Background Alpha** - if you wnat to something a bit darker then you can adjust this.

Click on the 2nd section to see:

![Settings 2 of 3](./Spin2/DOCs/images/Spin2Ext-Settings2of3.png)
![Settings 2 of 3](./DOCs/Spin2Ext-Settings2of3.png)
**FIGURE 2**: with he 2nd section selected

- Elastic Tabstops **Enable** - check this to turn ON the Elastic Tabstops feature
- **Iron Sheep** - click on link to adjust the tab columns (default is what the Author uses)
- **Propeller Tool**- click on link to adjust the tab columns (default is Propeller Tool defaults)
- **User1** - click on link to adjust the tab columns (this one is meant for you to customize if you wnat your own settings)
- Elastic Tabstops **Choice** - select the set of tabstops you wish to use
- Elastic Tabstops **Enable** - check this to turn ON the Elastic Tabstops feature

Click on the 3rd section to see:

![Settings 3 of 3](./Spin2/DOCs/images/Spin2Ext-Settings3of3.png)
![Settings 3 of 3](./DOCs/Spin2Ext-Settings3of3.png)
**FIGURE 3**: with the 3rd section selected

Insert Mode Adjustments:
Expand All @@ -48,9 +48,8 @@ Insert Mode Adjustments:

## License

Copyright © 2023 Iron Sheep Productions, LLC.<br />
Licensed under the MIT License. <br>
<br>
Licensed under the MIT License.

Follow these links for more information:

### [Copyright](copyright) | [License](LICENSE)
Expand All @@ -63,7 +62,7 @@ Follow these links for more information:

[marketplace-rating]: https://vsmarketplacebadge.apphb.com/rating-short/ironsheepproductionsllc.spin2.svg

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg

[Release-shield]: https://img.shields.io/github/release/ironsheep/P2-vscode-extensions/all.svg

Expand Down
3 changes: 2 additions & 1 deletion TAB-SPECs.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,4 +386,5 @@ Follow these links for more information:

[marketplace-rating]: https://vsmarketplacebadge.apphb.com/rating-short/ironsheepproductionsllc.spin2.svg

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg

3 changes: 2 additions & 1 deletion TAB-VisualEx.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ Follow these links for more information:

[marketplace-rating]: https://vsmarketplacebadge.apphb.com/rating-short/ironsheepproductionsllc.spin2.svg

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg

4 changes: 3 additions & 1 deletion TASKS-User-RPi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


![Project Maintenance][maintenance-shield]

[![License][license-shield]](LICENSE)

**NOTE**: This page describes creating tasks **common to all of your projects/workspaces**. If, instead, you wish to have your P2 compile and download tasks unique to each your projects then go to the [Project Tasks](TASKS.md) page.
Expand Down Expand Up @@ -649,4 +650,5 @@ Follow these links for more information:

[maintenance-shield]: https://img.shields.io/badge/maintainer-stephen%40ironsheep%2ebiz-blue.svg?style=for-the-badge

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg

8 changes: 5 additions & 3 deletions TASKS-User-macOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


![Project Maintenance][maintenance-shield]

[![License][license-shield]](LICENSE)

**NOTE**: This page describes creating tasks **common to all of your projects/workspaces**. If, instead, you wish to have your P2 compile and download tasks unique to each your projects then go to the [Project Tasks](TASKS.md) page.
Expand Down Expand Up @@ -573,8 +574,8 @@ And our **DownloadP2** task can reference the binary file using `${config:topLev

## License

Licensed under the MIT License. <br>
<br>
Licensed under the MIT License.

Follow these links for more information:

### [Copyright](copyright) | [License](LICENSE)
Expand All @@ -583,4 +584,5 @@ Follow these links for more information:

[maintenance-shield]: https://img.shields.io/badge/maintainer-stephen%40ironsheep%2ebiz-blue.svg?style=for-the-badge

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg

5 changes: 4 additions & 1 deletion TASKS-User-win.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# VSCode - User-wide defined Tasks (Windows)

![Project Maintenance][maintenance-shield]

[![License][license-shield]](LICENSE)

**NOTE**: This page describes creating tasks **common to all of your projects/workspaces**. If, instead, you wish to have your P2 compile and download tasks unique to each your projects then go to the [Project Tasks](TASKS.md) page.
Expand Down Expand Up @@ -696,4 +697,6 @@ Follow these links for more information:
### [Copyright](copyright) | [License](LICENSE)

[maintenance-shield]: https://img.shields.io/badge/maintainer-stephen%40ironsheep%2ebiz-blue.svg?style=for-the-badge
[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765

[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg

6 changes: 5 additions & 1 deletion spin2/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@
"**/node_modules": true,
"**/out": true
},
"explorerExclude.backup": {}
"explorerExclude.backup": {},
"cSpell.enableFiletypes": [
"!json",
"!typescript"
]
}
16 changes: 13 additions & 3 deletions spin2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@ Possible next additions:
- Add new-file templates as Snippets
- Add additional Snippets as the community identifies them

## [2.2.15] 2024-01-11
## [2.2.15] 2024-04-09

Update P1 and P2

- Adjust object hierarchy to fully expand the tree by default
- [-] collapse and [+] expand icons now work in object hierarchy tree view
- Adds new Object Hierarchy report similar to that generated during propeller tool "Archive". Report is available via keystroke [Ctrl+Alt+r] - Ctrl+Alt+( r )eport from within spin/spin2 source file.

Update P2 Only

- Add support for v44 new built-in method names
- Add highlighting of object[index] expressions where index itself is an expression
- BUGFIX don't report `@instance[index].method` reference as bad constant use when it really is a method
- preliminary flexspin support changes:
- update conditional compile suppot to grey out deslected code
- add support for #import of .spin2 code

## [2.2.14] 2024-01-11

Expand Down Expand Up @@ -59,7 +69,7 @@ Update P2 Only
- Add semantic highlight color change for byte(), word(), and long() method overrides
- Add recognition of byte(), word(), and long() method names to provide method vs. storage type hover text
- Add recognition of {Spin2_v##} format Spin Language Requirement directive
- Emit any languge directive when used to generated interface documentation
- Emit any language directive when used to generated interface documentation
- Add support for lstring() when {Spin2_v43} is specified
- Add detection of/error generation for duplicate declarations within CON, VAR and DAT sections

Expand Down
10 changes: 5 additions & 5 deletions spin2/EarlyTesting.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# VSCode support for the Parallax Propeller 1 & 2 Multicore MCU's

![Project Maintenance][maintenance-shield]

[![License][license-shield]](LICENSE)

## Early Testing of the new Language-Server based VSCode Extension
Expand Down Expand Up @@ -60,7 +61,7 @@ It should now be installed

- Ensure [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens) extension is installed

![Error Lens](./DOCs/images/ErrorLens-Ext.png)
![Error Lens](./images/ErrorLens-Ext.png)
**FIGURE 1**: The Error Lens Extension

When you DON'T have error Lens installed (or it is disabled) Your errors (highlighted in the code as bright RED text) only show in bottom area in the [Problems] Tab:
Expand Down Expand Up @@ -182,9 +183,8 @@ The Spin2 extension provides **5 themes**. 2 for light mode and 3 for dark mode.

## License

Copyright © 2023 Iron Sheep Productions, LLC.<br />
Licensed under the MIT License. <br>
<br>
Licensed under the MIT License.

Follow these links for more information:

### [Copyright](copyright) | [License](LICENSE)
Expand All @@ -197,7 +197,7 @@ Follow these links for more information:

[marketplace-rating]: https://vsmarketplacebadge.apphb.com/rating-short/ironsheepproductionsllc.spin2.svg

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg

[Release-shield]: https://img.shields.io/github/release/ironsheep/P2-vscode-extensions/all.svg

Expand Down
89 changes: 89 additions & 0 deletions spin2/TEST_LANG_SERVER/spin2/240406-fixes.spin2
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
' -------------------------------
CON

VAR cog 'status
av_base_pin_

PUB stop()

'' Stop VGA driver cog

if cog
cogstop(cog-1)
pinclear(av_base_pin_ addpins 4)

' -------------------------------
DAT

Mario0 byte {
}$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,{
}$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,{
}$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

MarioColors long {
}%00000000_00000000_00000000_00000000,{ $7fff 'any bit 31..24 set means transparent
}%11111111_11111000_11111000_11111000,{ $7fff
}%11111111_11111000_11111000_11111000,{ $7fff
}%11111111_11111000_11111000_11111000,{ $7fff
}%11111111_11111000_11011000_10011000,{ $7f73
}%11111111_11010000_00000000_00100000,{ $6804 12->32
}%11111111_00100000_00100000_00100000 ' $1084 13->33 'address=51

' -------------------------------
CON
{
To instantiate a display type:
--->>> inline comments shouldn't end block comment!!
DEBUG("`DISPLAY_TYPE name {configurations and values}")

To feed a display {or more than one display}:

DEBUG("`name {name name ...} value value value keyword value etc")

}

' -------------------------------

CON
offx = 100
offy = 1000
spacex = 16
spacey = 16
dims = 8
dotsize = 8
winx = 6 + dims * dotsize
winy = 29 + dims * dotsize

pub go() | i, k

repeat i from 0 to 15
k := long[@pixels + $36][i]
long[@pixels + $36][i] := k >> 16 & $0000FF | k << 16 & $FF0000 | k & $00FF00

repeat i from 0 to 15
debug(`bitmap b`(i) pos `(offx + spacex + i & %11 * (winx + spacex), offy + spacey + i >> 2 & %11 * (winy + spacey)) rate 1 title '`(i)' size `(dims,dims) dotsize `(dotsize) lut4 trace `(i))
waitms(1000)
repeat i from 0 to 15
debug(`b`(i) lutcolors `uhex_long_array_(@pixels+$36,16))
k~
repeat
i := byte[@pixels + $76][k >> 1 & $3F] >> (!k & 1 * 4) & $F
debug(`b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 `(i))
'debug(`b0 `(i))
if k >= 63 and k < 64 * 3 and (k & $00 == $0)
debug(`b0 save `(offx, offy, cntx * (winx + spacex) + spacex, cnty * (winy + spacey) + spacey) 'TRACE`(k-63)')
k++
'waitms(25)

DAT
pixels BYTE 0,0,0 ' file "bitmapdemo.bmp"
' -------------------------------

pub main()
'Configure display
debug(`term message pos 200 500 size 12 4 textsize 40 rgbi8x) ' <-- WHY RED?? fix this

'' FOLLOWING LINE CRASHES!!!
'debug(`message 'Hello World!') 'Display "Hello World!" on computer screen

' -------------------------------
Loading

0 comments on commit de7c013

Please sign in to comment.