Skip to content

Conversation

@Frityet
Copy link
Collaborator

@Frityet Frityet commented Nov 24, 2025

This PR implements macro support for Teal.

Project Proposal

@hishamhm
Copy link
Member

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

@Frityet
Copy link
Collaborator Author

Frityet commented Nov 24, 2025

@hishamhm done 😄 👍

@Frityet
Copy link
Collaborator Author

Frityet commented Nov 25, 2025

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
Copy link
Collaborator Author

Frityet commented Nov 25, 2025

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
Copy link
Collaborator Author

Frityet commented Nov 28, 2025

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

@teal-language teal-language deleted a comment from github-actions bot Jan 9, 2026
@Frityet Frityet requested a review from hishamhm January 9, 2026 01:58
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.

2 participants