Commit Graph

8 Commits

Author SHA1 Message Date
Lephenixnoir a277a4ffad
lexer: only allow one leading dot in symbols to avoid clash with ..
The latter is used for ranges. Previously 0..Bdisp_PutDisp_DD would
parse as 0 then the symbol `..Bdisp_PutDisp_DD`.
2022-12-08 17:46:41 +01:00
Lephenixnoir 0f5c1c2eba
shell: improve error behavior of parser and autocompletion
* Example on _e, but other commands are probably affected
* When completing, throw CompletionRequest("_error", <message>) to have
  a reasonable output and not mess up readline
* Avoid early returns (or if a command really cannot be completed,
  adjust the ShellCommand declaration to not run the command)
* Less CommandError in the parser, these would throw during
  autocompletion and annoy everyone
* Allow options with empty value so that we don't throw when
  autocompleting after typing eg. 'vspace='
2022-04-18 11:55:25 +01:00
Lephenixnoir 8a2c67d83f
fix token memory leaks in lexer 2022-04-06 12:02:53 +01:00
Lephenixnoir 613e5b07f4
remove explicit \e coloring 2022-04-05 12:23:39 +01:00
Lephenixnoir a9660da767
get rid of exceptions in the library, use explicit errors 2022-03-27 13:59:49 +01:00
Lephenixnoir 4e76ff3a24
add command help messages 2022-03-06 16:15:19 +00:00
Lephenixnoir bd5e1f918c
change option syntax; less exceptions; better autocompletion
* Change option syntax to <name>=<value>, with mandatory "=". This is
  still not great, but manageable.
* Remove the Session::require_vspace() function, whose named overload
  was misused (to check for the existence of a named space), and the
  associated exceptions. Explicit error flow is better error flow.
* Change the autocompletion system to generate all options in a vector
  of strings and then iterate, rather than using generators.
* Add completion for symbols.
2022-03-04 22:54:45 +00:00
Lephenixnoir 3b684389e9
replace CLI with WIP shell (huge commit) 2022-03-04 11:29:33 +00:00