@xano/xanoscript-language-server 11.8.2 → 11.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/xanoscript-language-server",
3
- "version": "11.8.2",
3
+ "version": "11.8.3",
4
4
  "description": "Language Server Protocol implementation for XanoScript",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -34,6 +34,15 @@ describe("dbQueryFn", () => {
34
34
  expect(parser.errors).to.be.empty;
35
35
  });
36
36
 
37
+ it("dbQueryFn where can split line on binary operators", () => {
38
+ const parser = parse(`query user {
39
+ where = $db.user.visa_work_permit_end_date != null &&
40
+ $db.user.visa_work_permit_end_date <= $input.next_120_days && $db.bug_test_candidate.candidate_status == "mediated" && ($db.user.billing_end_date > now || $db.user.billing_end_date == null)
41
+ return = {type: "list"}
42
+ } as $results`);
43
+ expect(parser.errors).to.be.empty;
44
+ });
45
+
37
46
  it("dbQueryFn accepts a description", () => {
38
47
  const parser = parse(`query user {
39
48
  where = $db.array_columns @> $db.array_columns.id
@@ -354,6 +354,7 @@ export function expressionTestFn($) {
354
354
  DEF: () => $.CONSUME1(Question), // "?"
355
355
  });
356
356
 
357
+ $.OPTION1(() => $.CONSUME(NewlineToken));
357
358
  $.SUBRULE($.expressionFn, { ARGS: [token, options] });
358
359
  };
359
360
  }
@@ -107,6 +107,13 @@ describe("expressionFn", () => {
107
107
  expect(parser.errors).to.be.empty;
108
108
  });
109
109
 
110
+ it("expressionFn can split on multiple lines on binary operators", () => {
111
+ let parser = parse(`$var.value == "test" &&
112
+ $var.other_value != "example" ||
113
+ $var.another_value > 10`);
114
+ expect(parser.errors).to.be.empty;
115
+ });
116
+
110
117
  it("expressionFn accepts modulus symbol in expression", () => {
111
118
  const parser = parse("$this % 2 == 1");
112
119
  expect(parser.errors).to.be.empty;