Skip to content

Saber2pr/tree-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@saber2pr/tree-lang

a tree language.

yarn add @saber2pr/tree-lang

Example

  1. code like this
parent1
  child1
parent2
  child1
  child2
parent3
  child1
    childd1
  1. parse
import parse from "@saber2pr/tree-lang"

parse(code)
/*
{
  name: "root",
  children: [
    {
      name: "parent1",
      children: [
        {
          name: "child1"
        }
      ]
    },
    {
      name: "parent2",
      children: [
        {
          name: "child1"
        },
        {
          name: "child2"
        }
      ]
    },
    {
      name: "parent3",
      children: [
        {
          name: "child1",
          children: [
            {
              name: "childd1"
            }
          ]
        }
      ]
    }
  ]
}
*/

start

yarn install
yarn start

yarn test

Author: saber2pr

About

a tree language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published