aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/lexer.tes
blob: 0a4622c2d9b370c0b5d18f348480eaca610df522 (plain)
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
! Lexer configuration and styles (ED hook) !

! Match Q-Reg "_" against beginning of current doc's first line !
@[lexer.checkheader]{
  .h
  0,0,1ESPOSITIONFROMLINE:X.h
  EQ.h :SQ_ Q*EB
}

! Match Q-Reg "_" against end of current doc's file name !
@[lexer.checkname]{
  EQ* ZJ I H:SQ_
  Q*EB
}

@[lexer.auto]{
  ! Set up brace lightning !
  :M[color.bracelight],34M[color.set]
  :M[color.error],35M[color.set]
}

! Automatically mung all the lexers and them to "lexer.auto" !
Q*U.#cd EQ.[lexers]
ENQ[$SCITECOPATH]/lexers/*.tes J
<:L;R
  0X.[filename] .-4U.p -S/ .,Q.pX.[name]
  EMQ.[filename]
  EQ[lexer.auto] ZJ
  @I{
    :M[lexer.test.Q.[name]]"S :M[lexer.set.Q.[name]] Oend '
  }
  EQ.[lexers]
L>
Q.#cdEB

! append an "end" label !
:[lexer.auto]!end!