Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting issue when using inline PASM2 in SPIN2 method #12

Open
2 tasks done
jrullan opened this issue May 22, 2024 · 1 comment
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@jrullan
Copy link

jrullan commented May 22, 2024

and have you...

  • I updated to the latest spin2 version available
  • I have restarted VSCode and the problem still exists

Version of Spin2 Language Server VScode Extension with the issue

Version 2.2.18

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Hardware, Operating System, Operating System version, VSCode version

Hardware: Samsung Notebook
OS Ver: Windows 11
VSCode Ver: 1.89.1

Version: 1.89.1 (user setup)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

Description of problem

Example of incorrect coloring of PASM instructions after the second if_z line:

image

Another example, issue after second REP:

image

Additional information


PUB string_to_number(buf):value | val, digits, char_value, subtotal, index
''----------------------------------------
''Converts a string to integer
'' 
'' @param buf - 
'' @returns value - 

' Local Variables:
' @local val - 
' @local digits - 
' @local char_value - 
' @local subtotal - 
' @local index - 
''----------------------------------------
  digits := STRSIZE(buf) - 1
ORG
      MOV index, buf
      CMP digits, #0 wz
if_z  JMP #.last
.loop
      RDBYTE char_value, index wz
if_z  JMP #.end
      MOV val, char_value
      SUB val, #48
      REP #2, digits
      QMUL val, #10
      GETQX val
      ADD subtotal, val
      ADD index, #1
      DJNZ digits, #.loop
.last
      RDBYTE char_value, index
      MOV val, char_value
      SUB val, #48
      ADD subtotal, val
.end
END
  value := subtotal

@jrullan jrullan added the bug Something isn't working label May 22, 2024
@ironsheep
Copy link
Owner

Thanks for reporting this!

That's going to be "fun" to track down. Syntax highlighting bugs are the worst, as I have to figure out why the highlighter disabled itself. (That's not something I wrote.) I specify how to recognize what to color. The greenish parts are all colored by the semantic highlighter (stuff I write). The coloring there says it is still running well. Hmmm...

Adding your example code to my test suite!

I will let you know what I find.

@ironsheep ironsheep self-assigned this May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants