You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AstBodybody; // empty body means declaration, otherwise it's definition
};
This is not a good idea. Maybe it was at some point, but now I only see this as a source of bugs.
Instead, declare and def statements should be separated clearly, e.g. AST_DECLARE_FUNC (declare statement) and AST_DEFINE_FUNC (def statement). The AstFunction struct would be renamed to something like AstFunctionDef and it would only be used for def. A declare can simply use an AstSignature.
The text was updated successfully, but these errors were encountered:
In the Jou compiler, an
AstStatement
with kind set toAST_STMT_FUNCTION
works like this:jou/src/jou_compiler.h
Lines 278 to 281 in 6171948
This is not a good idea. Maybe it was at some point, but now I only see this as a source of bugs.
Instead,
declare
anddef
statements should be separated clearly, e.g.AST_DECLARE_FUNC
(declare
statement) andAST_DEFINE_FUNC
(def
statement). TheAstFunction
struct would be renamed to something likeAstFunctionDef
and it would only be used fordef
. Adeclare
can simply use anAstSignature
.The text was updated successfully, but these errors were encountered: