# 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}
