feat: add stdlib IO and extern function support
- Add stdlib/io.c with PrintLine, Print, PrintInt, PrintFloat, PrintBool, ReadLine - Support extern function declarations (functions without body) - Generate C forward declarations for extern functions - Map Bux type names (String, int, etc.) to C types in codegen - Update build system to copy all stdlib files - Hello World example works: prints 'Hello, Bux!'
This commit is contained in:
@@ -126,6 +126,7 @@ type
|
||||
|
||||
HirModule* = object
|
||||
funcs*: seq[HirFunc]
|
||||
externFuncs*: seq[HirFunc] # Functions declared with extern (no body)
|
||||
structs*: seq[tuple[name: string, fields: seq[tuple[name: string, typ: Type]]]]
|
||||
enums*: seq[tuple[name: string, variants: seq[string]]]
|
||||
consts*: seq[tuple[name: string, typ: Type, value: HirNode]]
|
||||
|
||||
Reference in New Issue
Block a user