don't tolerate Lua comments when parsing commands

akkartik
Jul 24, 2023, 7:08 AM
7EICPXK26HC27BJAVM7MPMHHCW6RTEUSERKEWZR6GAWNNNUZN6PQC

Dependencies

  • [2] WIBNGKLF rename
  • [3] Y2K3ID34 ignore comments when selecting buffer name
  • [4] BXXTVMBQ better organization of errors
  • [5] JUTECG5X bring template-live's protocol in sync with template-live-editor
  • [6] UQLKUPWR start including a default_map with each app
  • [7] TK4G4GMC expose a command for the driver to remotely restart an app
  • [8] T3LA4DVG new command: batch GET
  • [9] 4XBR6CLD be robust to leading whitespace
  • [10] TNRO6KLZ new live app
  • [11] UUX7J2OA prevent overriding foundational definitions

Change contents

  • replacement in main.lua at line 180
    [4.5776][3.0:60]()
    local cmd = buf:gsub('%-%-[^\n]*', ''):match('^%s*(%S+)')
    [4.5776]
    [4.5808]
    local cmd = buf:match('^%s*(%S+)')
  • replacement in main.lua at line 182
    [4.5822][4.5822:5850]()
    print('command is '..cmd)
    [4.5822]
    [4.5850]
    print('checking for command: '..cmd)
  • replacement in main.lua at line 230
    [4.6724][2.586:618]()
    local definition_name = cmd
    [4.6724]
    [2.618]
    local definition_name = buf:gsub('%-%-[^\n]*', ''):match('^%s*(%S+)')
    print('definition name is '..definition_name)