Debian Codegraph @

runtime/syntax/forth.yaml

raw
1 filetype: forth
2
3 detect:
4 filename: "\\.(forth|4th|fs|fs8|ft|fth|frt)$"
5
6 rules:
7 - identifier: "\\b[A-Za-z_0-9-]*\\b"
8
9 - statement: "\\b(?i:(if|else|then|do|loop|case|endcase|of|endof|begin|while|repeat|until|again|unloop|leave|exit|done|next|\\?do|\\+do|\\-do|\\+loop|\\-loop|\\?leave))\\b"
10
11 - statement: "(^:|;$)"
12
13 - type: "\\b(?i:(variable|constant|cells))\\b"
14
15 - special: "\\B[?.]\\B" #for some reason, \b and \B are inverted for symbols
16
17 - constant.number: "\\b[0-9]+\\b"
18
19 - constant.string:
20 start: "\\b([Ss.]\" )"
21 end: "\""
22 rules: []
23
24 - comment:
25 start: "\\("
26 end: "\\)"
27 rules:
28 - todo: "(TODO|NOTE|XXX|FIXME):?"
29
30 - comment:
31 start: "\\\\"
32 end: "$"
33 rules:
34 - todo: "(TODO|NOTE|XXX|FIXME):?"