(CppCompilation ast)
| 190 | /////////////////////////////////////////// |
| 191 | |
| 192 | static List<CSModule> ParseModules(CppCompilation ast) |
| 193 | { |
| 194 | Dictionary<string, CSModule> modules = new Dictionary<string, CSModule>(); |
| 195 | |
| 196 | foreach (var f in ast.Functions) |
| 197 | { |
| 198 | string[] words = f.Name.Split('_'); |
| 199 | CSModule mod = null; |
| 200 | if (!modules.TryGetValue(words[0], out mod)) |
| 201 | { |
| 202 | mod = new CSModule(words[0]); |
| 203 | modules.Add(words[0], mod); |
| 204 | } |
| 205 | |
| 206 | mod.AddFunction(f); |
| 207 | } |
| 208 | |
| 209 | return new List<CSModule>(modules.Values); |
| 210 | } |
| 211 | } |
nothing calls this directly
no test coverage detected