From 64a4a35cc63763a11de17d8d796572b52938134c Mon Sep 17 00:00:00 2001 From: svkalinin Date: Thu, 8 Dec 2022 09:39:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D1=81=D0=B2=D0=B5=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B8=20=D0=BD=D0=B0=D0=B2=D0=B8=D0=B3=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BF=D0=BE=20=D0=BA=D0=BE=D0=B4=D1=83=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20Ruby?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/highlight.tcl | 7 +++---- lib/lexers.tcl | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/highlight.tcl b/lib/highlight.tcl index 65aaa52..2ad14eb 100644 --- a/lib/highlight.tcl +++ b/lib/highlight.tcl @@ -98,14 +98,13 @@ namespace eval Highlight {} { proc RB {txt} { ctext::addHighlightClassForRegexp $txt qoute #b84a0c {("|'|`).*?("|'|`)} ctext::addHighlightClassForRegexp $txt flags orange {\s-[a-zA-Z]+} - ctext::addHighlightClass $txt stackControl #19a2a6 {def end class if else for while case when} - # ctext::addHighlightClass $txt widgets #9d468d [list canvas ctext button entry label text labelframe frame toplevel scrollbar checkbutton canvas listbox menu menubar menubutton radiobutton scale entry message tk_chooseDir tk_getSaveFile tk_getOpenFile tk_chooseColor tk_optionMenu ttk::button ttk::checkbutton ttk::combobox ttk::entry ttk::frame ttk::intro ttk::label ttk::labelframe ttk::menubutton ttk::treeview ttk::notebook ttk::panedwindow ttk::progressbar ttk::radiobutton ttk::scale ttk::scrollbar ttk::separator ttk::sizegrip ttk::spinbox ] + ctext::addHighlightClass $txt stackControl #19a2a6 {def end class if else for while case when require module begin rescue self return include} ctext::addHighlightClassForRegexp $txt vars #4471ca {(\$|\*|\&)[\.a-zA-Z0-9\_\-\[\]]+} - # ctext::addHighlightClass $txt variable_funcs gold {set global variable unset} ctext::addHighlightClassForSpecialChars $txt brackets green {[]{}()} ctext::addHighlightClassForRegexp $txt paths lightblue {\.[a-zA-Z0-9\_\-]+} ctext::addHighlightClassForRegexp $txt comments #666666 {(#|//)[^\n\r]*} ctext::addHighlightClassForRegexp $txt namespaces #4f64ff {::} + ctext::addHighlightClassForRegexp $txt dog #0082ff {(@)[\.a-zA-Z0-9\_\-]+} } proc MD {txt} { ctext::addHighlightClassForRegexp $txt comments #666666 {^\s+?(#|//).*$} @@ -122,7 +121,7 @@ namespace eval Highlight {} { proc PL {txt} { ctext::addHighlightClassForRegexp $txt qoute #b84a0c {("|'|`).*?("|'|`)} ctext::addHighlightClassForRegexp $txt flags orange {\s-[a-zA-Z]+} - ctext::addHighlightClass $txt stackControl #19a2a6 {sub my end class new if else elsif for foreach while case when use ne eq print exit chdir rand die lt gt le ge say unless return chomp package push exec grep eval warn scalar next continue close} + ctext::addHighlightClass $txt stackControl #19a2a6 {sub my end class new if else elsif for foreach while case when use ne eq print exit chdir rand die lt gt le ge say unless return chomp package push exec grep eval warn scalar next continue close module require} ctext::addHighlightClassForRegexp $txt vars #4471ca {(\$|\*|\&)[\.a-zA-Z0-9\_\-\[\]]+} ctext::addHighlightClassForSpecialChars $txt brackets green {[]{}()} # ctext::addHighlightClassForSpecialChars $txt dog #0082ff {@} diff --git a/lib/lexers.tcl b/lib/lexers.tcl index 74a179e..33bc7d5 100644 --- a/lib/lexers.tcl +++ b/lib/lexers.tcl @@ -35,8 +35,8 @@ dict set lexers PY procRegexpCommand {regexp -nocase -all -- {^\s*?(def)\s*?(.*? # Ruby dict set lexers RB commentSymbol {#} dict set lexers RB tabSize 2 -dict set lexers RB procFindString {(def )\s*?PROCNAME} -dict set lexers RB procRegexpCommand {regexp -nocase -all -- {^\s*?(def)\s([a-zA-Z0-9\-_:]+?)($|\(.+?\))} $line match keyWord procName params} +dict set lexers RB procFindString {(def |class )\s*?PROCNAME} +dict set lexers RB procRegexpCommand {regexp -nocase -all -- {^\s*?(def|class)\s([a-zA-Z0-9\-_:\?]+?)($|\s|\(.+?\))} $line match keyWord procName params} #-------------------------------------------------- # YAML (ansible)