Debian Codegraph @

runtime/syntax/pascal.yaml

raw
1 filetype: pascal
2
3 detect:
4 filename: "\\.pas$"
5
6 rules:
7 - type: "\\b(?i:(string|ansistring|widestring|shortstring|char|ansichar|widechar|boolean|byte|shortint|word|smallint|longword|cardinal|longint|integer|int64|single|currency|double|extended))\\b"
8 - statement: "\\b(?i:(and|asm|array|begin|break|case|const|constructor|continue|destructor|div|do|downto|else|end|file|for|function|goto|if|implementation|in|inline|interface|label|mod|not|object|of|on|operator|or|packed|procedure|program|record|repeat|resourcestring|set|shl|shr|then|to|type|unit|until|uses|var|while|with|xor))\\b"
9 - statement: "\\b(?i:(as|class|dispose|except|exit|exports|finalization|finally|inherited|initialization|is|library|new|on|out|property|raise|self|threadvar|try))\\b"
10 - statement: "\\b(?i:(absolute|abstract|alias|assembler|cdecl|cppdecl|default|export|external|forward|generic|index|local|name|nostackframe|oldfpccall|override|pascal|private|protected|public|published|read|register|reintroduce|safecall|softfloat|specialize|stdcall|virtual|write))\\b"
11 - constant: "\\b(?i:(false|true|nil))\\b"
12 - special:
13 start: "asm"
14 end: "end"
15 rules: []
16 - constant.number: "\\$[0-9A-Fa-f]+"
17 - constant.number: "\\b[+-]?[0-9]+([.]?[0-9]+)?(?i:e[+-]?[0-9]+)?"
18 - constant.string:
19 start: "#[0-9]{1,}"
20 end: "$"
21 rules:
22 - constant.specialChar: "\\\\."
23 - constant.string:
24 start: "'"
25 end: "'"
26 skip: "\\\\."
27 rules:
28 - constant.specialChar: "\\\\."
29 - preproc:
30 start: "{\\$"
31 end: "}"
32 rules: []
33 - comment:
34 start: "//"
35 end: "$"
36 rules: []
37 - comment:
38 start: "\\(\\*"
39 end: "\\*\\)"
40 rules: []
41 - comment:
42 start: "({)(?:[^$])"
43 end: "}"
44 rules: []
45