pike.git
/
src
/
lex.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/lex.c:304:
}else{ sprintf(buf, "Call efun %d", n - F_MAX_OPCODE); return buf; } }else{ sprintf(buf, "<OTHER %d>", n); return buf; } }
+
char *get_token_name(int n)
+
{
+
static char buf[30];
+
if (n<F_MAX_INSTR && instrs[n-F_OFFSET].name)
+
{
+
return instrs[n-F_OFFSET].name;
+
}else{
+
sprintf(buf, "<OTHER %d>", n);
+
return buf;
+
}
+
}
+
/* foo must be a shared string */ static int lookup_resword(struct lpc_string *s) { struct hash_entry *h; h=hash_lookup(reswords, s); if(!h) return -1; return BASEOF(h, reserved, link)->token; }