@artel/artc 0.6.25240 → 0.6.25242

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/build/Cli.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CommandLineCompiler
4
- } from "./chunk-VCSRWNJI.js";
5
- import "./chunk-7PUGFDV6.js";
4
+ } from "./chunk-BQ6QF4YU.js";
5
+ import "./chunk-TECXIZJ5.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-TMFKLPML.js";
8
+ } from "./chunk-CS2AK7Z7.js";
9
9
 
10
10
  // source/Cli.ts
11
11
  function main() {
package/build/api/Api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "../chunk-7PUGFDV6.js";
3
+ } from "../chunk-TECXIZJ5.js";
4
4
  import {
5
5
  AccessKind,
6
6
  AccessedFunctionValueParameter,
@@ -323,7 +323,7 @@ import {
323
323
  withoutQuotes,
324
324
  withoutTemplateQuotes,
325
325
  yieldExecution
326
- } from "../chunk-TMFKLPML.js";
326
+ } from "../chunk-CS2AK7Z7.js";
327
327
  export {
328
328
  AccessKind,
329
329
  AccessedFunctionValueParameter,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-VCSRWNJI.js";
10
- import "../chunk-7PUGFDV6.js";
11
- import "../chunk-TMFKLPML.js";
9
+ } from "../chunk-BQ6QF4YU.js";
10
+ import "../chunk-TECXIZJ5.js";
11
+ import "../chunk-CS2AK7Z7.js";
12
12
  export {
13
13
  CommandLineCompiler,
14
14
  FileSystemUri,
@@ -182,7 +182,7 @@ import {
182
182
  unwrapParenthesizedExpressions,
183
183
  visitChildren,
184
184
  yieldExecution
185
- } from "../chunk-TMFKLPML.js";
185
+ } from "../chunk-CS2AK7Z7.js";
186
186
 
187
187
  // source/services/CustomCommand.ts
188
188
  import * as ls from "vscode-languageserver";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "./chunk-7PUGFDV6.js";
3
+ } from "./chunk-TECXIZJ5.js";
4
4
  import {
5
5
  ArtelVersion,
6
6
  Cached,
@@ -14,7 +14,7 @@ import {
14
14
  __async,
15
15
  performanceMeasurementStageNames,
16
16
  performanceMeasurementStages
17
- } from "./chunk-TMFKLPML.js";
17
+ } from "./chunk-CS2AK7Z7.js";
18
18
 
19
19
  // source/executor/FileSystemUri.ts
20
20
  import { platform } from "os";
@@ -620,7 +620,7 @@ var UniqueWithComparatorQuery = class extends Query {
620
620
  };
621
621
 
622
622
  // source/common/Constants.ts
623
- var ArtelVersion = true ? "0.6.25240" : "";
623
+ var ArtelVersion = true ? "0.6.25242" : "";
624
624
  var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel"];
625
625
  var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
626
626
  var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
@@ -41390,56 +41390,6 @@ var Analyzer = class _Analyzer {
41390
41390
  const returnType = this.semanticContext.ofFunctionBlock(node).getContainingSubprogram()?.getReturnType();
41391
41391
  return returnType === void 0 || returnType.equals(this.standardTypes.none);
41392
41392
  }
