Исправлено регшулярное выражение для поиска переменных в коде на С.

This commit is contained in:
svk
2026-02-13 11:22:36 +03:00
parent b12381dbce
commit 40ceb04bf8

View File

@@ -113,6 +113,7 @@ dict set lexers C procFindString {(\w+)\s+(PROCNAME)\s*\((.*?)(,|\))(\W|$)}
dict set lexers C procRegexpCommand {regexp -nocase -all -line -- {^(?:(\w+)\s+)+(\*\w+|\w+)\s*\((.*?)(,|\))} $line match returns procName params v4}
# dict set lexers C procRegexpCommand {regexp -nocase -all -- {\s*?func\s*?(\(\w+\s*?\**?\w+\)|)\s*?(\w+)\((.*?)\)\s+?([a-zA-Z0-9\{\}\[\]\(\)-_.]*?|)\s*?\{} $line match linkName procName params returns}
# dict set lexers C varRegexpCommand {regexp -nocase -all -line -- {^\s*?var\s+([a-zA-Z0-9\-_$]+)\s+(.+?)(\s*$)} $line match varName varType lineEnd}
dict set lexers C varRegexpCommand {regexp -nocase -all -line -- {^\s*(\w+\s+)+(?:[*\s]+)?(\w+)\s*[=;,\[]} $line match varType varName}
dict set lexers C commands {auto break case const continue default do else enum extern for goto if inline int long register restrict return signed sizeof static struct switch typedef typeof typeof_unqual union unsigned void volatile while}
#--------------------------------------------------
@@ -124,7 +125,7 @@ dict set lexers H commentMultilineSymbolEnd {*/}
dict set lexers H procFindString {^\s*(?:(\w+)\s+)+(PROCNAME)\s*\((.*?)(,|\))}
dict set lexers H procRegexpCommand {regexp -nocase -all -line -- {^(?:(\w+)\s+)+(\*\w+|\w+)\s*\((.*?)(,|\))} $line match returns procName params v4}
# dict set lexers C procRegexpCommand {regexp -nocase -all -- {\s*?func\s*?(\(\w+\s*?\**?\w+\)|)\s*?(\w+)\((.*?)\)\s+?([a-zA-Z0-9\{\}\[\]\(\)-_.]*?|)\s*?\{} $line match linkName procName params returns}
# dict set lexers C varRegexpCommand {regexp -nocase -all -line -- {^\s*?var\s+([a-zA-Z0-9\-_$]+)\s+(.+?)(\s*$)} $line match varName varType lineEnd}
dict set lexers C varRegexpCommand {regexp -nocase -all -line -- {^\s*(\w+\s+)+(?:[*\s]+)?(\w+)\s*[=;,\[]} $line match varType varName}
dict set lexers H commands {auto break case const continue default do else enum extern for goto if inline int long register restrict return signed sizeof static struct switch typedef typeof typeof_unqual union unsigned void volatile while}
# -------------------------------------------------