Awesome Go

codetree

CategoryText Processing
SubcategoryParsers/Encoders/Decoders
Stars0

Parses indented code (python, pixy, scarlet, etc.) and returns a tree structure

About codetree

codetree

Godoc Report Tests Coverage Sponsor

Parses indented code (Python, Pug, Stylus, Pixy, codetree, etc.) and returns a tree structure.

Installation

go get github.com/aerogo/codetree

Usage

tree, err := codetree.New(reader)
defer tree.Close()

Input

parent1
	child1
	child2
	child3
		child3.1
		child3.2
	child4

parent2
	child1

Output

See CodeTree structure.

The root node always starts with Indent being -1.

Style

Please take a look at the style guidelines if you'd like to make a pull request.

Sponsors

Cedric FungScott RayapoulléEduard Urbach
Cedric FungScott RayapoulléEduard Urbach

Want to see your own name here?

Frequently Asked Questions

What is codetree?

codetree is a Text Processing library for the Go programming language. Parses indented code (python, pixy, scarlet, etc.) and returns a tree structure

How do I install codetree?

Install codetree with the Go module system using `go get aerogo/codetree`. Check the repository for the current installation instructions.

What category does codetree belong to?

codetree is listed under Text Processing, specifically Parsers/Encoders/Decoders.

← Back to Parsers/Encoders/Decoders