Skip to content

Choreograph v0.2: TokenProxy, LINQ arrays, dogfooded registrations#2249

Open
KenanMillet wants to merge 15 commits into
Roll20:masterfrom
KenanMillet:Choreograph
Open

Choreograph v0.2: TokenProxy, LINQ arrays, dogfooded registrations#2249
KenanMillet wants to merge 15 commits into
Roll20:masterfrom
KenanMillet:Choreograph

Conversation

@KenanMillet

Copy link
Copy Markdown
Contributor

Summary

Expression system overhaul with rich token objects, LINQ-inspired array methods, and fully self-hosted function/constant registrations.

Changes (v0.1 → v0.2)

  • TokenProxy — tokens in scope are rich proxy objects (token.left, token.name, token.pageid). Token parameters auto-resolve to proxies (orig.left). Extension namespaces as sub-objects
    (token.anchor.isAnchored). Eager/lazy/computed evaluation modes.
  • LINQ array methods.from(), .without(), .where(), .select(), .orderBy(), .first(), .last(), .any(), .count(), .ids() on arrays.
  • Dogfooded registrations — all built-in functions and constants registered through the same registerFunction/registerConstant API extensions use.
  • Namespace dot-notation — extension registrations use namespace.name not namespace_name.
  • Auto-wrap — functions declaring returns: 'token'/'token[]' auto-wrap results with TokenProxy.
  • Backward compattokenId, tokenName, pageId, flat left/top still work.

Backward Compatibility

No breaking changes. Old syntax still works alongside new token.X syntax.

…gistrations (foundation for rich token objects)
…, token.name, token.left, token.top, token.pageid)
…TokenProxy, LINQ, evaluation modes, auto-wrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant