breck7 / scrollsdk

Build on top of Scroll.
https://sdk.scroll.pub
380 stars 17 forks source link

ScrollParsers: Move file imports upstream #106

Closed breck7 closed 2 months ago

breck7 commented 4 years ago

A potential approach is to have the parser treat files in one folder as a single file. So imports would be done via copying values into a folder (rather than pointers).

breck7 commented 3 years ago

not obviously a bad idea but more important things to do first.

breck7 commented 2 years ago

Perhaps a universal imports keyword is necessary across TN. The keyword "on" might make sense—as in "[builds] on".

On could be a simple forgiving mini lang with support for most common list types:

on scrolldown
title Hello world
on "scrolldown"
title Hello world
on https://raw.githubusercontent.com/breck7/scroll/main/scrolldown.grammar
title Hello world
on "https://raw.githubusercontent.com/breck7/scroll/main/scrolldown.grammar"
title Hello world
on "./scrolldown"
title Hello world
on scroll
on ./breck.grammar
title Hello world
on scroll ./breck.grammar
title Hello world
on scroll "./breck.grammar"
title Hello world

Advanced selective imports?

on scroll
on {interviewP} from ./breck.grammar
title Hello world
breck7 commented 1 year ago

The simple imports in Scroll seem to be working well. Perhaps could generalize that pattern, use it in grammar, and make it easy for a tree language to use them.

breck7 commented 2 months ago

We are no longer using the term "Tree Languages" and instead its all just Scroll. So closing this.