From 56ad4b9b9c18a18bead17dca7828f39390271ce1 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 25 Nov 2015 10:39:13 -0500 Subject: [PATCH] =?UTF-8?q?Retrieve=20the=20node=E2=80=99s=20name.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Main.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Main.hs b/app/Main.hs index e5bcda8dc..8f842ce70 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -79,7 +79,9 @@ parseTreeSitterFile file = do putStrLn $ "cSizeOf " ++ show (cSizeOf document) where keyedProductions = Data.Set.fromList [ "object" ] fixedProductions = Data.Set.fromList [ "pair", "rel_op", "math_op", "bool_op", "bitwise_op", "type_op", "math_assignment", "assignment", "subscript_access", "member_access", "new_expression", "function_call", "function", "ternary" ] - toTerm (node, category) = _ + toTerm (node, category) = do + name <- ts_node_p_name node document + return () withNode :: (Ptr TSNode -> IO a) -> IO a withNode writer = do