What's currently implemented is a basic projectional editor, where the AST gets 
converted to another tree (cell tree) which can be rendered and edited. The 
edits to that get applied to the underlying AST.

There's currently no advanced projections like e.g. tables or color pickers, 
but it can render the AST in a way which looks a lot like regular code.

You can also define languages by defining the structure of the AST, how the 
projection looks, how types are calculated and how it gets translated to WASM.

So you could for example define a language which has expressions nodes, binary 
expression nodes and number literal nodes, where the binary expression and 
number nodes would be subclasses of expressions.

Then you can define a type system (which also gets represented by AST nodes) 
and e.g. a function which calculates the type of a binary expression or number 
literal. You can also define how scopes are calculated (a scope is basically 
the set of nodes which can be referenced by a specific node).

There are a few builtin languages

  * base language, which is a low level language (pointers, manual memory 
management, etc). This language can be compiled to WASM and be used to 
implement other languages by e.g writing the type calculation in the base 
language
  * A few languages for defining AST nodes classes, projections, etc which also 
embeds the base language (this is still work in progress, you can't define how 
to compile AST nodes to WASM yet for example, that has to be done as part of 
the editor source code using the Nim api)



In the future I plan to implement things like:

  * The ability to create advanced projections like tables, color pickers, 
embedding images or text based code, etc
  * Compiling a language to another AST based language, so e.g instead of 
defining how your AST nodes are translated to WASM you could instead define how 
to translate them to the base language, and since the base language already 
compiles to WASM you wouldn't have to do that yourself.
  * Adding the possibility to not just compile to WASM but also e.g. C, llvm 
ir, or what ever else you'd want
  * Diffing based on the projections
  * Experiment with the editing, like the transformative copy-paste from Dion, 
and other things. The goal is to make editing the code at least as 
fast/convenient as text based languages, we'll what the limits are here



Smooth scrolling was a thing a while ago already, but I think I commented the 
code out because back then performance wasn't that good, but I'll add that 
again at some point

Reply via email to