Sublime Forum

Quoted strings sometimes messing up coloring

#1

i am currently developing a new forth compiler, one of many. this one being for riscv. my sources contain macros that lay down forth word names for either coded definitions or colon defnitions

code “foo”, foo

for example invokes the code macro, creates a word header called “foo” in .dat and then assigns the label foo: to the next assembly address in .text… problem is, forth pretty much allows any characters in a word name and does not restrict your first character to alpha so having words like

code “*%&^” is “legal” :slight_smile:

the issue:

code “(abort”)", p_abort_q

the syntax highlighting does not recognize that the internal escape " is not the end of the string and the entire rest of the source file is colored as a string.

0 Likes

#2

I assume you use https://github.com/mitranim/sublime-forth. If so, I suggest you just report any related bug to its repo unless you expect the author is hanging around here and finds this thread accidentally.

0 Likes

#3

no actually, that will probably be ANS specific and my forth compilers are never ans compliant :slight_smile:

this is an issue with sublime text i believe

the syntax is set to x86 assembly

0 Likes

#4

You should mention this as no one knows what syntax you are using and it’s still a 3rd-party one. And with some random searching https://packagecontrol.io/search/x86%20assembly :man_shrugging: still having no idea which one you are using.

this is an issue with sublime text i believe

The issue is here because the syntax definition is written wrong (if you believe it’s wrong). It’s not there is a core bug that causes a well-written syntax definition to be wrong (if you believe it’s a core bug in ST, then you should provide more detailed evidences).

I suggest you just report any related bug to its repo unless you expect the author is hanging around here and finds this thread accidentally.

Still stands.

0 Likes