On 2025-03-29 11:22, Mohammad Hossein Bateni wrote:
\starttext
\def\A{a}
%\def\A{b}
\ctxlua{LuaA("\doifelse{\A}{a}{ey}{bee}")}
\stoptext


This works:

\starttext
\def\A{a}
\def\A{b}
\cldcontext{"\\doifelse{\\A}{a}{ey}{bee}"}
\stoptext

as does this:

\starttext
\def\A{a}
\def\A{b}
\ctxlua{context("\\doifelse{\\A}{a}{ey}{bee}")}
\stoptext

--
Rik