From c829ec11568b96579e9a2cebeac593d5334e8f8f Mon Sep 17 00:00:00 2001 From: svkalinin Date: Wed, 7 Dec 2022 13:14:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA?= =?UTF-8?q?=D0=B0=20perl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/highlight.tcl | 13 +++++++++++++ lib/image_library.tcl | 3 ++- lib/lexers.tcl | 9 +++++++++ projman.tcl | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/highlight.tcl b/lib/highlight.tcl index 1608ed3..112cef0 100644 --- a/lib/highlight.tcl +++ b/lib/highlight.tcl @@ -118,4 +118,17 @@ namespace eval Highlight {} { ctext::addHighlightClassForRegexp $txt quotedtext #a9b36c {^(\s*?)(>+).+?$} ctext::addHighlightClassForRegexp $txt italictext #dff74e {((_|\*)+?)(\w+?)((_|\*)+?)} } + + 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::addHighlightClassForRegexp $txt vars #4471ca {(\$|\*|\&)[\.a-zA-Z0-9\_\-\[\]]+} + ctext::addHighlightClassForSpecialChars $txt brackets green {[]{}()} + # ctext::addHighlightClassForSpecialChars $txt dog #0082ff {@} + ctext::addHighlightClassForRegexp $txt dog #0082ff {(@)[\.a-zA-Z0-9\_\-\[\]]+} + ctext::addHighlightClassForRegexp $txt paths lightblue {\.[a-zA-Z0-9\_\-]+} + ctext::addHighlightClassForRegexp $txt comments #666666 {(#|//)[^\n\r]*} + ctext::addHighlightClassForRegexp $txt namespaces #0093ff {->|\+\+|::} + } } diff --git a/lib/image_library.tcl b/lib/image_library.tcl index 5f00ceb..c0b56df 100644 --- a/lib/image_library.tcl +++ b/lib/image_library.tcl @@ -1379,4 +1379,5 @@ image create photo git_16x12 -data { vQTesyxrAg+qGonIYGkHqipU5zwIgjdglldxSwLnXMcYMy6Ac1X9AnaAZ2APmIRh2C5dYhzH9TRN R6oaAWRZ1lTVubX2KT8yqdVqx71eb1YqKJHcAh44qYKXBPlHWgeugf1VN1cKfl4iIgNjjAvDsF0F A3wD9EWTx4J8PxsAAAAASUVORK5CYII= -} +} + diff --git a/lib/lexers.tcl b/lib/lexers.tcl index 3a7a860..b137e3a 100644 --- a/lib/lexers.tcl +++ b/lib/lexers.tcl @@ -55,5 +55,14 @@ dict set lexers MD procFindString {(#+?)\s*?PROCNAME} dict set lexers MD procRegexpCommand {regexp -nocase -all -- {^(#+?)\s(.+?)$} $line match keyWord procName} # dict set lexers YML varRegexpCommandMultiline {regexp -all -line -- {^(\s*)(set_fact|vars):$} $line match indent keyWord} +#-------------------------------------------------- +# Perl +dict set lexers PL commentSymbol {#} +dict set lexers PL variableSymbol {$} +dict set lexers PL tabSize 4 +dict set lexers PL procFindString {(sub )\s*?PROCNAME} +dict set lexers PL procRegexpCommand {regexp -nocase -all -- {^\s*?(sub)\s([a-zA-Z0-9\-_:]+?)($|\(.+?\))} $line match keyWord procName params} +dict set lexers PL varRegexpCommand {regexp -nocase -all -- {^(\s*?)\$([a-zA-Z0-9\-_$]+)\s+=\s+(.+?)(\s*;$)} $line match indent varName varValue lineEnd} + # ------------------------------------------------- dict set lexers ALL varDirectory {variables vars group_vars host_vars defaults} diff --git a/projman.tcl b/projman.tcl index 8ff863f..d571aee 100755 --- a/projman.tcl +++ b/projman.tcl @@ -10,7 +10,7 @@ exec wish "$0" -- "$@" ###################################################### # Version: 2.0.0 # Release: alpha -# Build: 05122022105648 +# Build: 07122022131333 ###################################################### # определим текущую версию, релиз и т.д.