@alloy-js/python 0.4.0-dev.0 → 0.4.0-dev.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.
Files changed (37) hide show
  1. package/dist/src/components/ImportStatement.js +2 -2
  2. package/dist/src/components/ImportStatement.js.map +1 -1
  3. package/dist/src/components/MemberExpression.d.ts +1 -1
  4. package/dist/src/components/MemberExpression.d.ts.map +1 -1
  5. package/dist/src/components/MemberExpression.js +98 -180
  6. package/dist/src/components/MemberExpression.js.map +1 -1
  7. package/dist/src/components/MemberScope.d.ts.map +1 -1
  8. package/dist/src/components/MemberScope.js +6 -3
  9. package/dist/src/components/MemberScope.js.map +1 -1
  10. package/dist/src/components/SourceFile.d.ts.map +1 -1
  11. package/dist/src/components/SourceFile.js +2 -2
  12. package/dist/src/components/SourceFile.js.map +1 -1
  13. package/dist/src/create-module.d.ts.map +1 -1
  14. package/dist/src/create-module.js +3 -3
  15. package/dist/src/create-module.js.map +1 -1
  16. package/dist/src/symbol-creation.d.ts.map +1 -1
  17. package/dist/src/symbol-creation.js +9 -5
  18. package/dist/src/symbol-creation.js.map +1 -1
  19. package/dist/src/symbols/python-module-scope.d.ts +1 -0
  20. package/dist/src/symbols/python-module-scope.d.ts.map +1 -1
  21. package/dist/src/symbols/python-module-scope.js +9 -2
  22. package/dist/src/symbols/python-module-scope.js.map +1 -1
  23. package/dist/src/symbols/python-output-symbol.d.ts +1 -0
  24. package/dist/src/symbols/python-output-symbol.d.ts.map +1 -1
  25. package/dist/src/symbols/python-output-symbol.js +12 -3
  26. package/dist/src/symbols/python-output-symbol.js.map +1 -1
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +9 -5
  29. package/src/components/ImportStatement.tsx +1 -1
  30. package/src/components/MemberExpression.tsx +174 -298
  31. package/src/components/MemberScope.tsx +16 -4
  32. package/src/components/SourceFile.tsx +2 -1
  33. package/src/create-module.ts +7 -3
  34. package/src/symbol-creation.ts +10 -5
  35. package/src/symbols/python-module-scope.ts +11 -2
  36. package/src/symbols/python-output-symbol.ts +13 -2
  37. package/temp/api.json +72 -2
@@ -3,6 +3,7 @@ import {
3
3
  OutputSpace,
4
4
  OutputSymbol,
5
5
  OutputSymbolOptions,
6
+ createSymbol,
6
7
  } from "@alloy-js/core";
7
8
 
8
9
  export interface PythonOutputSymbolOptions extends OutputSymbolOptions {
@@ -52,9 +53,19 @@ export class PythonOutputSymbol extends OutputSymbol {
52
53
  return this.spaces.some((s) => s.key === "instance");
53
54
  }
54
55
 
56
+ override get debugInfo(): Record<string, unknown> {
57
+ return {
58
+ ...super.debugInfo,
59
+ module: this.#module,
60
+ isStaticMemberSymbol: this.isStaticMemberSymbol,
61
+ isInstanceMemberSymbol: this.isInstanceMemberSymbol,
62
+ };
63
+ }
64
+
55
65
  copy() {
56
- const copy = new PythonOutputSymbol(this.name, undefined, {
57
- binder: this.binder,
66
+ const binder = this.binder;
67
+ const copy = createSymbol(PythonOutputSymbol, this.name, undefined, {
68
+ binder,
58
69
  aliasTarget: this.aliasTarget,
59
70
  module: this.module,
60
71
  metadata: this.metadata,
package/temp/api.json CHANGED
@@ -5907,7 +5907,7 @@
5907
5907
  "excerptTokens": [
5908
5908
  {
5909
5909
  "kind": "Content",
5910
- "text": "Part: (props: "
5910
+ "text": "Part: (_props: "
5911
5911
  },
5912
5912
  {
5913
5913
  "kind": "Reference",
@@ -5931,7 +5931,7 @@
5931
5931
  "overloadIndex": 1,
5932
5932
  "parameters": [
5933
5933
  {
5934
- "parameterName": "props",
5934
+ "parameterName": "_props",
5935
5935
  "parameterTypeTokenRange": {
5936
5936
  "startIndex": 1,
5937
5937
  "endIndex": 2
@@ -8933,6 +8933,41 @@
8933
8933
  "isAbstract": false,
8934
8934
  "name": "addImport"
8935
8935
  },
8936
+ {
8937
+ "kind": "Property",
8938
+ "canonicalReference": "@alloy-js/python!PythonModuleScope#debugInfo:member",
8939
+ "docComment": "",
8940
+ "excerptTokens": [
8941
+ {
8942
+ "kind": "Content",
8943
+ "text": "get debugInfo(): "
8944
+ },
8945
+ {
8946
+ "kind": "Reference",
8947
+ "text": "Record",
8948
+ "canonicalReference": "!Record:type"
8949
+ },
8950
+ {
8951
+ "kind": "Content",
8952
+ "text": "<string, unknown>"
8953
+ },
8954
+ {
8955
+ "kind": "Content",
8956
+ "text": ";"
8957
+ }
8958
+ ],
8959
+ "isReadonly": true,
8960
+ "isOptional": false,
8961
+ "releaseTag": "Public",
8962
+ "name": "debugInfo",
8963
+ "propertyTypeTokenRange": {
8964
+ "startIndex": 1,
8965
+ "endIndex": 3
8966
+ },
8967
+ "isStatic": false,
8968
+ "isProtected": false,
8969
+ "isAbstract": false
8970
+ },
8936
8971
  {
8937
8972
  "kind": "Property",
8938
8973
  "canonicalReference": "@alloy-js/python!PythonModuleScope#importedModules:member",
@@ -9210,6 +9245,41 @@
9210
9245
  "isAbstract": false,
9211
9246
  "name": "copy"
9212
9247
  },
9248
+ {
9249
+ "kind": "Property",
9250
+ "canonicalReference": "@alloy-js/python!PythonOutputSymbol#debugInfo:member",
9251
+ "docComment": "",
9252
+ "excerptTokens": [
9253
+ {
9254
+ "kind": "Content",
9255
+ "text": "get debugInfo(): "
9256
+ },
9257
+ {
9258
+ "kind": "Reference",
9259
+ "text": "Record",
9260
+ "canonicalReference": "!Record:type"
9261
+ },
9262
+ {
9263
+ "kind": "Content",
9264
+ "text": "<string, unknown>"
9265
+ },
9266
+ {
9267
+ "kind": "Content",
9268
+ "text": ";"
9269
+ }
9270
+ ],
9271
+ "isReadonly": true,
9272
+ "isOptional": false,
9273
+ "releaseTag": "Public",
9274
+ "name": "debugInfo",
9275
+ "propertyTypeTokenRange": {
9276
+ "startIndex": 1,
9277
+ "endIndex": 3
9278
+ },
9279
+ "isStatic": false,
9280
+ "isProtected": false,
9281
+ "isAbstract": false
9282
+ },
9213
9283
  {
9214
9284
  "kind": "Property",
9215
9285
  "canonicalReference": "@alloy-js/python!PythonOutputSymbol#instanceMembers:member",