File: ini

package info (click to toggle)
dte 1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,152 kB
  • sloc: ansic: 28,421; sh: 94; awk: 56; makefile: 13; sed: 1
file content (56 lines) | stat: -rw-r--r-- 1,016 bytes parent folder | download | duplicates (2)
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
45
46
47
48
49
50
51
52
53
54
55
56
syntax ini

list constant true false

state line-start
    char " \t\n" this
    char [ section
    char '#;' comment
    char = value error
    noeat text

state section ini.section
    char ] section-end ini.section
    char "\n" line-start error
    eat this

state section-end
    char "\n" line-start
    char # comment
    char " \t" this
    eat this error

state text
    char # comment
    char -b = key operator
    char -b -n "\n" text
    noeat line-start

state key
    recolor variable
    recolor operator 1
    noeat value

state value
    char \' single-quote
    char \" double-quote
    char -b a-z this
    # FIXME: does this highlight constants with trailing characters?
    inlist constant this constant
    char # comment
    char "\n" line-start
    eat this

state single-quote string
    char \' value string
    char "\n" line-start
    eat this

state double-quote string
    char \" value string
    char "\n" line-start
    eat this

state comment
    char "\n" line-start
    eat this