(source: string)
| 264 | |
| 265 | /** Parse C# source and return root node. */ |
| 266 | export async function parseCsharp(source: string): Promise<SyntaxNode> { |
| 267 | const parser = await getCsharpParser(); |
| 268 | const tree = parser.parse(source); |
| 269 | if (!tree) throw new Error('Failed to parse C# source'); |
| 270 | return tree.rootNode; |
| 271 | } |
| 272 | |
| 273 | /** Parse Kotlin source and return root node. */ |
| 274 | export async function parseKotlin(source: string): Promise<SyntaxNode> { |
no test coverage detected