41393
- isExpressionImplicitlyReturnedFromSubprogram(node) {
41394
- const isSingle = node.parent.statements.single((s) => s.kind !== 101 /* EmptyStatement */) !== void 0;
41395
- if (!isSingle) {
41396
- return false;
41397
- }
41398
- let isInTopLevelStatementBlockOfSubprogram;
41399
- const parent = node.parent.parent.parent;
41400
- switch (parent.kind) {
41401
- case 23 /* PackageConstructorDeclaration */:
41402
- case 24 /* PackageEntryPointDeclaration */:
41403
- case 25 /* PackageFunctionDeclaration */:
41404
- case 34 /* PackageVariableGetterDeclaration */:
41405
- case 35 /* PackageVariableSetterDeclaration */:
41406
- case 43 /* ConstructorDeclaration */:
41407
- case 44 /* DestructorDeclaration */:
41408
- case 45 /* IndexedElementGetterDeclaration */:
41409
- case 46 /* IndexedElementSetterDeclaration */:
41410
- case 48 /* DereferencedVariableGetterDeclaration */:
41411
- case 49 /* DereferencedVariableSetterDeclaration */:
41412
- case 50 /* MethodDeclaration */:
41413
- case 51 /* OperatorDeclaration */:
41414
- case 53 /* FieldGetterDeclaration */:
41415
- case 54 /* FieldSetterDeclaration */:
41416
- case 56 /* NestedFunctionDeclaration */:
41417
- case 66 /* FunctionBlockLiteral */:
41418
- case 65 /* FunctionLiteral */:
41419
- isInTopLevelStatementBlockOfSubprogram = true;
41420
- break;
41421
- case 96 /* RunStatement */:
41422
- case 97 /* TryStatement */:
41423
- case 98 /* CatchClause */:
41424
- case 100 /* FinallyClause */:
41425
- case 106 /* ForStatement */:
41426
- case 107 /* IfStatement */:
41427
- case 109 /* ElseIfClause */:
41428
- case 110 /* ElseClause */:
41429
- case 114 /* LoopStatement */:
41430
- case 119 /* CaseClause */:
41431
- case 120 /* WhileStatement */:
41432
- isInTopLevelStatementBlockOfSubprogram = false;
41433
- break;
41434
- default:
41435
- Debug.never(parent);
41436
- }
41437
- if (!isInTopLevelStatementBlockOfSubprogram) {
41438
- return false;
41439
- }
41440
- const returnType = this.semanticContext.containing(node).getContainingSubprogram()?.getReturnType();
41441
- return returnType !== void 0 && !returnType.equals(this.standardTypes.none);
41442
- }
41443
41393
  createBackingPackageVariables(declaredMembers, pkg) {
41444
41394
  const declarationNames = Query.from(declaredMembers).map((d) => d.getName().key).uniqueToSet();
41445
41395
  const result = new Array();
@@ -42914,12 +42864,7 @@ var TargetType = class {
42914
42864
  }
42915
42865
  getTargetTypeOfChildOfExpressionStatement(parent, child) {
42916
42866
  Debug.assert(child === parent.expression);
42917
- if (this._analyzer.isExpressionImplicitlyReturnedFromSubprogram(parent)) {
42918
- const semanticContext = this._analyzer.semanticContext.containing(parent);
42919
- return semanticContext.getContainingSubprogram()?.getReturnType();
42920
- } else {
42921
- return void 0;
42922
- }
42867
+ return void 0;
42923
42868
  }
42924
42869
  getTargetTypeOfChildOfForStatement(parent, child) {
42925
42870
  Debug.assert(child === parent.enumeratedExpression);
@@ -61870,13 +61815,7 @@ var IrBuilder = class {
61870
61815
  }
61871
61816
  buildExpressionStatement(statement) {
61872
61817
  const expression = this.buildExpression(statement.expression);
61873
- let result;
61874
- if (this._analyzer.isExpressionImplicitlyReturnedFromSubprogram(statement)) {
61875
- result = new ReturnStatement3(expression, this.getSourceLocation(statement));
61876
- } else {
61877
- result = new ExpressionStatement3(expression, this.getSourceLocation(statement));
61878
- }
61879
- return result;
61818
+ return new ExpressionStatement3(expression, this.getSourceLocation(statement));
61880
61819
  }
61881
61820
  buildForStatement(statement) {
61882
61821
  const saveLoopLabel = this._currentLoopLabel;
@@ -10,7 +10,7 @@ import {
10
10
  WellKnownDeclarationsLoadError,
11
11
  __async,
12
12
  createTsInteropInputsForCompilation
13
- } from "./chunk-TMFKLPML.js";
13
+ } from "./chunk-CS2AK7Z7.js";
14
14
 
15
15
  // source/executor/Compiler.ts
16
16
  var Compiler = class {
@@ -262,7 +262,6 @@ export declare class Analyzer {
262
262
  createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
263
263
  getDeclarationsUsageCount(sourceFile: tree.SourceFile, cancellationToken: CancellationToken | undefined): Promise<DeclarationsUsageCountResult>;
264
264
  isFunctionResultNone(node: tree.FunctionBlock): boolean;
265
- isExpressionImplicitlyReturnedFromSubprogram(node: tree.ExpressionStatement): boolean;
266
265
  createBackingPackageVariables(declaredMembers: readonly (e.NamedPackageMemberEntity | e.PackageAliasEntity)[], pkg: e.PackageEntity): e.PackageVariableEntity[];
267
266
  createBackingFields(declaredMembers: readonly NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
268
267
  createNodeDiagnostic(code: DiagnosticCode, node: tree.Node, formatArguments?: readonly string[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artel/artc",
3
- "version": "0.6.25240",
3
+ "version": "0.6.25242",
4
4
  "description": "Артель Компилятор | Artel Compiler",
5
5
  "author": "Nezaboodka Team <contact@nezaboodka.com>",
6
6
  "license": "LGPL-3.0-or-later",