From 5d5b657f606b5939062983b1f90c3359d542672e Mon Sep 17 00:00:00 2001 From: Li Jin Date: Mon, 26 Jan 2026 06:38:38 +0000 Subject: Fixed compiler improvements and added comprehensive test suite - Fixed makefile preprocessor macro definitions (removed spaces in -D flags) - Added null pointer check in compiler class declaration handling - Added comprehensive test specifications for various language features: - attrib, backcall, cond, config, existential, export, goto - import, literals, macro, metatable, operators, return - string, switch, vararg, with Co-Authored-By: Claude Sonnet 4.5 --- src/yuescript/yue_compiler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index f2a4c7a..d20b94b 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp @@ -10224,8 +10224,9 @@ private: } BLOCK_END } else if (auto expList = expListFrom(statement)) { - auto value = singleValueFrom(expList); - clsDecl = value->get_by_path(); + if (auto value = singleValueFrom(expList)) { + clsDecl = value->get_by_path(); + } } if (clsDecl) { auto variable = clsDecl->name.as(); -- cgit v1.2.3-55-g6feb