We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The file the compiler was invoked upon (known as the invocation file) has no mangle prefix for it's top level entities
Every other file is mangled with it's path relative to the invocation file. eg: main.kai (invocation file)
main.kai
#import "math.kai" // mangled: `main` main :: fn() -> void {...}
math.kai
mangled: `math.lerp` lerp :: fn() -> void {...}
Function scopes only mangle compile time entities and anonymous functions. eg:
main :: fn() -> void { // mangled name = `main.map` sort :: fn(in: []int, predicate: (int, int) -> bool) -> void { ... } // param #2's anon func would mangle too `.fn` (prefix is ditched) sort(myArray, fn(x, y: int) -> bool { ... }) }
Type Scopes mangle their entities using the current scope prefix + the name of the type. eg:
Person :: struct { firstName, lastName: string // mangled name = `Person.new` new :: fn(first, last: string) -> void { ... } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
File mangling
Every other file is mangled with it's path relative to the invocation file.
eg:
main.kai
(invocation file)math.kai
Function Scopes
Function scopes only mangle compile time entities and anonymous functions.
eg:
Type Scopes
Type Scopes mangle their entities using the current scope prefix + the name of the type.
eg:
The text was updated successfully, but these errors were encountered: