Skip to content

Cirru/parser.go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cirru Parser

Cirru Parser implemented in Go. Visit http://cirru.org for more.

You may also find one writtern in CoffeeScript.

Usage

GoDoc

You may find a complete demo at parser_test.go. Here is an overview.

// import "github.com/Cirru/parser"

b, _ := ioutil.ReadFile("demo.cirru")

p := parser.NewParser()
p.Filename("_") // to specify filename
for _, c := range b {
  p.Read(rune(c))
}
p.Complete()

content, _ := json.MarshalIndent(p.ToTree(), "", "  ")
string(content) // in JSON

License

MIT

Releases

No releases published

Packages

No packages published