# external lpeg lexers

import $(SciteDefaultHome)/lexers/lpeg

lexer.lpeg.home=$(SciteDefaultHome)/lexers

# # pre 3.03:
#
#~ lexer.lpeg.script=$(lexer.lpeg.home)/scite-context-lexer.lua
#
# # post 3.03:
#
lexer.lpeg.script=$(lexer.lpeg.home)/lexer.lua
#
# where we load the extensions in the lexers themselves.

lexer.lpeg.color.theme=$(lexer.lpeg.home)/themes/scite-context-theme.lua

# alas, only a few properties are passed (only indentation)

fold.by.parsing=1
fold.by.indentation=0
fold.by.line=0

if PLAT_WIN
	lexerpath.*.lpeg=$(lexer.lpeg.home)/LexLPeg.dll

if PLAT_GTK
	lexerpath.*.lpeg=$(lexer.lpeg.home)/liblexlpeg.so

lexer.*.lpeg=lpeg

file.patterns.cweb=*.h;*.c;*.w;*.hh;*.cc;*.ww;*.hpp;*.cpp;*.hxx;*.cxx;

lexer.$(file.patterns.metapost)=lpeg_scite-context-lexer-mps
lexer.$(file.patterns.metafun)=lpeg_scite-context-lexer-mps
lexer.$(file.patterns.context)=lpeg_scite-context-lexer-tex
lexer.$(file.patterns.lua)=lpeg_scite-context-lexer-lua
lexer.$(file.patterns.example)=lpeg_scite-context-lexer-xml
lexer.$(file.patterns.text)=lpeg_scite-context-lexer-txt
lexer.$(file.patterns.pdf)=lpeg_scite-context-lexer-pdf
lexer.$(file.patterns.cweb)=lpeg_scite-context-lexer-web

lexer.$(file.patterns.tex)=lpeg_scite-context-lexer-tex
lexer.$(file.patterns.xml)=lpeg_scite-context-lexer-xml
lexer.$(file.patterns.html)=lpeg_scite-context-lexer-xml
lexer.$(file.patterns.cpp)=lpeg_scite-context-lexer-web

# It's a real pitty that we cannot overload the errorlist lexer. That would
# make scite even more interesting. Add to that including lpeg and the lpeg
# lexer and thereby providing an interface to properties.

# lexer.errorlist=lpeg_scite-context-lexer-txt
# lexer.output=lpeg_scite-context-lexer-txt

comment.block.lpeg_scite-context-lexer-tex=%
comment.block.at.line.start.lpeg_scite-context-lexer-tex=1

comment.block.lpeg_scite-context-lexer-mps=%
comment.block.at.line.start.lpeg_scite-context-lexer-mps=1

comment.block.lpeg_scite-context-lexer-lua=--
comment.block.at.line.start.lpeg_scite-context-lexer-lua=1

comment.block.lpeg_scite-context-lexer-cld=--
comment.block.at.line.start.lpeg_scite-context-lexer-cld=1

comment.block.lpeg_props=#
comment.block.at.line.start.lpeg_props=1

#~ comment.block.lpeg_ctx-tex=%
#~ comment.block.at.line.start.lpeg_ctx-tex=1

#~ comment.block.lpeg_ctx-mps=%
#~ comment.block.at.line.start.lpeg_ctx-mps=1

#~ comment.block.lpeg_ctx-lua=--
#~ comment.block.at.line.start.lpeg_ctx-lua=1

#~ comment.block.lpeg_ctx-cld=--
#~ comment.block.at.line.start.lpeg_ctx-cld=1

#~ comment.block.lpeg_props=#
#~ comment.block.at.line.start.lpeg_props=1

#~ style.*.34=bold
#~ style.*.35=bold

style.*.34=$(styles.bracelight)
style.*.35=$(styles.bracebad)
