From 99bfc41c058a07bd848577f2d320a2ea18c0ebcb Mon Sep 17 00:00:00 2001
From: Ian Kerins
Date: Mon, 13 Nov 2023 23:10:55 -0500
Subject: [PATCH] Make boolean logic syntax doc its own section; elaborate
---
src/routes/(search-page)/lander.svelte | 9 +--
src/routes/syntax/+page.svelte | 83 +++++++++++++++-----------
2 files changed, 52 insertions(+), 40 deletions(-)
diff --git a/src/routes/(search-page)/lander.svelte b/src/routes/(search-page)/lander.svelte
index 202aca3..5fda408 100644
--- a/src/routes/(search-page)/lander.svelte
+++ b/src/routes/(search-page)/lander.svelte
@@ -134,10 +134,11 @@
-
- Logically compose expressions
-
- Seriously, read the manual for this one.
+
Logically compose expressions
+
+ Seriously, read the manual for this
+ one.
+
diff --git a/src/routes/syntax/+page.svelte b/src/routes/syntax/+page.svelte
index 16bd764..b60a0f8 100644
--- a/src/routes/syntax/+page.svelte
+++ b/src/routes/syntax/+page.svelte
@@ -72,42 +72,47 @@
/'foo/ and the second being
/bar'/.)
-
- As described above, expressions are conjunctive by default. A
- file must have at least one match for each expression to be included in
- the query results. Expressions may be made disjunctive by joining
- them with the special expression infix operator
- or. returns all matches for
- /foo/ or
- /bar/ in all files that have matches for at least
- one of /foo/ or
- /bar/. (To use or as a literal
- expression and not as an operator, double quote it:
- has three conjunctive expressions.)
-
-
- Expressions can be logically grouped with parentheses:
- produces results from files with
- matches for both /foo/ and at least one of /bar/ or
- /baz/. These groupings can be nested arbitrarily.
-
-
- To complete the boolean logic, expressions can be negated with a leading
- dash. returns all matches for /foo/ in files that do not have matches for /bar/.
- returns all matches for
- /foo/ in files that do not have matches for either
- /bar/ or
- /baz/.
- returns all matches for
- /foo/ in files that do not have matches for
- both
- /bar/ and
- /baz/.
-
+
+
+ Multiple expressions are combined with boolean logic
+
+
+ As described above, expressions are conjunctive by default: a
+ file must have at least one match for each expression to be included in
+ the query results. Expressions may be made disjunctive by
+ joining them with the special expression infix operator or.
+ returns all matches for
+ /foo/ or /bar/ in all files
+ that have matches for at least one of
+ /foo/ or /bar/. (To
+ use or as a literal expression and not as an operator,
+ double quote it: has three conjunctive
+ expressions.)
+
+
+ Expressions can be logically grouped with parentheses: produces results from files with matches for both /foo/ and at least one of /bar/ or /baz/. These groupings can be nested arbitrarily.
+
+
+ To complete the boolean logic, expressions can be negated with a leading
+ dash. returns all matches for
+ /foo/ in files that do not have matches for
+ /bar/. returns all matches for /foo/ in files that do
+ not have matches for either /bar/ or
+ /baz/.
+ returns all matches for /foo/ in files that do not
+ have matches for both
+ /bar/ and
+ /baz/.
+
+
@@ -141,6 +146,12 @@
There are a few more kinds of prefix expressions than those two.
They're all tabulated below.
+
+ Finally, note that the boolean logic described above applies to prefix
+ expressions just like normal ones:
+ shows matches for /assert/ except for those in files
+ whose names match /test/.
+