gearsix
pushed to main at gearsix/ec
- 6a55d1892b Started Search/Substitute implementation
Squashed commit of the following:
commit ca61676229e12a02969c1b4181b1f60aabba4b39
Author: gearsix <gearsix@tuta.io>
Date: Sat Mar 23 11:45:07 2024 +0000
began implementing srchSubstitute
commit 377b80e568e788432f8de7eace11261141ff0233
Author: gearsix <gearsix@tuta.io>
Date: Sat Mar 23 11:43:22 2024 +0000
draft impl of flagTokCur
commit c099ff43e63c9c01dc3360c3ab38eb74228652b3
Author: gearsix <gearsix@tuta.io>
Date: Sun Mar 17 01:34:52 2024 +0000
finished SrchSearch tests
Turns out the srchSearch didn't work because the regexp.ReaderFindIndex
function eats bytes from the Reader after ReaderFindIndex is done,
which messed up the absolute indexes given by the function (returned
values were relative to the previous finding).
The only way to deal with this was to create a new Reader from the new
offset (the end of the previously found value) every time.
commit 0dcf32dc02ac266e8a48905bc5296c8fed81f2fe
Author: gearsix <gearsix@tuta.io>
Date: Sun Mar 17 01:31:59 2024 +0000
All File and Addr references use int64 references now (not uint64).
This was just to make it easier to work with the golang stdlib.
I would have preferred to keep uint64,
since a file index can't be less than 0.
if I change it again,
I'm making a dedicated type for the Idx.i value,
so that I can flip flop on it easier.
- Added NewAddrIndex
- (a *Addr).Stringify returns "<nil>" if a is nil
commit 262aa1c5154ed043a813f9e18aa37bd8dc3df1a5
Author: gearsix <gearsix@tuta.io>
Date: Fri Mar 15 13:21:44 2024 +0000
started working on TestSrchSearch
Also refactored TestSrchParseArg to use "type input", "type output"
style of testing (easier when working with structs).
commit 0dd93caf1a2fe6b2f70c957b024bbaae191521b3
Author: gearsix <gearsix@tuta.io>
Date: Sat Mar 9 23:41:36 2024 +0000
Further developments in srch.go
Started adding tests in srch_test.go as well
- Added errSrchNoFile
- Added SrchCmd returns
- Added argument parsing for Srch (srchParseArg)
- Added srchSearch
commit fbec2c9a59c8ae77824a38f39ea9ac499fdf4c3a
Author: gearsix <gearsix@tuta.io>
Date: Sat Mar 9 23:38:52 2024 +0000
addr updates
- (*Idx).GetFileIndex -> (*Idx).FileIndex
- (*Idx).FileIndex, AddrCur is now default index init value
- (*Idx).GetIndex -> (*Idx).line
- (*Idx).GetCol -> (*Idx).col
- Added (*Addr).Size
commit 3af2edcfe7e2b734d94d645bfe8b3d32a82783ff
Author: gearsix <gearsix@tuta.io>
Date: Fri Mar 1 15:34:55 2024 +0000
scaffolding for SrchCmd
commit d5bc43e6de5b26012a1cdb3e39aabedd009926f8
Author: gearsix <gearsix@tuta.io>
Date: Fri Mar 1 15:34:42 2024 +0000
spec: reviewed and amended ;s (search)
3 weeks ago