{deck}
version:1
card:0
size:[512,342]
name:"cohostify.deck"

{card:home}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wChAT8A/wDBAUEAnw0IAP8AGQFBAJsNEAD/ABUBAwAPARkAEwEDAJoNEwD/ABMBAwAPAQMAEwEDABMBAwCXDRgA/wARAQMADwEDABMBAwATAQMAlg0aAP8AEAEDAA8BAwATAQMAEwEDAJMNHwD/AA4BAwAPAQMAEwEDABMBAwCSDSEA/wANAQMADwEDABMBAwATAQMAkQ0iAP8ADQEDAA8BAwATAQMAEwEDAI8NJQD/AAwBAwAPAQMAEwEDABMBAwCODScA/wALAQMADwEDABMBAwATAQMAjA0pAP8ACwEDAA8BAwATAQMAEwEDAIsNKwD/AAoBAwAPAQMAEwEDABMBAwCKDSwA/wAKAQMADwEDABMBAwATAQMAiQ0tAP8ACgEDAA8BAwATAQMAEwEDAFkBAgAuDS0A/wAKAQMADwEDABMBAwATAQMAWAEFACsNLgAGAQIASAECALcBAwAPAQMAEwEDABMBAwBYAQcAKA0vAAUBBABGAQQAtgEDAA8BGQATAQMAWQEIACYNLwAFAQQARQEGALUBAwAPARkAEwEDAFkBCgAjDTAABQEEAEUBBgC1AQMADwEZABMBAwBZAQwAIA0xAAUBBABGAQUAtQEDAA8BAwATAQMAEwEDAFkBDgAeDTEABQEEAEcBBAC1AQMADwEDABMBAwATAQMAHwFKABsNMgAFAQQARwEEALUBAwAPAQMAEwEDABMBAwAZAVEAGg0xAAYBBABHAQQAtQEDAA8BAwATAQMAEwEDABgBVAAYDQwBCQ0OAQYNCAAGAQQAMAEIAAoBDgCwAQMADwEDABMBAwATAQMAGQFWABQNCwEMDQoBDA0FAAYBBAAaAQgADAELAAgBEACvAQMADwEDABMBAwATAQMAGQFXAB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/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AGE="
{widgets}
field1:{"type":"field","size":[174,15],"pos":[52,89],"locked":1,"border":0,"align":"center","value":"Paste Lil Code Here:"}
field2:{"type":"field","size":[174,15],"pos":[291,89],"locked":1,"border":0,"align":"center","value":"Obtain Eggbug-Compatible HTML Here:"}
code:{"type":"field","size":[234,224],"pos":[15,106],"script":"home.0","scrollbar":1,"style":"code"}
encoded:{"type":"field","size":[234,224],"pos":[263,106],"scrollbar":1,"style":"code"}

{script:home.0}
on change do
 encoded.text:highlight.html[code.text 1]
end
{end}

{module:highlight}
description:"convert lil source code into syntax-highlighted html"
version:1
{script}
inlines.pre:"background:#272822;color:#f8f8f2;padding:.5em;"
inlines.comment :"color:#75715e;"
inlines.string  :"color:#e6db74;"
inlines.escape  :"color:#ae81ff;"
inlines.keyword :"color:#f92672;"
inlines.verb    :"color:#66d9ef;"
inlines.call    :"color:#66d9ef;"
inlines.funcname:"color:#a6e22e;"

keywords:"|"split"while|each|send|on|if|elseif|else|end|do|with|local|select|extract|update|insert|into|from|where|by|orderby|asc|desc"
monads:"|"split"floor|cos|sin|tan|exp|ln|sqrt|unit|mag|heading|sum|prod|raze|max|min|count|first|last|keys|range|list|typeof|flip|rows|cols|table"
dyads:"|"split"split|fuse|dict|take|drop|limit|in|unless|join|cross|parse|format|like|window"
verbs:monads,dyads
escapes:"\\n","\\\"","\\\\"

# tokenize the input file into an rtext-compatible table
# this gives us several useful output options,
# and also makes it easy to coalesce adjacent runs together:

on chunk type x do
 insert text font arg with x type "" end
end

on highlight text do
 r:rtext.cat[] i:fn:0
 while i<count text
  head:i drop text
  r:r,if last comm:"#%-r\n%n" parse head # line comments
   i:i+last comm
   chunk["comment" "#%s" format first comm]
  elseif last space:"%.2r\n %n" parse head # whitespace
   i:i+last space
   chunk["" first space]
  elseif "\""~first head # multiline string literals, including backslash escapes
   i:i+1
   t:chunk["string" "\""]
   s:1 while s
    head:i drop text
    if "\""~first head
     s:0 # reached terminal "
     i:i+1
     t:t,chunk["string" "\""]
    elseif (2 take head) in escapes
     i:i+2
     t:t,chunk["escape" 2 take head]
    else
     str:"%-.2r\"\\" parse head
     if !count str s:0 end # reached eof while processing a string
     i:i+count str
     t:t,chunk["string" str]
    end
   end
  elseif last tok:"%v%n" parse head # identifiers
   i:i+last tok tok:first tok
   if     tok~"on"                fn:1 chunk["keyword"  tok]
   elseif fn                      fn:0 chunk["funcname" tok]
   elseif tok in keywords              chunk["keyword"  tok]
   elseif tok in verbs                 chunk["verb"     tok]
   elseif "%*v%*.2r\n [%m" parse head  chunk["call"     tok]
   else                                chunk[""         tok]
   end
  else # misc special characters/operators
   i:i+1
   chunk["" first head]
  end
 end
 rtext.cat[r]
end

# convert rtext form into xml for output,
# taking advantage of writexml[] to manage
# all the hideous entity escaping:

html_escapes:raze insert k v with
 "\n" "<br>"
 " "  "&nbsp;"
 "\"" "&quot;"
 "'"  "&apos;"
 "<"  "&lt;"
 ">"  "&gt;"
 "&"  "&amp;"
end
html_specials:"" fuse keys html_escapes

on highlight_to_html text raw do
 r.tag:"pre"
 if raw r.attr.style:inlines.pre else r.attr.class:"lil" end
 r.children:each row in rows h:highlight[text]
  if row.font
   s.tag:"span"
   if raw s.attr.style:inlines[row.font] else s.attr.class:row.font end
   s.children:list row.text
  else
   t:row.text
   esc:array[]
   while count t
    if (first t) in html_specials  esc.cat[html_escapes[first t]] t:1 drop t
    else c:"%-.7r\n \"'<>&%n" parse t esc.cat[first c ] t:(last c) drop t
    end
   end
   list esc
  end
 end
 writexml[r]
end

module.html:highlight_to_html
{end}

