1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

LibSQL: Move Lexer and Parser machinery to AST directory

The SQL engine is expected to be a fairly sizeable piece of software.
Therefore we're starting to restructure the codebase for growth.
This commit is contained in:
Jan de Visser 2021-06-21 10:57:44 -04:00 committed by Andreas Kling
parent e0f1c237d2
commit 4198f7e1af
24 changed files with 281 additions and 278 deletions

View file

@ -203,7 +203,7 @@ int Tuple::compare(const Tuple& other) const
for (auto ix = 0u; ix < num_values; ix++) {
auto ret = m_data[ix].compare(other.m_data[ix]);
if (ret != 0) {
if ((ix < m_descriptor.size()) && m_descriptor[ix].order == Order::Descending)
if ((ix < m_descriptor.size()) && m_descriptor[ix].order == AST::Order::Descending)
ret = -ret;
return ret;
}
@ -223,7 +223,7 @@ int Tuple::match(const Tuple& other) const
return -1;
auto ret = m_data[my_index.value()].compare(other_value);
if (ret != 0)
return (m_descriptor[my_index.value()].order == Order::Descending) ? -ret : ret;
return (m_descriptor[my_index.value()].order == AST::Order::Descending) ? -ret : ret;
other_index++;
}
return 0;