# Define SciTE settings for Pascal files.
# Changed by Fernando Lozano <fsl@centroin.com.br> for Free Pascal
# Changed by Mathias Rauen <scite@madshi.net> for Delphi
# Changed by Marko Njezic <sf@maxempire.com> to match new LexPascal lexer and updated for Delphi XE4

filter.pascal=Pascal (dpr dpk pas dfm inc pp)|*.dpr;*.dpk;*.pas;*.dfm;*.inc;*.pp|

file.patterns.pascal=*.dpr;*.pas;*.dfm;*.inc;*.pp
file.patterns.pascal.package=*.dpk
file.patterns.pascal.all=$(file.patterns.pascal);$(file.patterns.pascal.package)
lexer.$(file.patterns.pascal.all)=pascal

keywordclass.pascal=absolute abstract and array as asm assembler automated begin case \
cdecl class const constructor delayed deprecated destructor dispid dispinterface \
div do downto dynamic else end except experimental export exports external far \
file final finalization finally for forward function goto helper if \
implementation in inherited initialization inline interface is label library \
message mod near nil not object of on operator or out overload override packed \
pascal platform private procedure program property protected public published \
raise record reference register reintroduce repeat resourcestring safecall \
sealed set shl shr static stdcall strict string then threadvar to try type unit \
unsafe until uses var varargs virtual while winapi with xor

keywordclass.pascal.smart=add default implements index name nodefault read readonly \
remove stored write writeonly

keywordclass.pascal.package=package contains requires

keywords.$(file.patterns.pascal)=$(keywordclass.pascal) $(keywordclass.pascal.smart)
keywords.$(file.patterns.pascal.package)=$(keywordclass.pascal) $(keywordclass.pascal.smart) $(keywordclass.pascal.package)

# If enabled some keywords will only be highlightend in appropriate context.
# As implemented those are keywords related to property and DLL exports declarations
lexer.pascal.smart.highlighting=1

# Pascal styles

# Default
style.pascal.32=$(font.base)
# White space
style.pascal.0=fore:#808080
# Identifiers
style.pascal.1=
# Comment: { ... }
style.pascal.2=$(colour.code.comment.box),$(font.code.comment.box)
# Comment: (* ... *)
style.pascal.3=$(colour.code.comment.box),$(font.code.comment.box)
# Line Comment: // ...
style.pascal.4=$(colour.code.comment.line),$(font.code.comment.line)
# Preprocessor: {$ ... }
style.pascal.5=$(colour.preproc)
# Preprocessor: (*$ ... *)
style.pascal.6=$(colour.preproc)
# Number
style.pascal.7=$(colour.number)
# Hex Number
style.pascal.8=$(colour.number)
# Keyword
style.pascal.9=$(colour.keyword),bold
# String
style.pascal.10=$(colour.string)
# End of line where string is not closed
style.pascal.11=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
# Character
style.pascal.12=$(colour.char)
# Operators
style.pascal.13=$(colour.operator),bold
# Inline Asm
style.pascal.14=fore:#804080

# Braces are only matched in operator style
braces.pascal.style=13

comment.block.pascal=//~
comment.stream.start.pascal={
comment.stream.end.pascal=}
comment.box.start.pascal=(*
comment.box.middle.pascal= *
comment.box.end.pascal= *)

statement.indent.$(file.patterns.pascal)=9 case class do else for then \
private protected public published repeat try while type
statement.end.$(file.patterns.pascal)=13 ;
statement.lookback.$(file.patterns.pascal)=20
block.start.$(file.patterns.pascal)=9 begin
block.end.$(file.patterns.pascal)=9 end

#using virtual pascal
#pc=C:\Vp21\Bin.w32\Vpc.exe -VC:\Vp21\Bin.w32\Vp.vpo "$(FilePath)"

#using free pascal

# compile
command.compile.*.pas=fpc "$(FilePath)"

# normal execute
if PLAT_WIN
	command.go.*.pas="$(FileName).exe"
	command.go.subsystem.*.pas=2
if PLAT_GTK
	command.go.*.pas="kvt -e $(FileName)"

# build
command.build.*.pas=fpc -B "$(FilePath)"
command.build.subsystem.*.pas=1

command.name.0.*.pas=Debug Compile
command.0.*.pas=fpc -g "$(FilePath)"
command.name.1.*.pas=Debug Build
command.1.*.pas=fpc -g -B "$(FilePath)"
command.name.2.*.pas=GDB
if PLAT_WIN
	command.2.*.pas=gdbpasw "$(FileName)"
if PLAT_GTK
	command.2.*.pas=gdb "$(FileName)"
	command.name.3.*.pas=DDD
	command.3.*.pas=ddd "$(FileName)"

