Исправлено чтение структуры GO файлов: корректное отображение в дереве функций возвращающих значения разных типов
This commit is contained in:
parent
b1d3d2b75c
commit
a586b7c159
|
@ -62,4 +62,5 @@
|
||||||
|
|
||||||
15/08/2022
|
15/08/2022
|
||||||
- Added open/close braces highlight
|
- Added open/close braces highlight
|
||||||
|
- Fixed GO structure reader
|
||||||
|
|
||||||
|
|
|
@ -488,7 +488,7 @@ namespace eval Editor {
|
||||||
puts [Tree::InsertItem $tree $treeItemName $procName "procedure" "$procName ($params)"]
|
puts [Tree::InsertItem $tree $treeItemName $procName "procedure" "$procName ($params)"]
|
||||||
}
|
}
|
||||||
# GO function
|
# GO function
|
||||||
if {[regexp -nocase -all -- {^\s*?func\s*?\((\w+\s*?\*\w+)\)\s*?(\w+)\((.*?)\)\s*?(\(\w+\)|\w+|)\s*?\{} $line match v1 funcName params returns]} {
|
if {[regexp -nocase -all -- {^\s*?func\s*?\((\w+\s*?\*\w+)\)\s*?(\w+)\((.*?)\)\s*?([a-zA-Z0-9\{\}\[\]\(\)-_.]*?|)\s*?\{} $line match v1 funcName params returns]} {
|
||||||
# set procName "$v2$v3$v4$v5"
|
# set procName "$v2$v3$v4$v5"
|
||||||
# lappend procList($activeProject) [list $procName [string trim $params]]
|
# lappend procList($activeProject) [list $procName [string trim $params]]
|
||||||
if {$v1 ne ""} {
|
if {$v1 ne ""} {
|
||||||
|
@ -499,7 +499,7 @@ namespace eval Editor {
|
||||||
# tree parent item type text
|
# tree parent item type text
|
||||||
puts [Tree::InsertItem $tree $treeItemName $funcName "func" "$functionName ($params)"]
|
puts [Tree::InsertItem $tree $treeItemName $funcName "func" "$functionName ($params)"]
|
||||||
}
|
}
|
||||||
if {[regexp -nocase -all -- {^\s*?func\s*?(\w+)\((.*?)\) (\(\w+\)|\w+|)\s*?\{} $line match funcName params returns]} {
|
if {[regexp -nocase -all -- {^\s*?func\s*?(\w+)\((.*?)\)\s+?([a-zA-Z0-9\{\}\[\]\(\)-_.]*?|)\s*?\{} $line match funcName params returns]} {
|
||||||
# puts "$treeItemName func $funcName $params"
|
# puts "$treeItemName func $funcName $params"
|
||||||
# tree parent item type text
|
# tree parent item type text
|
||||||
puts [Tree::InsertItem $tree $treeItemName $funcName "func" "$funcName ($params)"]
|
puts [Tree::InsertItem $tree $treeItemName $funcName "func" "$funcName ($params)"]
|
||||||
|
|
|
@ -10,7 +10,7 @@ exec wish "$0" -- "$@"
|
||||||
######################################################
|
######################################################
|
||||||
# Version: 2.0.0
|
# Version: 2.0.0
|
||||||
# Release: alpha
|
# Release: alpha
|
||||||
# Build: 15082022110520
|
# Build: 15082022113125
|
||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
# определим текущую версию, релиз и т.д.
|
# определим текущую версию, релиз и т.д.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user