tl icon indicating copy to clipboard operation
tl copied to clipboard

GSoC 2025 - Macro support for teal

Open Frityet opened this issue 3 months ago • 6 comments

This PR implements macro support for Teal.

Project Proposal

Frityet avatar Nov 24 '25 04:11 Frityet

Teal Playground URL: https://1051--teal-playground-preview.netlify.app

github-actions[bot] avatar Nov 24 '25 04:11 github-actions[bot]

@Frityet CI is red (PUC-Rio Lua 5.1 does not support goto)

hishamhm avatar Nov 24 '25 13:11 hishamhm

@hishamhm done 😄 👍

Frityet avatar Nov 24 '25 14:11 Frityet

seems like nodes made with block() aren't properly showing up in generated lua? investigating...

local macro test!(): Expression
    local s = block("string")
    s.conststr = "hello"
    return s
end

local x = test!()

Frityet avatar Nov 25 '25 12:11 Frityet

seems like nodes made with block() aren't properly showing up in generated lua? investigating...

local macro test!(): Expression
    local s = block("string")
    s.conststr = "hello"
    return s
end

local x = test!()

nevermind, this is intentional, its cause I didn't put in tk... @hishamhm should we make it so if its a block that depends on tk, such as string or integer that it should error?

Frityet avatar Nov 25 '25 15:11 Frityet

seems like nodes made with block() aren't properly showing up in generated lua? investigating...

local macro test!(): Expression

local s = block("string")
s.conststr = "hello"
return s

end

local x = test!()

nevermind, this is intentional, its cause I didn't put in tk... @hishamhm should we make it so if its a block that depends on tk, such as string or integer that it should error?

Actually I think a better solution is to just put conststr and constnum as blocks and make the parser read from the block

Frityet avatar Nov 28 '25 13:11 Frityet