Skip to content

Commit eb60488

Browse files
committed
sql_parser: expression parser refactoring (1)
1 parent 5510d11 commit eb60488

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/ast/expression.rs

+3
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ pub enum UnaryOp {
210210

211211
/// Minus (-)
212212
Minus,
213+
214+
/// Not (!) or NOT
215+
Not,
213216
}
214217

215218
/// An SQL function

tests/codeschool-sqlite-parser-test-files/main.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@ pub fn test() {
145145
"tests/codeschool-sqlite-parser-test-files/sql/official-suite/boundary1-2.sql"
146146
"tests/codeschool-sqlite-parser-test-files/sql/official-suite/fts3ad-1.sql"
147147
"tests/codeschool-sqlite-parser-test-files/sql/official-suite/randexpr1-11.sql"
148-
"tests/codeschool-sqlite-parser-test-files/sql/datatypes/basic-datatypes.sql"
149-
"tests/codeschool-sqlite-parser-test-files/sql/parse-errors/parse-error-1.sql"
150148
"tests/codeschool-sqlite-parser-test-files/sql/expressions/expression-unary-1.sql"
151149
"tests/codeschool-sqlite-parser-test-files/sql/expressions/expression-grouping-9.sql"
152150
"tests/codeschool-sqlite-parser-test-files/sql/expressions/expression-grouping-8.sql"
@@ -157,7 +155,7 @@ pub fn test() {
157155
*/
158156

159157
let sql_content = fs::read_to_string(
160-
"tests/codeschool-sqlite-parser-test-files/sql/datatypes/basic-datatypes.sql",
158+
"tests/codeschool-sqlite-parser-test-files/sql/expressions/expression-unary-1.sql",
161159
)
162160
.unwrap();
163161
let result = run_test(&sql_content);

tests/codeschool-sqlite-parser-test-files/sql/parse-errors/parse-error-1.sql

-1
This file was deleted.

0 commit comments

Comments
 (0)