Merge lines.love
[?]
Nov 12, 2022, 2:06 AM
VO2ZVTWKGVKKIU6IM2SKMYKLK4FKR2VYJYMYP5TEAFGMS7TKEDIQCDependencies
- [2]
2CTN2IEFMerge lines.love - [3]
DW6SNODMsource editing: highlight [[ ]] comments/strings - [4]
OGUV4HSAremove some memory leaks from rendered fragments - [5]
MD3W5IRAnew fork: rip out drawing support - [6]
VP5KC4XZMerge lines.love - [7]
T4FRZSYLdelete an ancient, unused file - [8]
D4B52CQ2Merge lines.love - [9]
ETXNVRPTMerge lines.love - [10]
TLOAPLBJadd a license - [11]
3QNOKBFMbeginnings of a test harness - [12]
JOPVPUSAediting source code from within the app - [13]
VHUNJHXBMerge lines.love - [14]
TVCPXAAUrename - [15]
LXTTOB33extract a couple of files - [16]
FS2ITYYHrecord a known issue - [17]
32V6ZHQBMerge lines.love - [18]
BULPIBEGbeginnings of a module for the text editor - [19]
4YDBYBA4clean up memory leak experiments - [20]
2L5MEZV3experiment: new edit namespace - [21]
RSZD5A7Gforgot to add json.lua - [22]
KMSL74GAsupport selections in the source editor - [23]
6LJZN727handle chords - [24]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [25]
RPGTBMMMMerge lines.love - [26]
D2GCFTTTclean up repl functionality - [27]
GUOQRUL7Merge lines.love - [28]
AVTNUQYRbasic test-enabled framework - [29]
KKMFQDR4editing source code from within the app - [30]
VBU5YHLRMerge lines.love - [31]
R5QXEHUIsomebody stop me - [32]
3PSFWAILMerge lines.love - [33]
73OCE2MCafter much struggle, a brute-force undo - [34]
CE4LZV4Tdrop last couple of manual tests - [35]
BLWAYPKVextract a module - [36]
OTIBCAUJlove2d scaffold - [37]
XX7G2FFJintermingle freehand line drawings with text - [38]
K2X6G75Zstart writing some tests for drawings - [39]
VXORMHMEdelete experimental REPL - [40]
66X36NZNa little more prose describing manual_tests - [41]
VHQCNMARseveral more modules - [42]
ATQO62TFMerge lines.love
Change contents
- file deletion: colorize.lua colorize.lua
if edge.suffix and rfind(frag, edge.suffix, nil, --[[plain]] true) == #frag - #edge.suffix + 1 thenCurrent_state = edge.targetbreakendendendfunction trim(s)return s:gsub('^%s+', ''):gsub('%s+$', '')endfunction ltrim(s)return s:gsub('^%s+', '')endfunction rtrim(s)return s:gsub('%s+$', '')enddstring=String_color,block_string=String_color,block_comment=Comment_color,}Current_state = 'normal'function initialize_color()--? print('new line')Current_state = 'normal'endfunction select_color(frag)--? print('before', '^'..frag..'$', Current_state)switch_color_based_on_prefix(frag)--? print('using color', Current_state, Colors[Current_state])App.color(Colors[Current_state])switch_color_based_on_suffix(frag)--? print('state after suffix', Current_state)endfunction switch_color_based_on_prefix(frag)if Next_state[Current_state] == nil thenreturnendfrag = rtrim(frag)for _,edge in pairs(Next_state[Current_state]) doif edge.prefix and find(frag, edge.prefix, nil, --[[plain]] true) == 1 thenCurrent_state = edge.targetbreakendendendfunction switch_color_based_on_suffix(frag)if Next_state[Current_state] == nil thenreturnendfrag = rtrim(frag)for _,edge in pairs(Next_state[Current_state]) docomment=Comment_color,sstring=String_color,Comment_color = {r=0, g=0, b=1}String_color = {r=0, g=0.5, b=0.5}Divider_color = {r=0.7, g=0.7, b=0.7}Colors = {normal=Text_color,block_string={{suffix=']]', target='normal'},},block_comment={{suffix=']]', target='normal'},},-- comments are a sink}{prefix='[[', target='block_string'}, -- only single line for now},dstring={{suffix='"', target='normal'},},sstring={{suffix="'", target='normal'},},{prefix='--[[', target='block_comment'}, -- only single-line for now{prefix='--', target='comment'},{prefix='"', target='dstring'},{prefix="'", target='sstring'}, - edit in colorize.lua at line 7
{prefix='--[[', target='block_comment'}, -- only single-line for now - edit in colorize.lua at line 11
{prefix='[[', target='block_string'}, -- only single line for now - edit in colorize.lua at line 19
block_string={{suffix=']]', target='normal'},},block_comment={{suffix=']]', target='normal'},}, - replacement in colorize.lua at line 28
Comments_color = {r=0, g=0, b=1}Comment_color = {r=0, g=0, b=1} - replacement in colorize.lua at line 34
comment=Comments_color,comment=Comment_color, - replacement in colorize.lua at line 36
dstring=String_colordstring=String_color,block_string=String_color,block_comment=Comment_color, - replacement in colorize.lua at line 76
if edge.suffix and rfind(frag, edge.suffix, nil, --[[plain]] true) == #frag thenif edge.suffix and rfind(frag, edge.suffix, nil, --[[plain]] true) == #frag - #edge.suffix + 1 then