@shd101wyy/yo 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +17 -0
- package/README.md +80 -0
- package/out/cjs/index.cjs +51 -0
- package/out/cjs/yo-cli.cjs +2158 -0
- package/out/esm/index.mjs +51 -0
- package/out/types/src/codegen/async/runtime.d.ts +2 -0
- package/out/types/src/codegen/async/state-code-gen.d.ts +10 -0
- package/out/types/src/codegen/async/state-machine.d.ts +13 -0
- package/out/types/src/codegen/c/collection.d.ts +3 -0
- package/out/types/src/codegen/codegen-c.d.ts +12 -0
- package/out/types/src/codegen/constants.d.ts +3 -0
- package/out/types/src/codegen/expressions/array.d.ts +4 -0
- package/out/types/src/codegen/expressions/generation.d.ts +11 -0
- package/out/types/src/codegen/expressions/index.d.ts +2 -0
- package/out/types/src/codegen/functions/collection.d.ts +5 -0
- package/out/types/src/codegen/functions/context.d.ts +57 -0
- package/out/types/src/codegen/functions/generation.d.ts +25 -0
- package/out/types/src/codegen/functions/index.d.ts +2 -0
- package/out/types/src/codegen/index.d.ts +20 -0
- package/out/types/src/codegen/parallelism/runtime.d.ts +2 -0
- package/out/types/src/codegen/types/collection.d.ts +8 -0
- package/out/types/src/codegen/types/generation.d.ts +13 -0
- package/out/types/src/codegen/types/index.d.ts +2 -0
- package/out/types/src/codegen/utils/fixup.d.ts +2 -0
- package/out/types/src/codegen/utils/index.d.ts +77 -0
- package/out/types/src/codegen/values/index.d.ts +1 -0
- package/out/types/src/emitter.d.ts +11 -0
- package/out/types/src/env.d.ts +85 -0
- package/out/types/src/error.d.ts +45 -0
- package/out/types/src/evaluator/async/await-analysis-types.d.ts +23 -0
- package/out/types/src/evaluator/async/await-analysis.d.ts +5 -0
- package/out/types/src/evaluator/builtins/alignof.d.ts +8 -0
- package/out/types/src/evaluator/builtins/and_or.d.ts +8 -0
- package/out/types/src/evaluator/builtins/arc_fns.d.ts +58 -0
- package/out/types/src/evaluator/builtins/array_fns.d.ts +0 -0
- package/out/types/src/evaluator/builtins/as.d.ts +8 -0
- package/out/types/src/evaluator/builtins/async_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_assert.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_boolean_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_expect_error.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_list_fns.d.ts +33 -0
- package/out/types/src/evaluator/builtins/compt_print.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_string_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/consume.d.ts +8 -0
- package/out/types/src/evaluator/builtins/drop.d.ts +8 -0
- package/out/types/src/evaluator/builtins/dup.d.ts +8 -0
- package/out/types/src/evaluator/builtins/expr_fns.d.ts +33 -0
- package/out/types/src/evaluator/builtins/future_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/gc.d.ts +8 -0
- package/out/types/src/evaluator/builtins/gensym.d.ts +8 -0
- package/out/types/src/evaluator/builtins/impl_constraint.d.ts +8 -0
- package/out/types/src/evaluator/builtins/macro_expand.d.ts +8 -0
- package/out/types/src/evaluator/builtins/numeric_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/panic.d.ts +8 -0
- package/out/types/src/evaluator/builtins/ptr_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/quote.d.ts +13 -0
- package/out/types/src/evaluator/builtins/rc.d.ts +8 -0
- package/out/types/src/evaluator/builtins/sizeof.d.ts +8 -0
- package/out/types/src/evaluator/builtins/the.d.ts +8 -0
- package/out/types/src/evaluator/builtins/type_fns.d.ts +28 -0
- package/out/types/src/evaluator/builtins/va_start.d.ts +8 -0
- package/out/types/src/evaluator/builtins/var_fns.d.ts +18 -0
- package/out/types/src/evaluator/calls/array.d.ts +13 -0
- package/out/types/src/evaluator/calls/array_type.d.ts +11 -0
- package/out/types/src/evaluator/calls/closure_type.d.ts +11 -0
- package/out/types/src/evaluator/calls/compt_function.d.ts +19 -0
- package/out/types/src/evaluator/calls/compt_list_type.d.ts +11 -0
- package/out/types/src/evaluator/calls/function.d.ts +16 -0
- package/out/types/src/evaluator/calls/function_type.d.ts +15 -0
- package/out/types/src/evaluator/calls/helper.d.ts +42 -0
- package/out/types/src/evaluator/calls/iso.d.ts +15 -0
- package/out/types/src/evaluator/calls/module_type.d.ts +11 -0
- package/out/types/src/evaluator/calls/numeric_type.d.ts +15 -0
- package/out/types/src/evaluator/calls/pointer.d.ts +8 -0
- package/out/types/src/evaluator/calls/pointer_type.d.ts +14 -0
- package/out/types/src/evaluator/calls/type.d.ts +12 -0
- package/out/types/src/evaluator/context.d.ts +169 -0
- package/out/types/src/evaluator/exprs/_expr.d.ts +8 -0
- package/out/types/src/evaluator/exprs/assignment.d.ts +9 -0
- package/out/types/src/evaluator/exprs/begin.d.ts +10 -0
- package/out/types/src/evaluator/exprs/binding.d.ts +12 -0
- package/out/types/src/evaluator/exprs/c_include.d.ts +8 -0
- package/out/types/src/evaluator/exprs/cond.d.ts +8 -0
- package/out/types/src/evaluator/exprs/destructuring_assignment.d.ts +33 -0
- package/out/types/src/evaluator/exprs/exists.d.ts +0 -0
- package/out/types/src/evaluator/exprs/expr.d.ts +9 -0
- package/out/types/src/evaluator/exprs/extern.d.ts +8 -0
- package/out/types/src/evaluator/exprs/identifer_and_operator.d.ts +9 -0
- package/out/types/src/evaluator/exprs/import.d.ts +9 -0
- package/out/types/src/evaluator/exprs/initialization_assignment.d.ts +8 -0
- package/out/types/src/evaluator/exprs/match.d.ts +8 -0
- package/out/types/src/evaluator/exprs/open.d.ts +8 -0
- package/out/types/src/evaluator/exprs/property_access.d.ts +8 -0
- package/out/types/src/evaluator/exprs/recur.d.ts +8 -0
- package/out/types/src/evaluator/exprs/subtype_of.d.ts +21 -0
- package/out/types/src/evaluator/exprs/test.d.ts +8 -0
- package/out/types/src/evaluator/exprs/typeof.d.ts +8 -0
- package/out/types/src/evaluator/exprs/while.d.ts +8 -0
- package/out/types/src/evaluator/index.d.ts +26 -0
- package/out/types/src/evaluator/types/array.d.ts +8 -0
- package/out/types/src/evaluator/types/closure.d.ts +8 -0
- package/out/types/src/evaluator/types/compt_list.d.ts +8 -0
- package/out/types/src/evaluator/types/concrete_module.d.ts +8 -0
- package/out/types/src/evaluator/types/dyn.d.ts +8 -0
- package/out/types/src/evaluator/types/enum.d.ts +8 -0
- package/out/types/src/evaluator/types/expr_synthesizer.d.ts +14 -0
- package/out/types/src/evaluator/types/field.d.ts +14 -0
- package/out/types/src/evaluator/types/fn_module.d.ts +8 -0
- package/out/types/src/evaluator/types/function.d.ts +58 -0
- package/out/types/src/evaluator/types/future_module.d.ts +8 -0
- package/out/types/src/evaluator/types/module.d.ts +19 -0
- package/out/types/src/evaluator/types/newtype.d.ts +8 -0
- package/out/types/src/evaluator/types/object.d.ts +8 -0
- package/out/types/src/evaluator/types/proofs.d.ts +0 -0
- package/out/types/src/evaluator/types/slice.d.ts +8 -0
- package/out/types/src/evaluator/types/struct.d.ts +8 -0
- package/out/types/src/evaluator/types/synthesizer.d.ts +16 -0
- package/out/types/src/evaluator/types/tuple.d.ts +18 -0
- package/out/types/src/evaluator/types/union.d.ts +8 -0
- package/out/types/src/evaluator/types/utils.d.ts +71 -0
- package/out/types/src/evaluator/types/validation.d.ts +3 -0
- package/out/types/src/evaluator/utils/array-utils.d.ts +15 -0
- package/out/types/src/evaluator/utils/closure.d.ts +35 -0
- package/out/types/src/evaluator/utils.d.ts +4 -0
- package/out/types/src/evaluator/values/anonymous_function.d.ts +8 -0
- package/out/types/src/evaluator/values/anonymous_module.d.ts +17 -0
- package/out/types/src/evaluator/values/anonymous_struct.d.ts +8 -0
- package/out/types/src/evaluator/values/array.d.ts +8 -0
- package/out/types/src/evaluator/values/boolean.d.ts +3 -0
- package/out/types/src/evaluator/values/char.d.ts +3 -0
- package/out/types/src/evaluator/values/compt_list.d.ts +8 -0
- package/out/types/src/evaluator/values/dyn.d.ts +8 -0
- package/out/types/src/evaluator/values/float.d.ts +4 -0
- package/out/types/src/evaluator/values/integer.d.ts +4 -0
- package/out/types/src/evaluator/values/module.d.ts +58 -0
- package/out/types/src/evaluator/values/string.d.ts +3 -0
- package/out/types/src/evaluator/values/tuple.d.ts +32 -0
- package/out/types/src/expr.d.ts +456 -0
- package/out/types/src/function-value.d.ts +42 -0
- package/out/types/src/index.d.ts +4 -0
- package/out/types/src/lexer.d.ts +2 -0
- package/out/types/src/logger.d.ts +1 -0
- package/out/types/src/module-manager.d.ts +30 -0
- package/out/types/src/naming-checker.d.ts +4 -0
- package/out/types/src/parser.d.ts +33 -0
- package/out/types/src/test-runner.d.ts +30 -0
- package/out/types/src/tests/codegen.test.d.ts +1 -0
- package/out/types/src/tests/fixme.test.d.ts +1 -0
- package/out/types/src/tests/module-manager.test.d.ts +1 -0
- package/out/types/src/tests/parser.test.d.ts +1 -0
- package/out/types/src/tests/sample.test.d.ts +0 -0
- package/out/types/src/tests/std.test.d.ts +1 -0
- package/out/types/src/token.d.ts +40 -0
- package/out/types/src/type-value.d.ts +7 -0
- package/out/types/src/types/compatibility.d.ts +16 -0
- package/out/types/src/types/creators.d.ts +73 -0
- package/out/types/src/types/definitions.d.ts +218 -0
- package/out/types/src/types/guards.d.ts +70 -0
- package/out/types/src/types/hierarchy.d.ts +4 -0
- package/out/types/src/types/index.d.ts +7 -0
- package/out/types/src/types/module_field.d.ts +2 -0
- package/out/types/src/types/tags.d.ts +45 -0
- package/out/types/src/types/utils.d.ts +50 -0
- package/out/types/src/unit-value.d.ts +7 -0
- package/out/types/src/utils.d.ts +6 -0
- package/out/types/src/value-tag.d.ts +29 -0
- package/out/types/src/value.d.ts +110 -0
- package/out/types/src/yo-cli.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +57 -0
- package/scripts/check-liburing.js +76 -0
- package/std/alg/hash.yo +50 -0
- package/std/allocator.yo +113 -0
- package/std/allocators/c_allocator.yo +118 -0
- package/std/async.yo +13 -0
- package/std/collections/array_list.yo +415 -0
- package/std/collections/hash_map.yo +482 -0
- package/std/collections/hash_set.yo +706 -0
- package/std/collections/index.yo +11 -0
- package/std/collections/linked_list.yo +439 -0
- package/std/error.yo +0 -0
- package/std/gc.yo +10 -0
- package/std/index.yo +12 -0
- package/std/io/file.yo +191 -0
- package/std/io/index.yo +5 -0
- package/std/libc/assert.yo +39 -0
- package/std/libc/ctype.yo +57 -0
- package/std/libc/errno.yo +182 -0
- package/std/libc/float.yo +87 -0
- package/std/libc/index.yo +29 -0
- package/std/libc/limits.yo +65 -0
- package/std/libc/math.yo +679 -0
- package/std/libc/signal.yo +101 -0
- package/std/libc/stdatomic.yo +213 -0
- package/std/libc/stdint.yo +214 -0
- package/std/libc/stdio.yo +225 -0
- package/std/libc/stdlib.yo +204 -0
- package/std/libc/string.yo +151 -0
- package/std/libc/time.yo +92 -0
- package/std/libc/unistd.yo +130 -0
- package/std/monad.yo +152 -0
- package/std/prelude.yo +3094 -0
- package/std/string/index.yo +8 -0
- package/std/string/rune.yo +82 -0
- package/std/string/string.yo +288 -0
- package/std/sync.yo +95 -0
- package/std/thread.yo +36 -0
- package/std/time.yo +13 -0
- package/std/worker.yo +36 -0
- package/vendor/mimalloc/.gitattributes +12 -0
- package/vendor/mimalloc/CMakeLists.txt +763 -0
- package/vendor/mimalloc/LICENSE +21 -0
- package/vendor/mimalloc/SECURITY.md +41 -0
- package/vendor/mimalloc/azure-pipelines.yml +251 -0
- package/vendor/mimalloc/bin/mimalloc-redirect-arm64.dll +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect-arm64.lib +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect-arm64ec.dll +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect-arm64ec.lib +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect.dll +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect.lib +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect32.dll +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect32.lib +0 -0
- package/vendor/mimalloc/bin/minject-arm64.exe +0 -0
- package/vendor/mimalloc/bin/minject.exe +0 -0
- package/vendor/mimalloc/bin/minject32.exe +0 -0
- package/vendor/mimalloc/bin/readme.md +118 -0
- package/vendor/mimalloc/cmake/JoinPaths.cmake +23 -0
- package/vendor/mimalloc/cmake/mimalloc-config-version.cmake +19 -0
- package/vendor/mimalloc/cmake/mimalloc-config.cmake +14 -0
- package/vendor/mimalloc/contrib/docker/alpine/Dockerfile +23 -0
- package/vendor/mimalloc/contrib/docker/alpine-arm32v7/Dockerfile +28 -0
- package/vendor/mimalloc/contrib/docker/alpine-x86/Dockerfile +28 -0
- package/vendor/mimalloc/contrib/docker/manylinux-x64/Dockerfile +23 -0
- package/vendor/mimalloc/contrib/docker/readme.md +10 -0
- package/vendor/mimalloc/contrib/vcpkg/portfile.cmake +64 -0
- package/vendor/mimalloc/contrib/vcpkg/readme.md +40 -0
- package/vendor/mimalloc/contrib/vcpkg/usage +20 -0
- package/vendor/mimalloc/contrib/vcpkg/vcpkg-cmake-wrapper.cmake +20 -0
- package/vendor/mimalloc/contrib/vcpkg/vcpkg.json +48 -0
- package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg +887 -0
- package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg +1185 -0
- package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg +757 -0
- package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg +1028 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-1.svg +769 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg +868 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg +1157 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-2.svg +983 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-rss-1.svg +683 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-rss-2.svg +854 -0
- package/vendor/mimalloc/doc/bench-2020/bench-spec-rss.svg +713 -0
- package/vendor/mimalloc/doc/bench-2020/bench-spec.svg +713 -0
- package/vendor/mimalloc/doc/bench-2020/bench-z4-1.svg +890 -0
- package/vendor/mimalloc/doc/bench-2020/bench-z4-2.svg +1146 -0
- package/vendor/mimalloc/doc/bench-2020/bench-z4-rss-1.svg +796 -0
- package/vendor/mimalloc/doc/bench-2020/bench-z4-rss-2.svg +974 -0
- package/vendor/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-a.svg +952 -0
- package/vendor/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-b.svg +1255 -0
- package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg +955 -0
- package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg +1269 -0
- package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg +836 -0
- package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg +1131 -0
- package/vendor/mimalloc/doc/bench-2021/bench-macmini-2021-01-30.svg +766 -0
- package/vendor/mimalloc/doc/doxyfile +2895 -0
- package/vendor/mimalloc/doc/ds-logo.jpg +0 -0
- package/vendor/mimalloc/doc/ds-logo.png +0 -0
- package/vendor/mimalloc/doc/mimalloc-doc.h +1452 -0
- package/vendor/mimalloc/doc/mimalloc-doxygen.css +60 -0
- package/vendor/mimalloc/doc/mimalloc-logo-100.png +0 -0
- package/vendor/mimalloc/doc/mimalloc-logo.png +0 -0
- package/vendor/mimalloc/doc/mimalloc-logo.svg +161 -0
- package/vendor/mimalloc/doc/spades-logo.png +0 -0
- package/vendor/mimalloc/doc/unreal-logo.svg +43 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-lib.vcxproj +500 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-lib.vcxproj.filters +108 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj +508 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj.filters +111 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-override-test-dep.vcxproj +355 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-override-test.vcxproj +360 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-test-api.vcxproj +295 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-test-stress.vcxproj +292 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-test.vcxproj +289 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc.sln +151 -0
- package/vendor/mimalloc/include/mimalloc/atomic.h +557 -0
- package/vendor/mimalloc/include/mimalloc/internal.h +1153 -0
- package/vendor/mimalloc/include/mimalloc/prim.h +421 -0
- package/vendor/mimalloc/include/mimalloc/track.h +145 -0
- package/vendor/mimalloc/include/mimalloc/types.h +685 -0
- package/vendor/mimalloc/include/mimalloc-new-delete.h +66 -0
- package/vendor/mimalloc/include/mimalloc-override.h +68 -0
- package/vendor/mimalloc/include/mimalloc-stats.h +103 -0
- package/vendor/mimalloc/include/mimalloc.h +612 -0
- package/vendor/mimalloc/mimalloc.pc.in +11 -0
- package/vendor/mimalloc/readme.md +946 -0
- package/vendor/mimalloc/src/alloc-aligned.c +360 -0
- package/vendor/mimalloc/src/alloc-override.c +316 -0
- package/vendor/mimalloc/src/alloc-posix.c +185 -0
- package/vendor/mimalloc/src/alloc.c +692 -0
- package/vendor/mimalloc/src/arena-abandon.c +346 -0
- package/vendor/mimalloc/src/arena.c +1043 -0
- package/vendor/mimalloc/src/bitmap.c +441 -0
- package/vendor/mimalloc/src/bitmap.h +119 -0
- package/vendor/mimalloc/src/free.c +572 -0
- package/vendor/mimalloc/src/heap.c +733 -0
- package/vendor/mimalloc/src/init.c +714 -0
- package/vendor/mimalloc/src/libc.c +334 -0
- package/vendor/mimalloc/src/options.c +663 -0
- package/vendor/mimalloc/src/os.c +770 -0
- package/vendor/mimalloc/src/page-queue.c +390 -0
- package/vendor/mimalloc/src/page.c +1049 -0
- package/vendor/mimalloc/src/prim/emscripten/prim.c +249 -0
- package/vendor/mimalloc/src/prim/osx/alloc-override-zone.c +461 -0
- package/vendor/mimalloc/src/prim/osx/prim.c +9 -0
- package/vendor/mimalloc/src/prim/prim.c +76 -0
- package/vendor/mimalloc/src/prim/readme.md +9 -0
- package/vendor/mimalloc/src/prim/unix/prim.c +934 -0
- package/vendor/mimalloc/src/prim/wasi/prim.c +284 -0
- package/vendor/mimalloc/src/prim/windows/etw-mimalloc.wprp +61 -0
- package/vendor/mimalloc/src/prim/windows/etw.h +905 -0
- package/vendor/mimalloc/src/prim/windows/etw.man +0 -0
- package/vendor/mimalloc/src/prim/windows/prim.c +878 -0
- package/vendor/mimalloc/src/prim/windows/readme.md +17 -0
- package/vendor/mimalloc/src/random.c +258 -0
- package/vendor/mimalloc/src/segment-map.c +142 -0
- package/vendor/mimalloc/src/segment.c +1702 -0
- package/vendor/mimalloc/src/static.c +41 -0
- package/vendor/mimalloc/src/stats.c +635 -0
- package/vendor/mimalloc/test/CMakeLists.txt +56 -0
- package/vendor/mimalloc/test/main-override-dep.cpp +51 -0
- package/vendor/mimalloc/test/main-override-dep.h +11 -0
- package/vendor/mimalloc/test/main-override-static.c +539 -0
- package/vendor/mimalloc/test/main-override.c +36 -0
- package/vendor/mimalloc/test/main-override.cpp +497 -0
- package/vendor/mimalloc/test/main.c +46 -0
- package/vendor/mimalloc/test/readme.md +16 -0
- package/vendor/mimalloc/test/test-api-fill.c +343 -0
- package/vendor/mimalloc/test/test-api.c +466 -0
- package/vendor/mimalloc/test/test-stress.c +428 -0
- package/vendor/mimalloc/test/test-wrong.c +92 -0
- package/vendor/mimalloc/test/testhelper.h +49 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// C11 ctype.h - Character classification and conversion functions
|
|
2
|
+
// Provides functions to test and convert character types
|
|
3
|
+
|
|
4
|
+
c_include "<ctype.h>",
|
|
5
|
+
// Character classification functions
|
|
6
|
+
isalnum :
|
|
7
|
+
fn(c : int) -> int, // alphanumeric character
|
|
8
|
+
isalpha :
|
|
9
|
+
fn(c : int) -> int, // alphabetic character
|
|
10
|
+
isblank :
|
|
11
|
+
fn(c : int) -> int, // blank character (C99/C11)
|
|
12
|
+
iscntrl :
|
|
13
|
+
fn(c : int) -> int, // control character
|
|
14
|
+
isdigit :
|
|
15
|
+
fn(c : int) -> int, // decimal digit
|
|
16
|
+
isgraph :
|
|
17
|
+
fn(c : int) -> int, // graphical character
|
|
18
|
+
islower :
|
|
19
|
+
fn(c : int) -> int, // lowercase letter
|
|
20
|
+
isprint :
|
|
21
|
+
fn(c : int) -> int, // printable character
|
|
22
|
+
ispunct :
|
|
23
|
+
fn(c : int) -> int, // punctuation character
|
|
24
|
+
isspace :
|
|
25
|
+
fn(c : int) -> int, // whitespace character
|
|
26
|
+
isupper :
|
|
27
|
+
fn(c : int) -> int, // uppercase letter
|
|
28
|
+
isxdigit :
|
|
29
|
+
fn(c : int) -> int, // hexadecimal digit
|
|
30
|
+
|
|
31
|
+
// Character conversion functions
|
|
32
|
+
tolower :
|
|
33
|
+
fn(c : int) -> int, // convert to lowercase
|
|
34
|
+
toupper :
|
|
35
|
+
fn(c : int) -> int // convert to uppercase
|
|
36
|
+
;
|
|
37
|
+
|
|
38
|
+
// Export all ctype functionality
|
|
39
|
+
export
|
|
40
|
+
// Character classification
|
|
41
|
+
isalnum,
|
|
42
|
+
isalpha,
|
|
43
|
+
isblank,
|
|
44
|
+
iscntrl,
|
|
45
|
+
isdigit,
|
|
46
|
+
isgraph,
|
|
47
|
+
islower,
|
|
48
|
+
isprint,
|
|
49
|
+
ispunct,
|
|
50
|
+
isspace,
|
|
51
|
+
isupper,
|
|
52
|
+
isxdigit,
|
|
53
|
+
|
|
54
|
+
// Character conversion
|
|
55
|
+
tolower,
|
|
56
|
+
toupper
|
|
57
|
+
;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// C11 errno.h - Error handling constants and errno variable
|
|
2
|
+
// Provides standard error codes and errno global variable
|
|
3
|
+
|
|
4
|
+
c_include "<errno.h>",
|
|
5
|
+
// The errno variable - global error indicator
|
|
6
|
+
errno : *(int),
|
|
7
|
+
|
|
8
|
+
// Standard C11 error constants
|
|
9
|
+
// These are the minimum required by C11
|
|
10
|
+
EDOM : int, // Domain error (math functions)
|
|
11
|
+
EILSEQ : int, // Illegal byte sequence
|
|
12
|
+
ERANGE : int, // Result too large
|
|
13
|
+
|
|
14
|
+
// POSIX.1 error constants (widely supported)
|
|
15
|
+
E2BIG : int, // Argument list too long
|
|
16
|
+
EACCES : int, // Permission denied
|
|
17
|
+
EADDRINUSE : int, // Address in use
|
|
18
|
+
EADDRNOTAVAIL : int, // Address not available
|
|
19
|
+
EAFNOSUPPORT : int, // Address family not supported
|
|
20
|
+
EAGAIN : int, // Resource unavailable, try again
|
|
21
|
+
EALREADY : int, // Connection already in progress
|
|
22
|
+
EBADF : int, // Bad file descriptor
|
|
23
|
+
EBADMSG : int, // Bad message
|
|
24
|
+
EBUSY : int, // Device or resource busy
|
|
25
|
+
ECANCELED : int, // Operation canceled
|
|
26
|
+
ECHILD : int, // No child processes
|
|
27
|
+
ECONNABORTED : int, // Connection aborted
|
|
28
|
+
ECONNREFUSED : int, // Connection refused
|
|
29
|
+
ECONNRESET : int, // Connection reset
|
|
30
|
+
EDEADLK : int, // Resource deadlock would occur
|
|
31
|
+
EDESTADDRREQ : int, // Destination address required
|
|
32
|
+
EEXIST : int, // File exists
|
|
33
|
+
EFAULT : int, // Bad address
|
|
34
|
+
EFBIG : int, // File too large
|
|
35
|
+
EHOSTUNREACH : int, // Host is unreachable
|
|
36
|
+
EIDRM : int, // Identifier removed
|
|
37
|
+
EINPROGRESS : int, // Operation in progress
|
|
38
|
+
EINTR : int, // Interrupted function
|
|
39
|
+
EINVAL : int, // Invalid argument
|
|
40
|
+
EIO : int, // I/O error
|
|
41
|
+
EISCONN : int, // Socket is connected
|
|
42
|
+
EISDIR : int, // Is a directory
|
|
43
|
+
ELOOP : int, // Too many levels of symbolic links
|
|
44
|
+
EMFILE : int, // File descriptor value too large
|
|
45
|
+
EMLINK : int, // Too many links
|
|
46
|
+
EMSGSIZE : int, // Message too large
|
|
47
|
+
EMULTIHOP : int, // Multihop attempted
|
|
48
|
+
ENAMETOOLONG : int, // Filename too long
|
|
49
|
+
ENETDOWN : int, // Network is down
|
|
50
|
+
ENETRESET : int, // Connection aborted by network
|
|
51
|
+
ENETUNREACH : int, // Network unreachable
|
|
52
|
+
ENFILE : int, // Too many files open in system
|
|
53
|
+
ENOBUFS : int, // No buffer space available
|
|
54
|
+
ENODATA : int, // No message is available
|
|
55
|
+
ENODEV : int, // No such device
|
|
56
|
+
ENOENT : int, // No such file or directory
|
|
57
|
+
ENOEXEC : int, // Executable file format error
|
|
58
|
+
ENOLCK : int, // No locks available
|
|
59
|
+
ENOLINK : int, // Link has been severed
|
|
60
|
+
ENOMEM : int, // Not enough space
|
|
61
|
+
ENOMSG : int, // No message of the desired type
|
|
62
|
+
ENOPROTOOPT : int, // Protocol not available
|
|
63
|
+
ENOSPC : int, // No space left on device
|
|
64
|
+
ENOSR : int, // No STREAM resources
|
|
65
|
+
ENOSTR : int, // Not a STREAM
|
|
66
|
+
ENOSYS : int, // Function not supported
|
|
67
|
+
ENOTCONN : int, // The socket is not connected
|
|
68
|
+
ENOTDIR : int, // Not a directory
|
|
69
|
+
ENOTEMPTY : int, // Directory not empty
|
|
70
|
+
ENOTRECOVERABLE : int, // State not recoverable
|
|
71
|
+
ENOTSOCK : int, // Not a socket
|
|
72
|
+
ENOTSUP : int, // Not supported
|
|
73
|
+
ENOTTY : int, // Inappropriate I/O control operation
|
|
74
|
+
ENXIO : int, // No such device or address
|
|
75
|
+
EOPNOTSUPP : int, // Operation not supported on socket
|
|
76
|
+
EOVERFLOW : int, // Value too large to be stored
|
|
77
|
+
EOWNERDEAD : int, // Previous owner died
|
|
78
|
+
EPERM : int, // Operation not permitted
|
|
79
|
+
EPIPE : int, // Broken pipe
|
|
80
|
+
EPROTO : int, // Protocol error
|
|
81
|
+
EPROTONOSUPPORT : int, // Protocol not supported
|
|
82
|
+
EPROTOTYPE : int, // Protocol wrong type for socket
|
|
83
|
+
EROFS : int, // Read-only file system
|
|
84
|
+
ESPIPE : int, // Invalid seek
|
|
85
|
+
ESRCH : int, // No such process
|
|
86
|
+
ESTALE : int, // Stale file handle
|
|
87
|
+
ETIME : int, // Timer expired
|
|
88
|
+
ETIMEDOUT : int, // Connection timed out
|
|
89
|
+
ETXTBSY : int, // Text file busy
|
|
90
|
+
EWOULDBLOCK : int, // Operation would block
|
|
91
|
+
EXDEV : int // Cross-device link
|
|
92
|
+
;
|
|
93
|
+
|
|
94
|
+
// Export all errno functionality
|
|
95
|
+
export
|
|
96
|
+
// The errno variable
|
|
97
|
+
errno,
|
|
98
|
+
|
|
99
|
+
// Standard C11 errors
|
|
100
|
+
EDOM,
|
|
101
|
+
EILSEQ,
|
|
102
|
+
ERANGE,
|
|
103
|
+
|
|
104
|
+
// POSIX.1 error constants
|
|
105
|
+
E2BIG,
|
|
106
|
+
EACCES,
|
|
107
|
+
EADDRINUSE,
|
|
108
|
+
EADDRNOTAVAIL,
|
|
109
|
+
EAFNOSUPPORT,
|
|
110
|
+
EAGAIN,
|
|
111
|
+
EALREADY,
|
|
112
|
+
EBADF,
|
|
113
|
+
EBADMSG,
|
|
114
|
+
EBUSY,
|
|
115
|
+
ECANCELED,
|
|
116
|
+
ECHILD,
|
|
117
|
+
ECONNABORTED,
|
|
118
|
+
ECONNREFUSED,
|
|
119
|
+
ECONNRESET,
|
|
120
|
+
EDEADLK,
|
|
121
|
+
EDESTADDRREQ,
|
|
122
|
+
EEXIST,
|
|
123
|
+
EFAULT,
|
|
124
|
+
EFBIG,
|
|
125
|
+
EHOSTUNREACH,
|
|
126
|
+
EIDRM,
|
|
127
|
+
EINPROGRESS,
|
|
128
|
+
EINTR,
|
|
129
|
+
EINVAL,
|
|
130
|
+
EIO,
|
|
131
|
+
EISCONN,
|
|
132
|
+
EISDIR,
|
|
133
|
+
ELOOP,
|
|
134
|
+
EMFILE,
|
|
135
|
+
EMLINK,
|
|
136
|
+
EMSGSIZE,
|
|
137
|
+
EMULTIHOP,
|
|
138
|
+
ENAMETOOLONG,
|
|
139
|
+
ENETDOWN,
|
|
140
|
+
ENETRESET,
|
|
141
|
+
ENETUNREACH,
|
|
142
|
+
ENFILE,
|
|
143
|
+
ENOBUFS,
|
|
144
|
+
ENODATA,
|
|
145
|
+
ENODEV,
|
|
146
|
+
ENOENT,
|
|
147
|
+
ENOEXEC,
|
|
148
|
+
ENOLCK,
|
|
149
|
+
ENOLINK,
|
|
150
|
+
ENOMEM,
|
|
151
|
+
ENOMSG,
|
|
152
|
+
ENOPROTOOPT,
|
|
153
|
+
ENOSPC,
|
|
154
|
+
ENOSR,
|
|
155
|
+
ENOSTR,
|
|
156
|
+
ENOSYS,
|
|
157
|
+
ENOTCONN,
|
|
158
|
+
ENOTDIR,
|
|
159
|
+
ENOTEMPTY,
|
|
160
|
+
ENOTRECOVERABLE,
|
|
161
|
+
ENOTSOCK,
|
|
162
|
+
ENOTSUP,
|
|
163
|
+
ENOTTY,
|
|
164
|
+
ENXIO,
|
|
165
|
+
EOPNOTSUPP,
|
|
166
|
+
EOVERFLOW,
|
|
167
|
+
EOWNERDEAD,
|
|
168
|
+
EPERM,
|
|
169
|
+
EPIPE,
|
|
170
|
+
EPROTO,
|
|
171
|
+
EPROTONOSUPPORT,
|
|
172
|
+
EPROTOTYPE,
|
|
173
|
+
EROFS,
|
|
174
|
+
ESPIPE,
|
|
175
|
+
ESRCH,
|
|
176
|
+
ESTALE,
|
|
177
|
+
ETIME,
|
|
178
|
+
ETIMEDOUT,
|
|
179
|
+
ETXTBSY,
|
|
180
|
+
EWOULDBLOCK,
|
|
181
|
+
EXDEV
|
|
182
|
+
;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// C11 float.h - Floating-point implementation limits
|
|
2
|
+
// Provides implementation-defined limits for floating-point types
|
|
3
|
+
|
|
4
|
+
c_include "<float.h>",
|
|
5
|
+
// Floating-point model parameters
|
|
6
|
+
FLT_RADIX : int, // Radix of exponent representation (usually 2)
|
|
7
|
+
FLT_ROUNDS : int, // Floating-point rounding mode
|
|
8
|
+
FLT_EVAL_METHOD : int, // Evaluation method (C99/C11)
|
|
9
|
+
|
|
10
|
+
// Decimal precision
|
|
11
|
+
DECIMAL_DIG : int, // Decimal digits for round-trip conversion (C99/C11)
|
|
12
|
+
|
|
13
|
+
// Float (single precision) limits
|
|
14
|
+
FLT_DIG : int, // Decimal digits of precision
|
|
15
|
+
FLT_EPSILON : f32, // Smallest representable positive number x such that 1.0 + x != 1.0
|
|
16
|
+
FLT_MANT_DIG : int, // Number of base-FLT_RADIX digits in mantissa
|
|
17
|
+
FLT_MAX : f32, // Maximum representable finite value
|
|
18
|
+
FLT_MAX_10_EXP : int, // Maximum int such that 10^n is representable
|
|
19
|
+
FLT_MAX_EXP : int, // Maximum int such that FLT_RADIX^(n-1) is representable
|
|
20
|
+
FLT_MIN : f32, // Minimum normalized positive value
|
|
21
|
+
FLT_MIN_10_EXP : int, // Minimum int such that 10^n is normalized
|
|
22
|
+
FLT_MIN_EXP : int, // Minimum int such that FLT_RADIX^(n-1) is normalized
|
|
23
|
+
|
|
24
|
+
// Double (double precision) limits
|
|
25
|
+
DBL_DIG : int, // Decimal digits of precision
|
|
26
|
+
DBL_EPSILON : f64, // Smallest representable positive number x such that 1.0 + x != 1.0
|
|
27
|
+
DBL_MANT_DIG : int, // Number of base-FLT_RADIX digits in mantissa
|
|
28
|
+
DBL_MAX : f64, // Maximum representable finite value
|
|
29
|
+
DBL_MAX_10_EXP : int, // Maximum int such that 10^n is representable
|
|
30
|
+
DBL_MAX_EXP : int, // Maximum int such that FLT_RADIX^(n-1) is representable
|
|
31
|
+
DBL_MIN : f64, // Minimum normalized positive value
|
|
32
|
+
DBL_MIN_10_EXP : int, // Minimum int such that 10^n is normalized
|
|
33
|
+
DBL_MIN_EXP : int, // Minimum int such that FLT_RADIX^(n-1) is normalized
|
|
34
|
+
|
|
35
|
+
// Long double (extended precision) limits
|
|
36
|
+
LDBL_DIG : int, // Decimal digits of precision
|
|
37
|
+
LDBL_EPSILON : longdouble, // Smallest representable positive number x such that 1.0 + x != 1.0
|
|
38
|
+
LDBL_MANT_DIG : int, // Number of base-FLT_RADIX digits in mantissa
|
|
39
|
+
LDBL_MAX : longdouble, // Maximum representable finite value
|
|
40
|
+
LDBL_MAX_10_EXP : int, // Maximum int such that 10^n is representable
|
|
41
|
+
LDBL_MAX_EXP : int, // Maximum int such that FLT_RADIX^(n-1) is representable
|
|
42
|
+
LDBL_MIN : longdouble, // Minimum normalized positive value
|
|
43
|
+
LDBL_MIN_10_EXP : int, // Minimum int such that 10^n is normalized
|
|
44
|
+
LDBL_MIN_EXP : int // Minimum int such that FLT_RADIX^(n-1) is normalized
|
|
45
|
+
;
|
|
46
|
+
|
|
47
|
+
// Export all float limits
|
|
48
|
+
export
|
|
49
|
+
// General parameters
|
|
50
|
+
FLT_RADIX,
|
|
51
|
+
FLT_ROUNDS,
|
|
52
|
+
FLT_EVAL_METHOD,
|
|
53
|
+
DECIMAL_DIG,
|
|
54
|
+
|
|
55
|
+
// Float limits
|
|
56
|
+
FLT_DIG,
|
|
57
|
+
FLT_EPSILON,
|
|
58
|
+
FLT_MANT_DIG,
|
|
59
|
+
FLT_MAX,
|
|
60
|
+
FLT_MAX_10_EXP,
|
|
61
|
+
FLT_MAX_EXP,
|
|
62
|
+
FLT_MIN,
|
|
63
|
+
FLT_MIN_10_EXP,
|
|
64
|
+
FLT_MIN_EXP,
|
|
65
|
+
|
|
66
|
+
// Double limits
|
|
67
|
+
DBL_DIG,
|
|
68
|
+
DBL_EPSILON,
|
|
69
|
+
DBL_MANT_DIG,
|
|
70
|
+
DBL_MAX,
|
|
71
|
+
DBL_MAX_10_EXP,
|
|
72
|
+
DBL_MAX_EXP,
|
|
73
|
+
DBL_MIN,
|
|
74
|
+
DBL_MIN_10_EXP,
|
|
75
|
+
DBL_MIN_EXP,
|
|
76
|
+
|
|
77
|
+
// Long double limits
|
|
78
|
+
LDBL_DIG,
|
|
79
|
+
LDBL_EPSILON,
|
|
80
|
+
LDBL_MANT_DIG,
|
|
81
|
+
LDBL_MAX,
|
|
82
|
+
LDBL_MAX_10_EXP,
|
|
83
|
+
LDBL_MAX_EXP,
|
|
84
|
+
LDBL_MIN,
|
|
85
|
+
LDBL_MIN_10_EXP,
|
|
86
|
+
LDBL_MIN_EXP
|
|
87
|
+
;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
_stdio :: import "./stdio.yo";
|
|
2
|
+
_math :: import "./math.yo";
|
|
3
|
+
_string :: import "./string.yo";
|
|
4
|
+
_stdlib :: import "./stdlib.yo";
|
|
5
|
+
_stdint :: import "./stdint.yo";
|
|
6
|
+
_time :: import "./time.yo";
|
|
7
|
+
_errno :: import "./errno.yo";
|
|
8
|
+
_limits :: import "./limits.yo";
|
|
9
|
+
_assert :: import "./assert.yo";
|
|
10
|
+
_ctype :: import "./ctype.yo";
|
|
11
|
+
_signal :: import "./signal.yo";
|
|
12
|
+
_float :: import "./float.yo";
|
|
13
|
+
_stdatomic :: import "./stdatomic.yo";
|
|
14
|
+
|
|
15
|
+
export
|
|
16
|
+
...(_stdio),
|
|
17
|
+
...(_math),
|
|
18
|
+
...(_string),
|
|
19
|
+
...(_stdlib),
|
|
20
|
+
...(_stdint),
|
|
21
|
+
...(_time),
|
|
22
|
+
...(_errno),
|
|
23
|
+
...(_limits),
|
|
24
|
+
...(_assert),
|
|
25
|
+
...(_ctype),
|
|
26
|
+
...(_signal),
|
|
27
|
+
...(_float),
|
|
28
|
+
...(_stdatomic)
|
|
29
|
+
;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// C11 limits.h - Implementation-defined limits for integer types
|
|
2
|
+
// Provides minimum and maximum values for various integer types
|
|
3
|
+
|
|
4
|
+
c_include "<limits.h>",
|
|
5
|
+
// Character limits
|
|
6
|
+
CHAR_BIT : int, // Number of bits in a char (at least 8)
|
|
7
|
+
SCHAR_MIN : char, // Minimum value for signed char
|
|
8
|
+
SCHAR_MAX : char, // Maximum value for signed char
|
|
9
|
+
UCHAR_MAX : char, // Maximum value for unsigned char
|
|
10
|
+
CHAR_MIN : char, // Minimum value for char (depends on signedness)
|
|
11
|
+
CHAR_MAX : char, // Maximum value for char (depends on signedness)
|
|
12
|
+
MB_LEN_MAX : int, // Maximum bytes in a multibyte character
|
|
13
|
+
|
|
14
|
+
// Short integer limits
|
|
15
|
+
SHRT_MIN : short, // Minimum value for short
|
|
16
|
+
SHRT_MAX : short, // Maximum value for short
|
|
17
|
+
USHRT_MAX : ushort, // Maximum value for unsigned short
|
|
18
|
+
|
|
19
|
+
// Integer limits
|
|
20
|
+
INT_MIN : int, // Minimum value for int
|
|
21
|
+
INT_MAX : int, // Maximum value for int
|
|
22
|
+
UINT_MAX : uint, // Maximum value for unsigned int
|
|
23
|
+
|
|
24
|
+
// Long integer limits
|
|
25
|
+
LONG_MIN : long, // Minimum value for long
|
|
26
|
+
LONG_MAX : long, // Maximum value for long
|
|
27
|
+
ULONG_MAX : ulong, // Maximum value for unsigned long
|
|
28
|
+
|
|
29
|
+
// Long long integer limits (C99/C11)
|
|
30
|
+
LLONG_MIN : longlong, // Minimum value for long long
|
|
31
|
+
LLONG_MAX : longlong, // Maximum value for long long
|
|
32
|
+
ULLONG_MAX : ulonglong // Maximum value for unsigned long long
|
|
33
|
+
;
|
|
34
|
+
|
|
35
|
+
// Export all limits
|
|
36
|
+
export
|
|
37
|
+
// Character limits
|
|
38
|
+
CHAR_BIT,
|
|
39
|
+
SCHAR_MIN,
|
|
40
|
+
SCHAR_MAX,
|
|
41
|
+
UCHAR_MAX,
|
|
42
|
+
CHAR_MIN,
|
|
43
|
+
CHAR_MAX,
|
|
44
|
+
MB_LEN_MAX,
|
|
45
|
+
|
|
46
|
+
// Short integer limits
|
|
47
|
+
SHRT_MIN,
|
|
48
|
+
SHRT_MAX,
|
|
49
|
+
USHRT_MAX,
|
|
50
|
+
|
|
51
|
+
// Integer limits
|
|
52
|
+
INT_MIN,
|
|
53
|
+
INT_MAX,
|
|
54
|
+
UINT_MAX,
|
|
55
|
+
|
|
56
|
+
// Long integer limits
|
|
57
|
+
LONG_MIN,
|
|
58
|
+
LONG_MAX,
|
|
59
|
+
ULONG_MAX,
|
|
60
|
+
|
|
61
|
+
// Long long integer limits
|
|
62
|
+
LLONG_MIN,
|
|
63
|
+
LLONG_MAX,
|
|
64
|
+
ULLONG_MAX
|
|
65
|
+
;
|