1.20b2 からの変更点は以下の通り。
#usecom の global に対応。#if 0 ~ #endif の無効部分の強調で #if と #endif の # の前後の空白が一致していないと対応しているとみなさないように変更。
上図の通り、減算演算子を符号と間違えて認識しないようにしました。(数値の強調を本来より目立たせて表示しています)
次のように変更されました。(数値リテラルを特に強調から普通の強調に移動するのが目的で、他はそれに伴っての移動です。)
| 強調の対象 | 強調の種類(変更前) | 強調の種類(変更後) |
|---|---|---|
| ラベル | 強調6 | 特に強調1 |
| プリプロセッサ命令のキーワードなど | 強調7 | 強調6 |
| プリプロセッサ命令 | 強調8 | 強調7 |
| 数値リテラル | 特に強調1 | 強調8 |
原色の赤で太字はきつかったかなと思って、フロー制御命令は紫色に、命令は太字をOFFにしました。
#usecom の global に対応。
他のプリプロセッサ命令の global には対応していたのですが、 #usecom を忘れていました。
#if 0 ~ #endif の無効部分の強調で #if と #endif の # の前後の空白が一致していないと対応しているとみなさないように変更。HSP3.hilight #if 0 ~ #endif の無効部分の強調がおかしい問題の解決策の記事通り。
//**************************************************************************************************
// HSP3.hilight Ver.1.2b3
// Hot Soup Processor 3.x のスクリプトの秀丸エディタ強調表示定義ファイル
// Last Update: 2007/12/24
// Author: fujidig
// http://www.fujidig.com/
// fuji.rosen@gmail.com
//**************************************************************************************************
//==================================================================================================
// ■ 強調表示
//==================================================================================================
//--------------------------------------------------------------------------------------------------
// □ マクロ
// ( 大文字小文字の区別 : OFF / 単語の検索 : ON / 正規表現 : OFF / 強調1 )
//--------------------------------------------------------------------------------------------------
41,__date__
41,__file__
41,__hsp30__
41,__hspver__
41,__line__
41,__time__
41,_debug
41,font_antialias
41,font_bold
41,font_italic
41,font_normal
41,font_strikeout
41,font_underline
41,gmode_add
41,gmode_alpha
41,gmode_gdi
41,gmode_mem
41,gmode_pixela
41,gmode_rgb0
41,gmode_rgb0alpha
41,gmode_sub
41,msgothic
41,msmincho
41,objmode_guifont
41,objmode_normal
41,objmode_usefont
41,screen_fixedsize
41,screen_frame
41,screen_hide
41,screen_normal
41,screen_palette
41,screen_tool
//--------------------------------------------------------------------------------------------------
// □ システム変数・システム変数のようなマクロ
// ( 大文字小文字の区別 : OFF / 単語の検索 : ON / 正規表現 : OFF / 強調2 )
//--------------------------------------------------------------------------------------------------
105,cnt
105,err
105,hdc
105,hinstance
105,hspstat
105,hspver
105,hwnd
105,iparam
105,looplev
105,lparam
105,mousew
105,mousex
105,mousey
105,refdval
105,refstr
105,stat
105,strsize
105,sublev
105,thismod
105,wparam
105,dir_cmdline
105,dir_cur
105,dir_desktop
105,dir_exe
105,dir_mydoc
105,dir_sys
105,dir_win
105,ginfo_act
105,ginfo_b
105,ginfo_cx
105,ginfo_cy
105,ginfo_dispx
105,ginfo_dispy
105,ginfo_g
105,ginfo_intid
105,ginfo_mesx
105,ginfo_mesy
105,ginfo_mx
105,ginfo_my
105,ginfo_paluse
105,ginfo_r
105,ginfo_sel
105,ginfo_sizex
105,ginfo_sizey
105,ginfo_sx
105,ginfo_sy
105,ginfo_vx
105,ginfo_vy
105,ginfo_winx
105,ginfo_winy
105,ginfo_wx1
105,ginfo_wx2
105,ginfo_wy1
105,ginfo_wy2
105,notemax
105,notesize
//--------------------------------------------------------------------------------------------------
// □ 標準関数・関数のようなマクロ
// ( 大文字小文字の区別 : OFF / 単語の検索 : ON / 正規表現 : OFF / 強調3 )
//--------------------------------------------------------------------------------------------------
169,abs
169,absf
169,atan
169,callfunc
169,cnvwtos
169,comevdisp
169,cos
169,dirinfo
169,double
169,expf
169,getpath
169,gettime
169,ginfo
169,instr
169,int
169,length
169,length2
169,length3
169,length4
169,libptr
169,limit
169,limitf
169,logf
169,lpeek
169,noteinfo
169,objinfo
169,peek
169,rnd
169,sin
169,sqrt
169,str
169,strf
169,strlen
169,strmid
169,sysinfo
169,tan
169,varptr
169,vartype
169,varuse
169,wpeek
169,objinfo_bmscr
169,objinfo_hwnd
169,objinfo_mode
//--------------------------------------------------------------------------------------------------
// □ 標準命令・命令のようなマクロ
// ( 大文字小文字の区別 : OFF / 単語の検索 : ON / 正規表現 : OFF / 強調4 )
//--------------------------------------------------------------------------------------------------
233,assert
233,await
233,axobj
233,bcopy
233,bgscr
233,bload
233,bmpsave
233,boxf
233,bsave
233,buffer
233,button
233,chdir
233,chdpm
233,chgdisp
233,chkbox
233,circle
233,clrobj
233,cls
233,cnvstow
233,color
233,combox
233,comevarg
233,comevent
233,comres
233,delcom
233,delete
233,delmod
233,dialog
233,dim
233,dimtype
233,dirlist
233,dup
233,dupptr
233,exec
233,exist
233,font
233,gcopy
233,getkey
233,getstr
233,gmode
233,grect
233,groll
233,grotate
233,gsel
233,gsquare
233,gzoom
233,hsvcolor
233,input
233,line
233,listbox
233,logmes
233,lpoke
233,mcall
233,mci
233,memcpy
233,memexpand
233,memfile
233,memset
233,mes
233,mesbox
233,mkdir
233,mmload
233,mmplay
233,mmstop
233,mouse
233,mref
233,newcom
233,newmod
233,noteadd
233,notedel
233,noteget
233,noteload
233,notesave
233,notesel
233,noteunsel
233,objmode
233,objprm
233,objsel
233,objsize
233,onclick
233,oncmd
233,onerror
233,onexit
233,onkey
233,palcolor
233,palette
233,pget
233,picload
233,poke
233,pos
233,print
233,pset
233,querycom
233,randomize
233,redraw
233,sarrayconv
233,screen
233,sdim
233,sendmsg
233,stick
233,stop
233,syscolor
233,sysfont
233,system
233,title
233,wait
233,width
233,winobj
233,wpoke
233,alloc
233,ddim
//--------------------------------------------------------------------------------------------------
// □ プログラム制御命令/マクロ
// ( 大文字小文字の区別 : OFF / 単語の検索 : ON / 正規表現 : OFF / 強調5 )
//--------------------------------------------------------------------------------------------------
299,if
299,else
299,break
299,continue
299,end
299,return
299,repeat
299,loop
299,goto
299,gosub
299,foreach
299,exgoto
299,on
299,run
299,_break
299,_continue
299,case
299,default
299,do
299,for
299,next
299,swbreak
299,swend
299,switch
299,until
299,wend
299,while
//--------------------------------------------------------------------------------------------------
// □ プリプロセッサ命令のキーワードなど
// ( 大文字小文字の区別 : ON / 単語の検索 : ON / 正規表現 : ON / 強調6 )
//--------------------------------------------------------------------------------------------------
// 命令のキーワードなど
371,(?<=^[ \t]*#[ \t]*packopt[ \t]+)(name|runtime|type|xsize|ysize|hide|orgpath)
371,(?<=^[ \t]*#[ \t]*cmpopt[ \t]+)(ppout|optcode|optinfo|varname)
371,(?<=^[ \t]*#[ \t]*aht[ \t]+)(class|name|author|ver|exp|icon|iconid)
371,(?<=^[ \t]*#[ \t]*(func|cfunc|define|const|enum|usecom|comfunc)[ \t]+)global
371,(?<=^[ \t]*#[ \t]*define[ \t]+(global[ \t]+)?)ctype
371,(?<=^[ \t]*#[ \t]*const[ \t]+(global[ \t]+)?)double
371,(?<=^[ \t]*#[ \t]*(deffunc|defcfunc)[ \t]+)local
371,(?<=^[ \t]*#[ \t]*(deffunc|defcfunc)[ \t]+(local[ \t]+)?[A-Z_a-z@`。-゚、-黑][0-9A-Z_a-z@`。-゚ -黑]*[ \t]+)onexit
371,(?<=^[ \t]*#[ \t]*(func|cfunc)[ \t]+[A-Z_a-z@`。-゚、-黑][0-9A-Z_a-z@`。-゚ -黑]*[ \t]+)onexit
// パラメータタイプ
371,(?<=[, \t])(int|var|array|str|double|label|local)(?=[ \t]+[A-Z_a-z@`。-゚、-黑])
371,(?<=[, \t])(bmscr|comobj|double|float|hdc|hinst|hwnd|int|label|nullptr|pexinfo|prefstr|pval|sptr|str|var|wptr|wstr)(?=[ \t]*(,|$))
//371,(?<=^[ \t]*#[ \t]*(func|cfunc)[ \t]+(global[ \t]+)?.+?[ \t]+(onexit[ \t]+)?(".+?"|.+?)[ \t]+)((int|var|str|wstr|sptr|wptr|double|label|float|pval|comobj|bmscr|prefstr|pexinfo|nullptr)([ \t]*,[ \t]*)?)+
//371,(?<=^[ \t]*#[ \t]*(comfunc)[ \t]+(global[ \t]+)?.+?[ \t]+.+?[ \t]+)((int|var|str|wstr|double|label|float|pval|bmscr|hwnd|hdc|hinst)([ \t]*,[ \t]*)?)+
//371,(?<=^[ \t]*#[ \t]*(func|cfunc)[ \t].*?,)(int|var|str|wstr|sptr|wptr|double|label|float|pval|comobj|bmscr|prefstr|pexinfo|nullptr)
//--------------------------------------------------------------------------------------------------
// □ プリプロセッサ命令
// ( 大文字小文字の区別 : ON / 単語の検索 : ON / 正規表現 : ON / 強調7 )
//--------------------------------------------------------------------------------------------------
435,(?<=^[ \t]*)#[ \t]*(uselib|usecom|undef|runtime|regcmd|packopt|pack|module|modterm|modinit|modfunc|include|ifndef|ifdef|if|global|func|epack|enum|endif|else|define|deffunc|defcfunc|const|comfunc|cmpopt|cmd|cfunc|ahtmes|aht|addition)
//--------------------------------------------------------------------------------------------------
// □ 数値リテラル
// ( 大文字小文字の区別 : OFF / 単語の検索 : OFF / 正規表現 : ON / 強調8 )
//--------------------------------------------------------------------------------------------------
475,\$[0-9a-f]+
475,(?<=[^0-9A-Z_a-z@`。-゚ -黑])0x[0-9a-f]+
475,%[01]+
475,(?<=[^0-9A-Z_a-z@`。-゚ -黑])0b[01]+
475,(?<=[^0-9A-Z_a-z@`。-゚ -黑])[0-9]+(\.[0-9]*)?(e[-+]?[0-9]+|f)?
// 負の数(減算の演算子と間違わないようにしている)
475,(?<=(:|^)[ \t]*[A-Z_a-z@`。-゚、-黑][0-9A-Z_a-z@`。-゚ -黑]*[ \t]*)-([0-9]+(\.[0-9]*)?(e[-+]?[0-9]+|f)?|(\$|0x)[0-9a-f]+|(%|0b)[01]+)
475,(?<=([^0-9A-Z_a-z@`。-゚ -黑]([0-9]+(\.[0-9]f*)?(e[-+]?[0-9]+|f)?|0b[01]+|0x[0-9a-f]+)?|$[0-9a-f]+|%[01]+)(and|or|xor|not)[ \t]*)-([0-9]+(\.[0-9]*)?(e[-+]?[0-9]+|f)?|(\$|0x)[0-9a-f]+|(%|0b)[01]+)
475,(?<=[^ \t)0-9A-Z_a-z@`。-゚ -黑][ \t]*)-([0-9]+(\.[0-9]*)?(e[-+]?[0-9]+|f)?|(\$|0x)[0-9a-f]+|(%|0b)[01]+)
//--------------------------------------------------------------------------------------------------
// □ モジュール/関数/ラベルの行の強調
// ( 大文字小文字の区別 : ON / 単語の検索 : OFF / 正規表現 : ON / 行の強調1~2 )
//--------------------------------------------------------------------------------------------------
21,^[ \t]*#[ \t]*(module|global)
85,^[ \t]*#[ \t]*(modinit|modfunc|modterm|deffunc|defcfunc)
85,^[ \t]*\*[A-Z_a-z`。-゚、-黑][0-9A-Z_a-z@`。-゚ -黑]*
//==================================================================================================
// ■ 複数行の強調
//==================================================================================================
/<HilightMulti>
//--------------------------------------------------------------------------------------------------
// □ 文字列リテラル・文字コード
//--------------------------------------------------------------------------------------------------
/0003,00000003,00,00,00000002,"//",00000002,""
/0003,00000003,00,00,00000002,";",00000002,""
/0003,00000002,00,00,00000002,"/*",00000002,"*/"
//--------------------------------------------------------------------------------------------------
// □ コメント
//--------------------------------------------------------------------------------------------------
/0014,00000002,00,5C,00010003,"(?<={)\"",00010003,"\"(?=})"
/0014,00000002,00,5C,00000002,"\"",00010003,"\"|$"
/0014,00000002,00,5C,00000002,"'",00010003,"'|$"
//--------------------------------------------------------------------------------------------------
// □ #if 0 ~ #endif
//--------------------------------------------------------------------------------------------------
/001A,00000000,00,00,00010003,"^([ \\t]*#[ \\t]*)if[ \\t]+0[ \\t]*$",0001000B,"^(?=\\1(endif|else))"
//--------------------------------------------------------------------------------------------------
// □ ラベル
//--------------------------------------------------------------------------------------------------
/0005,00000003,00,00,00000003,"(?<=([(,:=]|^|([\\t (,]|^)[\\t ]*(goto|gosub)|(:|^)[\\t ]*[A-Z_a-z@`。-゚、-黑][0-9A-Z_a-z@`。-゚ -黑]*)[\\t ]*)\\*[A-Z_a-z@`。-゚、-黑][0-9A-Z_a-z@`。-゚ -黑]*",00000002,""
//==================================================================================================
// ■ ツリー定義
//==================================================================================================
/<TreeWord>
/0000,0000,0000,00000001,00000112,"","モジュール"
/0001,0000,0000,00000080,00000112,"","関数/ラベル"
//==================================================================================================
// ■ カラー
//==================================================================================================
/<ColorSet>
/[0][0]:0x01000008
/[0][1]:0x01000005
/[0][2]:0x00000000
/[1][0]:0x01000008
/[1][1]:0x02000000
/[1][2]:0x00000000
/[2][0]:0x01000008
/[2][1]:0x02000000
/[2][2]:0x00000001
/[3][0]:0x00008000
/[3][1]:0x02000000
/[3][2]:0x00000000
/[4][0]:0x00800000
/[4][1]:0x02000000
/[4][2]:0x00000000
/[5][0]:0x00808000
/[5][1]:0x02000000
/[5][2]:0x00000001
/[6][0]:0x02000000
/[6][1]:0x00C8C8C8
/[6][2]:0x0000000B
/[7][0]:0x00008080
/[7][1]:0x02000000
/[7][2]:0x00000000
/[8][0]:0x000000FF
/[8][1]:0x02000000
/[8][2]:0x00000001
/[9][0]:0x02000000
/[9][1]:0x00E2E2E2
/[9][2]:0x0000000B
/[10][0]:0x01000005
/[10][1]:0x00008000
/[10][2]:0x00000000
/[11][0]:0x00800080
/[11][1]:0x02000000
/[11][2]:0x00000002
/[12][0]:0x00800000
/[12][1]:0x02000000
/[12][2]:0x00000002
/[13][0]:0x00808000
/[13][1]:0x02000000
/[13][2]:0x00000000
/[14][0]:0x00800080
/[14][1]:0x02000000
/[14][2]:0x00000000
/[15][0]:0x00000080
/[15][1]:0x02000000
/[15][2]:0x00000000
/[16][0]:0x00808000
/[16][1]:0x01000005
/[16][2]:0x00000000
/[17][0]:0x0100000E
/[17][1]:0x0100000D
/[17][2]:0x00000000
/[18][0]:0x00808080
/[18][1]:0x01000005
/[18][2]:0x00000000
/[19][0]:0x00808080
/[19][1]:0x01000005
/[19][2]:0x00000000
/[20][0]:0x00006AD5
/[20][1]:0x02000000
/[20][2]:0x00000000
/[21][0]:0x00008080
/[21][1]:0x02000000
/[21][2]:0x00000002
/[22][0]:0x00FF0000
/[22][1]:0x02000000
/[22][2]:0x00000000
/[23][0]:0x00800080
/[23][1]:0x02000000
/[23][2]:0x00000000
/[24][0]:0x01000008
/[24][1]:0x02000000
/[24][2]:0x00000001
/[25][0]:0x01000008
/[25][1]:0x02000000
/[25][2]:0x00000001
/[26][0]:0x00C0C0C0
/[26][1]:0x02000000
/[26][2]:0x00000000
/[27][0]:0x00000080
/[27][1]:0x01000005
/[27][2]:0x00000000
/[28][0]:0x00C0C0C0
/[28][1]:0x01000005
/[28][2]:0x00000000
/[29][0]:0x00808000
/[29][1]:0x01000005
/[29][2]:0x00000000
/[30][0]:0x01000008
/[30][1]:0x01000005
/[30][2]:0x00000000
/[31][0]:0x00E0E0E0
/[31][1]:0x01000005
/[31][2]:0x00000000
/[32][0]:0x000000FF
/[32][1]:0x01000005
/[32][2]:0x00000000
/[33][0]:0x00C0C0C0
/[33][1]:0x01000005
/[33][2]:0x00000000
/[34][0]:0x01000008
/[34][1]:0x0000FFFF
/[34][2]:0x00000001
/[35][0]:0x000000FF
/[35][1]:0x01000005
/[35][2]:0x00000000
/[36][0]:0x00800080
/[36][1]:0x02000000
/[36][2]:0x00000001
/[37][0]:0x00404080
/[37][1]:0x02000000
/[37][2]:0x00000000
/[38][0]:0x00404080
/[38][1]:0x02000000
/[38][2]:0x00000001
/[39][0]:0x00C08000
/[39][1]:0x02000000
/[39][2]:0x00000000
/[40][0]:0x0000FF00
/[40][1]:0x02000000
/[40][2]:0x00000001
/[41][0]:0x00FF00FF
/[41][1]:0x02000000
/[41][2]:0x00000001
/[42][0]:0x00FFFFFF
/[42][1]:0x00808000
/[42][2]:0x00000000
/[43][0]:0x00FFFFFF
/[43][1]:0x00800080
/[43][2]:0x00000000
/[44][0]:0x00FF0000
/[44][1]:0x02000000
/[44][2]:0x00000000
/[45][0]:0x00FFFFFF
/[45][1]:0x00808080
/[45][2]:0x00000000
/[46][0]:0x00808080
/[46][1]:0x00E0E0E0
/[46][2]:0x00000000
/[47][0]:0x00808000
/[47][1]:0x02000000
/[47][2]:0x00000000
/[48][0]:0x01000005
/[48][1]:0x01000008
/[48][2]:0x00000000
/[49][0]:0x02000000
/[49][1]:0x02000000
/[49][2]:0x00000000
/[50][0]:0x00000000
/[50][1]:0x00000000
/[50][2]:0x00000000
/<ColorSetEx>
CurLineColorEx:0x00000080
RulerColorEx:0xFFFFFFFF
RulerBackEx:0xFFFFFFFF
//**************************************************************************************************