-Subproject commit ebe247e43e6e2cddb6fc46ad63843405b3006bcb
+Subproject commit 595dd5edbd94984c3b2eebc352d38476472f1a93
static const char usage[] =
"usage: Gwion <options>\n"
-"\t-h\t : this help\n"
-"\t-k\t : show compilation flags\n"
-"\t-c\t <file> : load config\n"
-"\t-p\t <path> : add a plugin directory\n"
-"\t-s\t <number> : set samplerate\n"
-"\t-i\t <number> : set input channel number\n"
-"\t-o\t <number> : set output channel number\n"
-"\t-d\t <number> : set driver (and arguments)\n"
-"\t-z\t <number> : set memoization limit\n"
-"\t-m\t <mod:args> : load module (and arguments)\n";
+" -h : this help\n"
+" -k : show compilation flags\n"
+" -c <file> : load config\n"
+" -p <path> : add a plugin directory\n"
+" -s <number> : set samplerate\n"
+" -i <number> : set input channel number\n"
+" -o <number> : set output channel number\n"
+" -d <number> : set driver (and arguments)\n"
+" -z <number> : set memoization limit\n"
+" -m <mod:args> : load module (and arguments)\n";
ANN static void config_parse(Arg* arg, const m_str name);
} while((e = e->next));
if(emit_exp(emit, exp, 0) < 0) {
free_vector(emit->gwion->mp, v);
- ERR_B(exp->pos, "\t... in 'gack' expression.")
+ ERR_B(exp->pos, " ... in 'gack' expression.")
}
const Instr instr = emit_add_instr(emit, Gack);
instr->m_val = offset;
DL_Var* v = &gwi->var;
memset(v, 0, sizeof(DL_Var));
if(!(v->t.xid = str2list(gwi->gwion->env, type, &v->array_depth)))
- GWI_ERR_B("\t...\tduring var import '%s.%s'.", gwi->gwion->env->class_def->name, name)
+ GWI_ERR_B(" ... during var import '%s.%s'.", gwi->gwion->env->class_def->name, name)
v->var.xid = insert_symbol(gwi->gwion->st, name);
return GW_OK;
}
if(!(type_decl = str2decl(env, arg->type, &array_depth))) {
if(arg_list)
free_arg_list(env->gwion->mp, arg_list);
- GWI_ERR_O("\t...\tat argument '%i'", i + 1)
+ GWI_ERR_O(" ... at argument '%i'", i + 1)
}
if((type_path2 = str2list(env, arg->name, &array_depth2)))
free_id_list(env->gwion->mp, type_path2);
flag |= ae_flag_builtin;
Type_Decl* type_decl = import_td(gwi, dl_fun->type);
if(!type_decl)
- GWI_ERR_O("\t...\tduring @ function import '%s' (type).", dl_fun->name)
+ GWI_ERR_O(" ... during @ function import '%s' (type).", dl_fun->name)
const m_str name = dl_fun->name;
const Arg_List arg_list = make_dll_arg_list(gwi, dl_fun);
const Func_Def func_def = new_func_def(mp, new_func_base(mp, type_decl, insert_symbol(gwi->gwion->st, name), arg_list),
flag |= ae_flag_builtin;
if(!(type_path = str2list(env, dl_fun->type, &array_depth)) ||
!(type_decl = new_type_decl(env->gwion->mp, type_path, 0)))
- GWI_ERR_O("\t...\tduring fptr import '%s' (type).", dl_fun->name);
+ GWI_ERR_O(" ... during fptr import '%s' (type).", dl_fun->name);
struct Func_Base_ *base = new_func_base(env->gwion->mp, type_decl, insert_symbol(env->gwion->st, dl_fun->name), args);
return new_stmt_fptr(env->gwion->mp, base, flag);
}
const Exp_Binary* bin = (Exp_Binary*)data;
if(bin->rhs->meta != ae_meta_var)
ERR_N(exp_self(bin)->pos, "cannot assign '%s' on types '%s' and '%s'.\n"
- "\t...\t(reason: --- right-side operand is %s.)",
+ " ... (reason: --- right-side operand is %s.)",
op2str(bin->op), bin->lhs->type->name, bin->rhs->type->name,
access(bin->rhs->meta))
return bin->rhs->type;
}
ANN static void print_current_args(Exp e) {
- gw_err("and not\n\t");
+ gw_err("and not\n ");
do gw_err(" \033[32m%s\033[0m", e->type->name);
while((e = e->next) && gw_err(","));
gw_err("\n");
env_err(env, pos, "argument type(s) do not match for function. should be :");
Func up = f->e->d.func;
do {
- gw_err("(%s)\t", up->name);
+ gw_err("(%s) ", up->name);
const Arg_List e = up->def->base->args;
e ? print_arg(e) : (void)gw_err("\033[32mvoid\033[0m");
gw_err("\n");
} while((up = up->next));
- args ? print_current_args(args) : (void)gw_err("and not:\n\t\033[32mvoid\033[0m\n");
+ args ? print_current_args(args) : (void)gw_err("and not:\n \033[32mvoid\033[0m\n");
return NULL;
}
assert(exp_self(func));
ERR_O(exp_self(func)->pos,
"function is template. automatic type guess not fully implemented yet.\n"
- "\tplease provide template types. eg: '<type1, type2, ...>'")
+ " please provide template types. eg: '<type1, type2, ...>'")
}
ANN static Type check_exp_call_template(const Env env, const Exp_Call *exp) {
const m_str f_name = s_name(fdef->base->xid);
ERR_B(td_pos(fdef->base->td),
"function '%s.%s' ressembles '%s.%s' but cannot override...\n"
- "\t...(reason: '%s.%s' is declared as 'static')",
+ " ...(reason: '%s.%s' is declared as 'static')",
c_name, f_name, p_name, c_name,
GET_FLAG(fdef, static) ? c_name : p_name, f_name)
}
if(override && override->owner_class && isa(override->type, t_function) < 0)
ERR_B(fdef->pos,
"function name '%s' conflicts with previously defined value...\n"
- "\tfrom super class '%s'...",
+ " from super class '%s'...",
s_name(fdef->base->xid), override->owner_class->name)
}
if(func->value_ref->offset && (!fdef->base->tmpl || !fdef->base->tmpl->base))
do ressembles(&v, nspc, name);
while((nspc = nspc->parent));
for(m_uint i = 0; i < vector_size(&v); ++i)
- gw_err("\t(did you mean '%s'?)\n", (m_str)vector_at(&v, i));
+ gw_err(" (did you mean '%s'?)\n", (m_str)vector_at(&v, i));
vector_release(&v);
}
do ressembles(&v, t->nspc, name);
while((t = t->e->parent) && t->nspc);
for(m_uint i = 0; i < vector_size(&v); ++i)
- gw_err("\t(did you mean '%s'?)\n", (m_str)vector_at(&v, i));
+ gw_err(" (did you mean '%s'?)\n", (m_str)vector_at(&v, i));
did_you_mean_nspc(type->nspc, name);
vector_release(&v);
}
{
const m_int idx = *(m_int*)(reg + SZ_INT * instr->m_val);
if(idx < 0 || (m_uint)idx >= m_vector_size(ARRAY(a.obj))) {
- gw_err("\t... at index [%" INT_F "]\n", idx);
- gw_err("\t... at dimension [%" INT_F "]\n", instr->m_val);
+ gw_err(" ... at index [%" INT_F "]\n", idx);
+ gw_err(" ... at dimension [%" INT_F "]\n", instr->m_val);
shred->code = code;
shred->mem = mem;
exception(shred, "ArrayOutofBounds");