-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
sublime-syntax-test.scroll
44 lines (36 loc) · 1.08 KB
/
sublime-syntax-test.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import ../code/conceptPage.scroll
id sublime-syntax-test
name Sublime Syntax Test Lang
appeared 2008
tags grammarLanguage
website https://www.sublimetext.com/docs/3/syntax.html#testing
conceptDescription A language for testing sublime syntax files.
relatedConcepts sublime-syntax
example
// SYNTAX TEST "Packages/C/C.sublime-syntax"
#pragma once
// <- source.c meta.preprocessor.c++
// <- keyword.control.import
// foo
// ^ source.c comment.line
// <- punctuation.definition.comment
/* foo */
// ^ source.c comment.block
// <- punctuation.definition.comment.begin
// ^ punctuation.definition.comment.end
#include "stdio.h"
// <- meta.preprocessor.include.c++
// ^ meta string punctuation.definition.string.begin
// ^ meta string punctuation.definition.string.end
int square(int x)
// <- storage.type
// ^ meta.function entity.name.function
// ^ storage.type
{
return x * x;
// ^^^^^^ keyword.control
}
"Hello, World! // not a comment";
// ^ string.quoted.double
// ^ string.quoted.double - comment
isbndb 0