clean up my debug conlang
This isn't the ideal implementation either. Pure spaghetti. But I need to clean up the debug prints to see that.
This commit is contained in:
parent
940b885be7
commit
77b464fbf0
|
@ -264,18 +264,14 @@
|
||||||
> local colidx = 0
|
> local colidx = 0
|
||||||
> local old_colidx = -1
|
> local old_colidx = -1
|
||||||
> for i=1,string.len(s) do
|
> for i=1,string.len(s) do
|
||||||
> curses.addstr('|'..i..','..colidx)
|
|
||||||
> if i == old_idx then
|
> if i == old_idx then
|
||||||
> print('col:', colidx)
|
|
||||||
> old_colidx = colidx
|
> old_colidx = colidx
|
||||||
> elseif colidx == old_colidx then -- next line
|
> elseif colidx == old_colidx then -- next line
|
||||||
> print('->', i)
|
|
||||||
> return i
|
> return i
|
||||||
> end
|
> end
|
||||||
> -- loop update
|
> -- loop update
|
||||||
> if s[i] == '\n' then
|
> if s[i] == '\n' then
|
||||||
> if old_colidx ~= -1 and old_colidx > colidx then
|
> if old_colidx ~= -1 and old_colidx > colidx then
|
||||||
> print('=>', i)
|
|
||||||
> return i
|
> return i
|
||||||
> end
|
> end
|
||||||
> colidx = 0
|
> colidx = 0
|
||||||
|
@ -284,10 +280,8 @@
|
||||||
> end
|
> end
|
||||||
> end
|
> end
|
||||||
> if old_colidx == colidx then
|
> if old_colidx == colidx then
|
||||||
> print('->', string.len(s)+1)
|
|
||||||
> return string.len(s)+1
|
> return string.len(s)+1
|
||||||
> else
|
> else
|
||||||
> print('|>', old_idx)
|
|
||||||
> return old_idx
|
> return old_idx
|
||||||
> end
|
> end
|
||||||
>end
|
>end
|
||||||
|
|
Loading…
Reference in New Issue