- Notifications
You must be signed in to change notification settings - Fork0
A Data Modeling Programming Language
License
cluesurf/tree
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A Data Modeling Programming Language
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.
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.
pnpm add @cluesurf/tree
importmakeTreefrom'@cluesurf/tree'constfile='./base.tree'consttext=`deck <@cluesurf/wolf> bear ./code test ./test mark <0.0.1>`consttree=makeTree({ file, text})
Install thesyntax highlighterVSCode extension and get aworkin!
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.
MIT
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!
About
A Data Modeling Programming Language