Skip to content

Commit

Permalink
Allow first line comments
Browse files Browse the repository at this point in the history
  • Loading branch information
IsabelParedes committed Nov 28, 2023
1 parent b066bc9 commit adacbae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/xeus_sql_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#endif

namespace xeus_sql
{
{
// implemented at the end of the file
// for better readability
const std::array<std::string, 826> & get_keywords();
Expand Down Expand Up @@ -312,7 +312,8 @@ namespace xeus_sql
if (xv_bindings::case_insentive_equals("SELECT", tokenized_input[0]) ||
xv_bindings::case_insentive_equals("DESC", tokenized_input[0]) ||
xv_bindings::case_insentive_equals("DESCRIBE", tokenized_input[0]) ||
xv_bindings::case_insentive_equals("SHOW", tokenized_input[0]))
xv_bindings::case_insentive_equals("SHOW", tokenized_input[0]) ||
xv_bindings::case_insentive_equals("--", tokenized_input[0]))
{
nl::json data = process_SQL_input(code, xv_sql_df);

Expand Down Expand Up @@ -379,7 +380,7 @@ namespace xeus_sql
{
auto pos = -1;
for(int i=code.size()-1; i>=0; --i)
{
{
if(!is_identifier(code[i]))
{
pos = i;
Expand Down

0 comments on commit adacbae

Please sign in to comment.