Add literals highlighting
This commit is contained in:
parent
e2aa90e0f4
commit
b9fd34c084
|
@ -3,4 +3,17 @@
|
|||
(block_comment)
|
||||
] @comment
|
||||
|
||||
; Literal {{{
|
||||
(boolean_literal) @boolean
|
||||
|
||||
(integer_literal) @number
|
||||
|
||||
[
|
||||
(raw_string_literal)
|
||||
(interpreted_string_literal)
|
||||
] @string
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
; }}}
|
||||
|
||||
; vim: sw=2 foldmethod=marker
|
||||
|
|
19
test/highlight/litterals.bp
Normal file
19
test/highlight/litterals.bp
Normal file
|
@ -0,0 +1,19 @@
|
|||
foo = 0
|
||||
// ^ number
|
||||
|
||||
foo = -42
|
||||
// ^ number
|
||||
|
||||
foo = true
|
||||
// ^ boolean
|
||||
|
||||
foo = "foo\nbar"
|
||||
// ^ string
|
||||
// ^ string.escape
|
||||
// ^ string.escape
|
||||
// ^ string
|
||||
// ^ string
|
||||
|
||||
foo = `baz`
|
||||
// ^ string
|
||||
// ^ string
|
Loading…
Reference in a new issue