Skip to content
🌲 Parses indented code and returns a tree structure.
Go
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
testdata Increased coverage to 100% May 7, 2019
.drone.yml Disable typecheck while it's bugged Sep 4, 2019
.gitignore Initial commit Nov 26, 2016
.golangci.yml Fixed CI tests May 1, 2019
CodeTree.go Disabled line skipping Jun 9, 2019
CodeTree_test.go Use akyoto/assert for tests Aug 17, 2019
LICENSE Sponsorship License Sep 4, 2019
README.md Updated README May 24, 2019
README.src.md Updated README May 12, 2019
go.mod Updated dependencies Aug 25, 2019
go.sum Updated dependencies Aug 25, 2019

README.md

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 Fung Scott Rayapoullé Eduard Urbach
Cedric Fung Scott Rayapoullé Eduard Urbach

Want to see your own name here?

You can’t perform that action at this time.