From 00420215b342d26f45de9d2a9cb4f438a359f5b5 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Mon, 24 Aug 2026 11:15:49 +0800 Subject: [PATCH] feat(compiler): add native class support with export annotations - Introduce LibraryExportedNative class with #[Native] attribute - Add LibraryHiddenNative class with #[NoExport] and #[Native] attributes - Create stub file for native class definitions - Implement StubNativePoint class with native annotation and basic properties - Add length method to StubNativePoint for geometric calculations - Enable compiler support for native class annotations --- .../code/compiler_api/library_exported_native.php | 7 +++++++ phpunit/code/compiler_api/library_hidden_native.php | 13 +++++++++++++ phpunit/code/native-class-stub.stub.php | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 phpunit/code/compiler_api/library_exported_native.php create mode 100644 phpunit/code/compiler_api/library_hidden_native.php create mode 100644 phpunit/code/native-class-stub.stub.php diff --git a/phpunit/code/compiler_api/library_exported_native.php b/phpunit/code/compiler_api/library_exported_native.php new file mode 100644 index 00000000..92406275 --- /dev/null +++ b/phpunit/code/compiler_api/library_exported_native.php @@ -0,0 +1,7 @@ +