text/x-slang;application/x-slang
*.sl
#
#|
|#
[_\w][_\w\d]*
[1-9][0-9]*
(\%{identifier}\.)*\%{identifier}
(\.*\%{identifier-path}|\.+)
\\( # leading backslash
[\\'"abfnrtv] | # single escaped char
N\{[0-9A-Z\ -]+\} | # named unicode character
u[0-9A-Fa-f]{4} | # xxxx - character with 16-bit hex value xxxx
U[0-9A-Fa-f]{8} | # xxxxxxxx - character with 32-bit hex value xxxxxxxx
x[0-9A-Fa-f]{1,2} | # \xhh - character with hex value hh
[0-7]{1,3} # \ooo - character with octal value ooo
)
"""
"""
'''
'''
"
"
'
'
'([^'])'
(?<![\w\.])
false
true
( (\d+)?\.\d+ | \d+\. ) |
( (\d+|(\d+)?\.\d+|\d+\.)[eE][+-]?\d+ )
(?<![\w\.])(\%{float}|\d+)[jJ]\b
(?<![\w\.])\%{float}(?![\w\.])
(class)
\s+
(\%{identifier})
@\%{identifier-path}
if
for
in
while
else
class
return
break
continue
import
delete
assert
breakpoint
main
exit
init
constr
repr
eq
const
static
volatile
property
is
in
not
and
but
xor
or
isof
to
def
try
catch
except
finally
raise
with
yield
(?<![\w\.])
none
null
(?<![\w\.])
stdio
globals
(?<![\w\.])
i8
i16
i32
i64
i128
u8
u16
u32
u64
u128
f8
f16
f32
f64
f128
uf8
uf16
uf32
uf64
uf128
int
uint
float
ufloat
bool
byte
char
str
void
auto
dict
list
map
object
range
set
tuple