mirror of
https://github.com/janet-lang/janet
synced 2025-10-21 18:57:41 +00:00
@@ -440,7 +440,6 @@ static void check_specials(JanetByteView src) {
|
|||||||
check_cmatch(src, "while");
|
check_cmatch(src, "while");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO - check against special forms and print in alphabetical order */
|
|
||||||
static void kshowcomp(void) {
|
static void kshowcomp(void) {
|
||||||
JanetTable *env = gbl_complete_env;
|
JanetTable *env = gbl_complete_env;
|
||||||
if (env == NULL) {
|
if (env == NULL) {
|
||||||
@@ -449,6 +448,10 @@ static void kshowcomp(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Advance while on symbol char */
|
||||||
|
while (is_symbol_char_gen(gbl_buf[gbl_pos]))
|
||||||
|
gbl_pos++;
|
||||||
|
|
||||||
JanetByteView prefix = get_symprefix();
|
JanetByteView prefix = get_symprefix();
|
||||||
if (prefix.len == 0) return;
|
if (prefix.len == 0) return;
|
||||||
|
|
||||||
@@ -471,6 +474,8 @@ static void kshowcomp(void) {
|
|||||||
insert(lcp.bytes[i], 0);
|
insert(lcp.bytes[i], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prefix.len != lcp.len) return;
|
||||||
|
|
||||||
int32_t maxlen = 0;
|
int32_t maxlen = 0;
|
||||||
for (int i = 0; i < gbl_match_count; i++)
|
for (int i = 0; i < gbl_match_count; i++)
|
||||||
if (gbl_matches[i].len > maxlen)
|
if (gbl_matches[i].len > maxlen)
|
||||||
|
Reference in New Issue
Block a user