Debian Codegraph @

runtime/queries/freebasic/highlights.scm

raw symbols SCIP
1 (identifier) @variable
2
3 ; Keywords
4 [
5 "DIM"
6 "IF"
7 "THEN"
8 "ELSE"
9 "END IF"
10 "WHILE"
11 "WEND"
12 "FOR"
13 "TO"
14 "STEP"
15 "NEXT"
16 "DO"
17 "LOOP"
18 "UNTIL"
19 "SUB"
20 "END SUB"
21 "FUNCTION"
22 "END FUNCTION"
23 "RETURN"
24 "PRINT"
25 "INPUT"
26 "SLEEP"
27 "AS"
28 ] @keyword
29
30 ; Logical operators
31 [
32 "AND"
33 "OR"
34 "NOT"
35 "MOD"
36 ] @keyword.operator
37
38 ; Types
39 [
40 "INTEGER"
41 "LONG"
42 "SINGLE"
43 "DOUBLE"
44 "STRING"
45 "BYTE"
46 ] @type
47
48 (type_identifier) @type
49
50 ; Function and sub declarations
51 (sub_declaration
52 name: (identifier) @function)
53 (function_declaration
54 name: (identifier) @function)
55
56 ; Function calls
57 (call_expression
58 function: (identifier) @function)
59
60 ; Built-in functions
61 ((identifier) @function.builtin
62 (#match? @function.builtin "^(?i)(ABS|SIN|COS|TAN|SQR|LEN|VAL|ASC|CHR|LEFT|RIGHT|MID|STR|INT|RND|INSTR|UCASE|LCASE|LTRIM|RTRIM|SPACE|TIME|DATE|TIMER)$"))
63
64 ; Literals
65 (number_literal) @constant.numeric
66 (string_literal) @string
67
68 ; Comments
69 (comment) @comment
70
71 ; Operators
72 [
73 "="
74 "+"
75 "-"
76 "*"
77 "/"
78 "^"
79 "<>"
80 "<"
81 ">"
82 "<="
83 ">="
84 ] @operator
85
86 ; Punctuation
87 [
88 "("
89 ")"
90 ] @punctuation.bracket
91
92 [
93 ","
94 ";"
95 ] @punctuation.delimiter
96
97 ; Variables