Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Data Modeling Programming Language

License

NotificationsYou must be signed in to change notification settings

cluesurf/tree

Repository files navigation








tree

A Data Modeling Programming Language




Welcome

TreeCode is a little more than a markup language,tending toward a programming language. In fact, it can be used for aprogramming language. It is a way to model information and computationin an easy to read and write format, suitable for hierarchical notetaking and other means of capturing data down into structured form.

Theory

There are two types of TreeCode:

  • TreeFlow: Simple tree structure, non-circular, expandedinterpolations. This is "simple form" of TreeCode, which can be usedto construct serializable data like JSON.
  • TreeMesh: Code tree structure, possibly circular, linkedinterpolations. This is the "complex form" of TreeCode, which can beused to write complex code.

Upon parsing, we should be able to say whether or not the TreeCodepasses the threshold for being calledTreeFlow, otherwise it is bydefault consideredTreeMesh.

In principle, two separate parsers can be developed for these two forms,TreeFlow being optimized for not handling all the complex cases ofcircular reasoning and interpolation, just sticking to basic expandingdata structures like JSON.

Installation

pnpm add @cluesurf/tree

Usage

importmakeTreefrom'@cluesurf/tree'constfile='./base.tree'consttext=`deck <@cluesurf/wolf>  bear ./code  test ./test  mark <0.0.1>`consttree=makeTree({ file, text})

VSCode Integration

Install thesyntax highlighterVSCode extension and get aworkin!

State of Library

Tests pass for positive cases (pnpm test), but fail on some crazyerror cases it should handle nicely. So still have some work to do onmaking this robust, but it should parse the basic structures fine, justnot commplicated interpolation styles with nesting.

License

MIT

ClueSurf

This is being developed by the folks atClueSurf, aCalifornia-based project for helping humanity master information andcomputation. Find us onX,LinkedIn, andFacebook. Check out our otherGitHub projects as well!

Sponsor this project

    Packages

    No packages published

    [8]ページ先頭

    ©2009-2025 Movatter.jp