# tcl syntax highlighting sample script for Kate
#
# author: JM. Philippe 15/03/04

# escaped characters
set String \{
set String \{
set String \"
set String " \" "
set String " \{ "

#comments and not comments
# is comments
;#is comments
	# is comments
# <h1> is html comment </h1>
puts ok;	# is comments
set String [string map <beginfold id='1'>{</beginfold id='1'></a> <beginfold id='1'>{</beginfold id='1'><span>&#187;is not comments</span></a><endfold id='1'>}</endfold id='1'><endfold id='1'>}</endfold id='1'> $String]
set String \#not_a_comment

# blocks
proc test <beginfold id='1'>{</beginfold id='1'>arg1 <beginfold id='1'>{</beginfold id='1'>arg2 <beginfold id='1'>{</beginfold id='1'><endfold id='1'>}</endfold id='1'><endfold id='1'>}</endfold id='1'> <beginfold id='1'>{</beginfold id='1'>arg3 <beginfold id='1'>{</beginfold id='1'>fr fq r<endfold id='1'>}</endfold id='1'><endfold id='1'>}</endfold id='1'><endfold id='1'>}</endfold id='1'> <beginfold id='1'>{</beginfold id='1'>
	if <beginfold id='1'>{</beginfold id='1'>1<endfold id='1'>}</endfold id='1'> <beginfold id='1'>{</beginfold id='1'>;	#comments
		set String \{;	# not a block start
	<endfold id='1'>}</endfold id='1'>
<endfold id='1'>}</endfold id='1'>

proc test args <beginfold id='1'>{</beginfold id='1'>
	set String \};	# not a block end
<endfold id='1'>}</endfold id='1'>

<beginfold id='2'># BEGIN - collapsable comments</beginfold id='2'>
# blablabla
<endfold id='2'># END</endfold id='2'>

# strings
set String "feqr feqr $gqer gqe"
set String "feqr
feqr \" $gqer \
gqe
"
set String <beginfold id='1'>{</beginfold id='1'>feqr
feqr \{ $gqer \
gqe
<endfold id='1'>}</endfold id='1'>

# variables
set b+1 [incr b]
set <beginfold id='1'>{</beginfold id='1'>incr-b<endfold id='1'>}</endfold id='1'> ${b+1}
puts ${incr-b}

puts [expr 1+2];
puts bla\x61bla;
puts bla\1234bla;
puts text\nbla;
puts $array(1);
puts "bla\x61bla\1234bla\nbla$abc $array(1) $a(1,$2)blabla${incr-b}"
puts $1$a::e$d:e$é$$
