AllCommandsSorted returns the list of commands retuned by AllCommands, sorted lexicographically.
(api interface{})
| 144 | // AllCommandsSorted returns the list of commands retuned by AllCommands, sorted |
| 145 | // lexicographically. |
| 146 | func (f *Functions) AllCommandsSorted(api interface{}) ([]*semantic.Function, error) { |
| 147 | cmds, err := f.AllCommands(api) |
| 148 | if err != nil { |
| 149 | return nil, err |
| 150 | } |
| 151 | sort.Slice(cmds, func(i, j int) bool { return cmds[i].Name() < cmds[j].Name() }) |
| 152 | return cmds, nil |
| 153 | } |
| 154 | |
| 155 | // TokenOf returns the cst token string that represents the supplied semantic node |
| 156 | func (f *Functions) TokenOf(v semantic.Node) string { |
nothing calls this directly
no test coverage detected