Something went wrong. Try again.
🌱 A minimal programming language and compiler. git.urbach.dev/cli/q
high-performance programming-language compiler
Something went wrong. Try again.
1234567891011121314151617181920212223package core
// ReceiveFunction receives a function from the scanner.func (env *Environment) ReceiveFunction(f *Function) { f.Env = env f.CPU = env.Build.CPU() pkg := env.AddPackage(f.Package(), f.IsExtern()) env.NumFunctions++
existing := pkg.Functions[f.Name()]
if existing == nil { pkg.Functions[f.Name()] = f return }
for existing.Next != nil { existing = existing.Next }
existing.Next = f f.Previous = existing}