@xano/xanoscript-language-server 12.11.0 → 12.12.0

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": "12.11.0",
3
+ "version": "12.12.0",
4
4
  "description": "Language Server Protocol implementation for XanoScript",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -4,7 +4,6 @@ import {
4
4
  DeliveryToken,
5
5
  PublishToken,
6
6
  RateLimitToken,
7
- ServerToken,
8
7
  } from "../lexer/channel.js";
9
8
  import { ChannelToken } from "../lexer/columns.js";
10
9
  import { EqualToken, LCurly, RCurly } from "../lexer/control.js";
@@ -46,12 +45,7 @@ export function channelDeclaration($) {
46
45
  GATE: () => !hasServer,
47
46
  ALT: () => {
48
47
  hasServer = true;
49
- const subParent = $.CONSUME(ServerToken); // "server"
50
- $.CONSUME(EqualToken); // "="
51
- const result = $.CONSUME2(StringLiteral); // "server_name"
52
- if (result.image === `""`) {
53
- $.addMissingError(subParent, "server cannot be empty");
54
- }
48
+ $.SUBRULE($.realtimeServerClause);
55
49
  },
56
50
  },
57
51
  {
@@ -178,7 +172,7 @@ export function channelDeclaration($) {
178
172
  });
179
173
 
180
174
  if (!hasServer) {
181
- $.addMissingError(parent, "{} is missing a server clause");
175
+ $.addMissingError(parent, "{} is missing a realtime_server clause");
182
176
  }
183
177
 
184
178
  $.MANY1(() => $.CONSUME1(NewlineToken)); // optional new line
@@ -1,4 +1,3 @@
1
- import { ServerToken } from "../lexer/channel.js";
2
1
  import { ChannelTriggerToken } from "../lexer/channel_trigger.js";
3
2
  import { EqualToken, LCurly, RCurly } from "../lexer/control.js";
4
3
  import { StringLiteral } from "../lexer/literal.js";
@@ -68,12 +67,7 @@ export function channelTriggerDeclaration($) {
68
67
  GATE: () => !hasServer,
69
68
  ALT: () => {
70
69
  hasServer = true;
71
- const subParent = $.CONSUME(ServerToken); // "server"
72
- $.CONSUME3(EqualToken); // "="
73
- const result = $.CONSUME2(StringLiteral); // "server_name"
74
- if (result.image === `""`) {
75
- $.addMissingError(subParent, "server cannot be empty");
76
- }
70
+ $.SUBRULE($.realtimeServerClause);
77
71
  },
78
72
  },
79
73
  {
@@ -136,7 +130,7 @@ export function channelTriggerDeclaration($) {
136
130
  });
137
131
 
138
132
  if (!hasServer) {
139
- $.addMissingError(parent, "{} is missing a server clause");
133
+ $.addMissingError(parent, "{} is missing a realtime_server clause");
140
134
  }
141
135
 
142
136
  if (!hasChannel) {
@@ -1,4 +1,3 @@
1
- import { ServerToken } from "../lexer/channel.js";
2
1
  import { EqualToken, LCurly, RCurly } from "../lexer/control.js";
3
2
  import { StringLiteral } from "../lexer/literal.js";
4
3
  import { DeliverToToken, MessageToken } from "../lexer/message.js";
@@ -48,12 +47,7 @@ export function messageDeclaration($) {
48
47
  GATE: () => !hasServer,
49
48
  ALT: () => {
50
49
  hasServer = true;
51
- const subParent = $.CONSUME(ServerToken); // "server"
52
- $.CONSUME3(EqualToken); // "="
53
- const result = $.CONSUME3(StringLiteral); // "server_name"
54
- if (result.image === `""`) {
55
- $.addMissingError(subParent, "server cannot be empty");
56
- }
50
+ $.SUBRULE($.realtimeServerClause);
57
51
  },
58
52
  },
59
53
  {
@@ -142,7 +136,7 @@ export function messageDeclaration($) {
142
136
  if (!hasServer) {
143
137
  $.addMissingError(
144
138
  parent,
145
- `{} ${nameToken.image} is missing a server clause`,
139
+ `{} ${nameToken.image} is missing a realtime_server clause`,
146
140
  );
147
141
  }
148
142