aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/lexer.tes
blob: 535c83caaee72e28edc986502a489e5b61eaf4aa (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
! 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_ ]*
}

@[lexer.auto]{
  ! Set up brace lightning !
  :M[color.bracelight],34M[color.set]
  :M[color.error],35M[color.set]
  [_
  :Q*"= Oend '
}

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

! append "end" label to "lexer.auto" !
:@[lexer.auto]{
  !end! ]_
}