Improved #export/#import Behavior
Pre-release
Pre-release
This update provides significantly improved resolution of #export/#import.
API Changes
The unbodied usage of #export("exportkey", value)
now supports any acceptable single parameter as the exported value. Example uses:
// Exports context variable
#export("isAdmin", admin)
// Exports an expression
#export("specialKey", username == "tdotclare")
// Exports a custom tag call
#export("baseURL", baseURL())
#import
can now be used inside parameters, allowing behavior like:
#if(import("showSidebar")): <div id="sidebar"><div> #endif
Observable Behavior Changes/Fixes
- Fixes Issue #57 -
#import
syntaxes are now correctly replaced when nested inside other objects like loops
Internal Changes
Syntax.Conditional
is now a chained-block struct instead of linked classes- Adds
BodiedSyntax
protocol to applicableSyntax
es, replacing monolithic extensions- Publish & maintain external or import dependency sets for adherants
- Provide
inlineRefs
methods to adherents to self-rebuild
- Smarter
LeafAST
resolution - Provides applicable
import
capabilities to ParameterDescription and Parameter