pub fn getNodeSource(tree: Ast, node: Node.Index) []const u8
tree: Ast
node: Node.Index
1304 1305 1306 1307 1308 1309 1310
pub fn getNodeSource(tree: Ast, node: Node.Index) []const u8 { const first_token = tree.firstToken(node); const last_token = tree.lastToken(node); const start = tree.tokenStart(first_token); const end = tree.tokenStart(last_token) + tree.tokenSlice(last_token).len; return tree.source[start..end]; }