(source: string)
| 272 | |
| 273 | /** Parse Kotlin source and return root node. */ |
| 274 | export async function parseKotlin(source: string): Promise<SyntaxNode> { |
| 275 | const parser = await getKotlinParser(); |
| 276 | const tree = parser.parse(source); |
| 277 | if (!tree) throw new Error('Failed to parse Kotlin source'); |
| 278 | return tree.rootNode; |
| 279 | } |
| 280 | |
| 281 | /** Parse Swift source and return root node. */ |
| 282 | export async function parseSwift(source: string): Promise<SyntaxNode> { |
no test coverage detected