Sublime Forum

Syntax for S-Lang?

#1

I’m presently switching from Lua to S-Lang (https://www.jedsoft.org/slang/index.html), for which ST doesn’t provide a syntax definition. As th elanguage is very C-like, C syntax works quite well, with one crucial exception: In S-Lang, comments start with % instead of // or /*.
I don’t want to write a complete syntax from scratch, but I wonder if there is a simple trick of the kind “copy the C definitions, change a few lines, save it as S-Lang syntax” ?

0 Likes

#2

You can view all the default syntax definitions are public here: https://github.com/sublimehq/Packages. The C definition is under C++/C.sublime-syntax. Copying that and changing the comments should be pretty simple.

0 Likes