From 34b8d8ff1f9d65c08a9156d72f08cf548183c6f4 Mon Sep 17 00:00:00 2001 From: JP Appel Date: Sun, 27 Apr 2025 00:49:27 -0400 Subject: Large commit; many features --- pkg/query/parser.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pkg/query/parser.go (limited to 'pkg/query/parser.go') diff --git a/pkg/query/parser.go b/pkg/query/parser.go new file mode 100644 index 0000000..355b18c --- /dev/null +++ b/pkg/query/parser.go @@ -0,0 +1,19 @@ +package query + +type TokenType uint64 + +const ( + TOKEN_ERROR TokenType = iota + TOKEN_EOF + TOKEN_AND + TOKEN_OR + TOKEN_NOT + TOKEN_SIMILAR + TOKEN_STATEMENT + // TODO: consider adding regex token +) + +type Token struct { + Type TokenType + Content string +} -- cgit v1.2.3