Skip to content

How does this work #167

Closed Answered by ShenQingchuan
lorypelli asked this question in Q&A
Nov 23, 2024 · 3 comments · 7 replies
Discussion options

You must be logged in to vote

Yes, there's no actual implementation of this "function vine".

The basic mentality here is to "borrow a form in valid syntax, and handle its AST representation, transform to what you want".

That's a mechanism we called "Macros", it only runs at compile time, and may totally change what you saw in source code.

If you really want to know how this compilation magic works, you can check src/analyze.ts, template/compose.ts, and src/transform.ts under packages/compiler.

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@ShenQingchuan
Comment options

Answer selected by ShenQingchuan
@ShenQingchuan
Comment options

@lorypelli
Comment options

@lorypelli
Comment options

@ShenQingchuan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #166 on November 24, 2024 00:21.