@jbearak/sight 0.14.4 → 0.14.6
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/dist/sight-server.js +35 -7
- package/dist/sight-server.js.sha256 +1 -1
- package/package.json +1 -1
package/dist/sight-server.js
CHANGED
|
@@ -52,7 +52,7 @@ var package_default;
|
|
|
52
52
|
var init_package = __esm(() => {
|
|
53
53
|
package_default = {
|
|
54
54
|
name: "@jbearak/sight",
|
|
55
|
-
version: "0.14.
|
|
55
|
+
version: "0.14.6",
|
|
56
56
|
type: "module",
|
|
57
57
|
workspaces: [
|
|
58
58
|
"client"
|
|
@@ -13253,6 +13253,15 @@ var init_lexer = __esm(() => {
|
|
|
13253
13253
|
ASSIGNMENT_OPERATORS = new Set(["=", "==", "!=", "<", ">", "<=", ">="]);
|
|
13254
13254
|
});
|
|
13255
13255
|
|
|
13256
|
+
// src/utils/local-macro.ts
|
|
13257
|
+
function unwrap_macval(content) {
|
|
13258
|
+
return MACVAL_LITERAL_PATTERN.exec(content)?.[1] ?? content;
|
|
13259
|
+
}
|
|
13260
|
+
var MACVAL_LITERAL_PATTERN;
|
|
13261
|
+
var init_local_macro = __esm(() => {
|
|
13262
|
+
MACVAL_LITERAL_PATTERN = /^macval\(([A-Za-z0-9_]+)\)$/;
|
|
13263
|
+
});
|
|
13264
|
+
|
|
13256
13265
|
// src/utils/continuation.ts
|
|
13257
13266
|
function is_swallowed_continuation_terminator(my_token, in_continuation) {
|
|
13258
13267
|
return my_token.type === "STATEMENT_TERMINATOR" && in_continuation && my_token.value === `
|
|
@@ -13291,6 +13300,7 @@ class ContinuationTracker {
|
|
|
13291
13300
|
var PREFIX_COMMANDS, StataParser;
|
|
13292
13301
|
var init_parser = __esm(() => {
|
|
13293
13302
|
init_types();
|
|
13303
|
+
init_local_macro();
|
|
13294
13304
|
init_file_path_utils();
|
|
13295
13305
|
PREFIX_COMMANDS = new Set(["by", "bysort", "quietly", "qui", "capture", "cap", "noisily", "noi"]);
|
|
13296
13306
|
StataParser = class StataParser {
|
|
@@ -13788,7 +13798,7 @@ var init_parser = __esm(() => {
|
|
|
13788
13798
|
}
|
|
13789
13799
|
extract_local_macro_name(value) {
|
|
13790
13800
|
if (value.startsWith("`") && value.endsWith("'")) {
|
|
13791
|
-
return value.slice(1, -1);
|
|
13801
|
+
return unwrap_macval(value.slice(1, -1));
|
|
13792
13802
|
}
|
|
13793
13803
|
return null;
|
|
13794
13804
|
}
|
|
@@ -14011,7 +14021,11 @@ var init_parser = __esm(() => {
|
|
|
14011
14021
|
const options = [];
|
|
14012
14022
|
if (this.check("COMMA")) {
|
|
14013
14023
|
this.advance();
|
|
14014
|
-
while (!this.check("STATEMENT_TERMINATOR") && !this.isAtEnd()
|
|
14024
|
+
while (!this.check("STATEMENT_TERMINATOR") && !this.isAtEnd()) {
|
|
14025
|
+
if (this.skipContinuation())
|
|
14026
|
+
continue;
|
|
14027
|
+
if (this.isTrivia())
|
|
14028
|
+
break;
|
|
14015
14029
|
if (this.check("WORD")) {
|
|
14016
14030
|
const optionToken = this.advance();
|
|
14017
14031
|
const option = {
|
|
@@ -14212,7 +14226,11 @@ var init_parser = __esm(() => {
|
|
|
14212
14226
|
const options = [];
|
|
14213
14227
|
if (this.check("COMMA")) {
|
|
14214
14228
|
this.advance();
|
|
14215
|
-
while (!this.check("STATEMENT_TERMINATOR") && !this.isAtEnd()
|
|
14229
|
+
while (!this.check("STATEMENT_TERMINATOR") && !this.isAtEnd()) {
|
|
14230
|
+
if (this.skipContinuation())
|
|
14231
|
+
continue;
|
|
14232
|
+
if (this.isTrivia())
|
|
14233
|
+
break;
|
|
14216
14234
|
if (this.check("WORD")) {
|
|
14217
14235
|
const option_token = this.advance();
|
|
14218
14236
|
const option = {
|
|
@@ -14973,7 +14991,11 @@ var init_parser = __esm(() => {
|
|
|
14973
14991
|
const options = [];
|
|
14974
14992
|
if (this.check("COMMA")) {
|
|
14975
14993
|
this.advance();
|
|
14976
|
-
while (!this.check("STATEMENT_TERMINATOR") && !this.isAtEnd()
|
|
14994
|
+
while (!this.check("STATEMENT_TERMINATOR") && !this.isAtEnd()) {
|
|
14995
|
+
if (this.skipContinuation())
|
|
14996
|
+
continue;
|
|
14997
|
+
if (this.isTrivia())
|
|
14998
|
+
break;
|
|
14977
14999
|
if (this.check("WORD")) {
|
|
14978
15000
|
const option_token = this.advance();
|
|
14979
15001
|
const option = {
|
|
@@ -19927,7 +19949,7 @@ class SemanticAnalyzer {
|
|
|
19927
19949
|
}
|
|
19928
19950
|
extract_local_macro_name(value) {
|
|
19929
19951
|
if (value.startsWith("`") && value.endsWith("'")) {
|
|
19930
|
-
return value.slice(1, -1);
|
|
19952
|
+
return unwrap_macval(value.slice(1, -1));
|
|
19931
19953
|
}
|
|
19932
19954
|
return null;
|
|
19933
19955
|
}
|
|
@@ -20020,6 +20042,7 @@ var STATA_SYSTEM_GLOBALS, WEIGHT_TYPES, STATA_STORAGE_TYPES, STR_WIDTH_RE, MATA_
|
|
|
20020
20042
|
var init_analyzer = __esm(() => {
|
|
20021
20043
|
init_scoped_locals();
|
|
20022
20044
|
init_types();
|
|
20045
|
+
init_local_macro();
|
|
20023
20046
|
init_directive_parser();
|
|
20024
20047
|
init_loop_expander();
|
|
20025
20048
|
init_macro_creating_commands();
|
|
@@ -29689,6 +29712,7 @@ class DiagnosticsProvider {
|
|
|
29689
29712
|
const backward_dep_mode = config.cross_file?.backward_dependencies ?? "auto";
|
|
29690
29713
|
const scan_complete_for_deferral = resolved_scope?.scan_complete_at_resolve_time ?? false;
|
|
29691
29714
|
const defer_undefined_diagnostics = backward_dep_mode === "auto" && this.dependency_graph && !scan_complete_for_deferral && resolved_scope && !resolved_scope.has_directives && !resolved_scope.has_auto_parents && !resolved_scope.is_standalone;
|
|
29715
|
+
const inherited_entry_locals = collect_inherited_dofile_locals(resolved_scope, 0, document.uri);
|
|
29692
29716
|
for (const my_diagnostic of this.extract_semantic_diagnostics(document)) {
|
|
29693
29717
|
if (this.is_in_embedded_context(my_diagnostic.range.start, the_context_ranges)) {
|
|
29694
29718
|
continue;
|
|
@@ -29700,6 +29724,9 @@ class DiagnosticsProvider {
|
|
|
29700
29724
|
const symbol_name = is_undefined_symbol ? this.extract_symbol_name_from_diagnostic(my_diagnostic) : null;
|
|
29701
29725
|
const reference_kind = is_undefined_symbol ? this.classify_reference_kind(my_diagnostic) : null;
|
|
29702
29726
|
if (resolved_scope && symbol_name) {
|
|
29727
|
+
if (reference_kind === "local" && inherited_entry_locals.has(symbol_name)) {
|
|
29728
|
+
continue;
|
|
29729
|
+
}
|
|
29703
29730
|
if (this.is_symbol_defined_in_scope(symbol_name, resolved_scope.symbols, my_diagnostic.code, document.uri, reference_kind)) {
|
|
29704
29731
|
continue;
|
|
29705
29732
|
}
|
|
@@ -30414,6 +30441,7 @@ var init_diagnostics = __esm(() => {
|
|
|
30414
30441
|
init_types2();
|
|
30415
30442
|
init_types();
|
|
30416
30443
|
init_scoped_locals();
|
|
30444
|
+
init_dofile_locals();
|
|
30417
30445
|
init_scope_resolver();
|
|
30418
30446
|
init_diagnostic_code_description();
|
|
30419
30447
|
init_file_path_utils();
|
|
@@ -73841,4 +73869,4 @@ export {
|
|
|
73841
73869
|
is_cli_entry_point
|
|
73842
73870
|
};
|
|
73843
73871
|
|
|
73844
|
-
//# debugId=
|
|
73872
|
+
//# debugId=A1706D274D80E2DC64756E2164756E21
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5ab8b6710a4d498800da5fe29805c5b2d21cff3af3174ce414043fe334a31549 sight-server.js
|