Skip to content

help on how to use ocaml-treesitter #287

Answered by jrfaller
AbhinavDutta asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

This is what I get :

> gumtree parse test.ml

compilation_unit [0,30]
    expression_item [0,29]
        application_expression [0,29]
            value_path [0,12]
                value_name: print_string [0,12]
            string [13,29]
                ": " [13,14]
                string_content [14,28]
                    escape_sequence: \n [26,28]
                ": " [28,29]

You can try out tree sitter parser directly like this :

> tree-sitter-parser.py test.ml ocaml

<?xml version="1.0" ?>
<tree type="compilation_unit" pos="0" length="30">
	<tree type="expression_item" pos="0" length="29">
		<tree type="application_expression" pos="0" length="29">
			<tree type="value_path" p…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@AbhinavDutta
Comment options

@AbhinavDutta
Comment options

@jrfaller
Comment options

@jrfaller
Comment options

@AbhinavDutta
Comment options

Answer selected by AbhinavDutta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants