Lots of work on the lua read-eval-print loop
This commit is contained in:
@@ -106,6 +106,14 @@ bool is_lua_classname(string_view s);
|
||||
// Return true if the line of code is a lua comment.
|
||||
bool is_lua_comment(string_view s);
|
||||
|
||||
// Return true if the line of code could be the beginning of a long expression.
|
||||
// In a read-eval-print loop, if the user types something like "function foo",
|
||||
// that's not a complete lua expression. But we don't want to just print an error,
|
||||
// we want to give the user a chance to continue typing so that he can turn it
|
||||
// into a complete lua expression. This function returns true if the string looks
|
||||
// like the beginning of a long lua expression. This is only a heuristic.
|
||||
bool is_possible_long_lua_expression(string_view s);
|
||||
|
||||
// Return true if the line is entirely whitespace.
|
||||
bool is_whitespace(string_view s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user