(parsedSnippet: TextmateSnippet)
| 146 | } |
| 147 | |
| 148 | function getMaxPlaceholderIndex(parsedSnippet: TextmateSnippet) { |
| 149 | var placeholderIndex = 0; |
| 150 | parsedSnippet.walk((candidate) => { |
| 151 | if (candidate instanceof Placeholder) { |
| 152 | placeholderIndex = Math.max(placeholderIndex, candidate.index); |
| 153 | } |
| 154 | return true; |
| 155 | }); |
| 156 | return placeholderIndex; |
| 157 | } |
| 158 | |
| 159 | function parseSnippetLocation(snippetLocation: string): [string, string] { |
| 160 | const [snippetName, placeholderName] = snippetLocation.split("."); |
no test coverage detected