Skip to content

Implement function-level generics in parser/AST#81

Closed
LqauzDev wants to merge 7 commits intoOttrlang:mainfrom
LqauzDev:main
Closed

Implement function-level generics in parser/AST#81
LqauzDev wants to merge 7 commits intoOttrlang:mainfrom
LqauzDev:main

Conversation

@LqauzDev
Copy link
Contributor

Summary
This adds parsing and AST support for function generics (fn name<T, U>(...)), includes a small runnable example, and updates docs to present generics as a shipped language feature. It’s the parser/AST and docs half of the work; typechecking and codegen follow-ups are tracked separately.

Files changed

nodes.rs

grammar.rs
examples/generics.ot
TUTORIALS.md
EXAMPLES.md
FFI_GUIDE.md
ROADMAP.md
LANGUAGE_SPEC.md

Parser accepts optional <T, U> generic parameter lists on fn declarations.
AST node carries the generic parameter names.
Example examples/generics.ot demonstrates struct and function generics.
Docs updated to describe generics as available and to explain FFI behavior for generic instantiations.
Why
Users can now write generic functions in source and find accurate examples and docs in-tree. This is necessary before wiring up typechecker inference and codegen for generics.

Notes and constraints

Runtime and ABI unchanged. This PR is syntactic + docs.
Typechecker inference, bounds, and monomorphization are follow-up work.
If you prefer to gate the feature behind a feature flag, we can add that in a follow-up.

was tested on WSL and Windows.

This commit introduces support for PowerPC (32/64-bit) architecture in the BloodHorn bootloader. Key changes include:

- Added PowerPC CPU detection using PVR (Processor Version Register)
- Implemented early hardware initialization for PPC440, PPC405, and PPC460 platforms
- Added UART console support for early debugging
- Integrated PowerPC-specific initialization into the boot process
- Maintained compatibility with existing x86/ARM boot paths

The implementation provides:
- Platform detection and validation
- Basic hardware initialization
- Console output via UART
- Memory management setup
- Exception handling framework

This enables BloodHorn to run on PowerPC-based systems while preserving all existing functionality for other architectures.
@jonathanmagambo
Copy link
Collaborator

thank you so much just make sure windows cl works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants