yangtau/hedgehog

Check the number of arguments while compiling function call

Closed this issue · 2 comments

Check the number of arguments while compiling fucntion call

// TODO: Check the number of arguments while compiling fucntion call

#include "compile.h"
#include "ast_node.h"
#include "common.h"

63505fc8e3f0bd66581ea231f0a5320877d347ca

If a function was created in runtime, it is difficult to determine its arguments. So it is better to check this while running, int another word, do it in VM. When the VM executes call, it will check if the number of arguments meets the requirements.