Files
jak-project/third-party/replxx/src/escape.hxx
T
Tyler Wilding 8bba3d7fd7 REPL: Add clear-screen / auto-complete / basic hints and syntax highlighting (#316)
* swap to replxx from linenoise

* repl: Implement form auto-tab-completion

* repl: color coordinate the prompts

* repl: Add some basic syntax highlighting, bracket pairs and forms (all one color)

* repl: A more consistent starting screen for the repl

* repl: bug fix for auto-complete

* debug linux

* linting
2021-03-07 23:41:21 -05:00

38 lines
1020 B
C++
Vendored
Generated

#ifndef REPLXX_ESCAPE_HXX_INCLUDED
#define REPLXX_ESCAPE_HXX_INCLUDED 1
namespace replxx {
namespace EscapeSequenceProcessing {
// This is a typedef for the routine called by doDispatch(). It takes the
// current character
// as input, does any required processing including reading more characters and
// calling other
// dispatch routines, then eventually returns the final (possibly extended or
// special) character.
//
typedef char32_t (*CharacterDispatchRoutine)(char32_t);
// This structure is used by doDispatch() to hold a list of characters to test
// for and
// a list of routines to call if the character matches. The dispatch routine
// list is one
// longer than the character list; the final entry is used if no character
// matches.
//
struct CharacterDispatch {
unsigned int len; // length of the chars list
const char* chars; // chars to test
CharacterDispatchRoutine* dispatch; // array of routines to call
};
char32_t doDispatch(char32_t c);
}
}
#endif