Добавил поддержку ruby, yaml/ Зачаток работы со структурой файлов (переменные процедуры)

This commit is contained in:
svkalinin
2022-09-02 17:01:53 +03:00
parent a67916273c
commit 4f6735dcea
11 changed files with 510 additions and 84 deletions

View File

@@ -8,6 +8,7 @@
dict set lexers TCL commentSymbol {#}
dict set lexers TCL procFindString {proc PROCNAME}
dict set lexers TCL procRegexpCommand {regexp -nocase -all -- {^\s*?(proc) (.*?) \{(.*?)\} \{} $line match keyWord procName params}
dict set lexers TCL varRegexpCommand {regexp -nocase -all -- {^\s*?set\s+([a-zA-Z0-9\:\-_$]+)\s+(.+?)($|;)} $line match varName varValue lineEnd}
#--------------------------------------------------
# Go lang
@@ -26,3 +27,22 @@ dict set lexers SH procRegexpCommand {regexp -nocase -all -- {^\s*?(function |)\
dict set lexers PY commentSymbol {#}
dict set lexers PY procFindString {(def )\s*?PROCNAME}
dict set lexers PY procRegexpCommand {regexp -nocase -all -- {^\s*?(def)\s*?(.*?)\((.*?)\):} $line match keyWord procName params}
#--------------------------------------------------
# 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}
#--------------------------------------------------
# YAML (ansible)
dict set lexers YML commentSymbol {#}
dict set lexers YML tabSize 2
dict set lexers YML procFindString {(- name:)\s*?PROCNAME}
dict set lexers YML procRegexpCommand {regexp -nocase -all -- {^\s*?- (name):\s(.+?)$} $line match keyWord procName}
dict set lexers YML varRegexpCommand {regexp -nocase -all -- {^\s*?([a-zA-Z0-9\-_$]+):\s+(.+?)(\s*$)} $line match varName varValue lineEnd}
dict set lexers ALL varDirectory {vars group_vars host_vars}