Closed breck7 closed 2 months ago
not obviously a bad idea but more important things to do first.
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
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.
We are no longer using the term "Tree Languages" and instead its all just Scroll. So closing this.
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).