diff options
| author | Li Jin <dragon-fly@qq.com> | 2026-01-26 06:38:38 +0000 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-01-26 06:38:38 +0000 |
| commit | 5d5b657f606b5939062983b1f90c3359d542672e (patch) | |
| tree | 32132fd8908d6a8920d59362c572815a949f1a1f /src | |
| parent | f5006f449a7be1a2f655f1b178ecf1d2f0569dd5 (diff) | |
| download | yuescript-5d5b657f606b5939062983b1f90c3359d542672e.tar.gz yuescript-5d5b657f606b5939062983b1f90c3359d542672e.tar.bz2 yuescript-5d5b657f606b5939062983b1f90c3359d542672e.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuescript/yue_compiler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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: | |||
| 10224 | } | 10224 | } |
| 10225 | BLOCK_END | 10225 | BLOCK_END |
| 10226 | } else if (auto expList = expListFrom(statement)) { | 10226 | } else if (auto expList = expListFrom(statement)) { |
| 10227 | auto value = singleValueFrom(expList); | 10227 | if (auto value = singleValueFrom(expList)) { |
| 10228 | clsDecl = value->get_by_path<SimpleValue_t, ClassDecl_t>(); | 10228 | clsDecl = value->get_by_path<SimpleValue_t, ClassDecl_t>(); |
| 10229 | } | ||
| 10229 | } | 10230 | } |
| 10230 | if (clsDecl) { | 10231 | if (clsDecl) { |
| 10231 | auto variable = clsDecl->name.as<Variable_t>(); | 10232 | auto variable = clsDecl->name.as<Variable_t>(); |
