@supernova-studio/pulsar-core 1.0.32 → 1.0.36
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/browser/pulsar-core-dev.js +67725 -0
- package/build/browser/pulsar-core-dev.js.map +1 -0
- package/build/browser/pulsar-core.js +7 -0
- package/build/browser/pulsar-core.js.LICENSE.txt +31 -0
- package/build/browser/pulsar-core.js.map +1 -0
- package/build/main/pulsar-core.js +22495 -0
- package/build/main/pulsar-core.js.map +1 -0
- package/build/typings/core/tsconfig.typings.tsbuildinfo +5035 -0
- package/package.json +19 -15
- package/tsconfig.typings.json +19 -0
- package/webpack.config.browser.dev.js +52 -0
- package/webpack.config.browser.js +52 -0
- package/webpack.config.main.js +45 -0
- package/build/browser/pulsar.js +0 -142584
- package/build/browser/pulsar.min.js +0 -270
- package/build/main/browser-bundle.d.ts +0 -1
- package/build/main/browser-bundle.js +0 -16
- package/build/main/browser-bundle.js.map +0 -1
- package/build/main/engine/ExportEngine.d.ts +0 -17
- package/build/main/engine/ExportEngine.js +0 -122
- package/build/main/engine/ExportEngine.js.map +0 -1
- package/build/main/engine/configuration/ExportConfiguration.d.ts +0 -18
- package/build/main/engine/configuration/ExportConfiguration.js +0 -47
- package/build/main/engine/configuration/ExportConfiguration.js.map +0 -1
- package/build/main/engine/generation/ExportDataProducer.d.ts +0 -15
- package/build/main/engine/generation/ExportDataProducer.js +0 -100
- package/build/main/engine/generation/ExportDataProducer.js.map +0 -1
- package/build/main/engine/generation/queue/ExportDataQueue.d.ts +0 -16
- package/build/main/engine/generation/queue/ExportDataQueue.js +0 -72
- package/build/main/engine/generation/queue/ExportDataQueue.js.map +0 -1
- package/build/main/engine/generation/queue/ExportDataQueueOperation.d.ts +0 -6
- package/build/main/engine/generation/queue/ExportDataQueueOperation.js +0 -36
- package/build/main/engine/generation/queue/ExportDataQueueOperation.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.d.ts +0 -7
- package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.js +0 -54
- package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.d.ts +0 -7
- package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.js +0 -40
- package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataRequest.d.ts +0 -19
- package/build/main/engine/generation/requests/ExportDataRequest.js +0 -55
- package/build/main/engine/generation/requests/ExportDataRequest.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataRequestDataStore.d.ts +0 -16
- package/build/main/engine/generation/requests/ExportDataRequestDataStore.js +0 -57
- package/build/main/engine/generation/requests/ExportDataRequestDataStore.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataRequestNameStore.d.ts +0 -22
- package/build/main/engine/generation/requests/ExportDataRequestNameStore.js +0 -86
- package/build/main/engine/generation/requests/ExportDataRequestNameStore.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataRequestProducer.d.ts +0 -16
- package/build/main/engine/generation/requests/ExportDataRequestProducer.js +0 -149
- package/build/main/engine/generation/requests/ExportDataRequestProducer.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataResponse.d.ts +0 -13
- package/build/main/engine/generation/requests/ExportDataResponse.js +0 -30
- package/build/main/engine/generation/requests/ExportDataResponse.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.d.ts +0 -14
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.js +0 -76
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.d.ts +0 -11
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.js +0 -43
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.js.map +0 -1
- package/build/main/engine/items/ExportItemProducer.d.ts +0 -14
- package/build/main/engine/items/ExportItemProducer.js +0 -70
- package/build/main/engine/items/ExportItemProducer.js.map +0 -1
- package/build/main/engine/items/construction/ExportItem.d.ts +0 -8
- package/build/main/engine/items/construction/ExportItem.js +0 -25
- package/build/main/engine/items/construction/ExportItem.js.map +0 -1
- package/build/main/engine/items/construction/ExportItemBuilder.d.ts +0 -9
- package/build/main/engine/items/construction/ExportItemBuilder.js +0 -43
- package/build/main/engine/items/construction/ExportItemBuilder.js.map +0 -1
- package/build/main/engine/items/queue/ExportItemQueue.d.ts +0 -16
- package/build/main/engine/items/queue/ExportItemQueue.js +0 -70
- package/build/main/engine/items/queue/ExportItemQueue.js.map +0 -1
- package/build/main/engine/items/queue/ExportItemQueueOperation.d.ts +0 -6
- package/build/main/engine/items/queue/ExportItemQueueOperation.js +0 -36
- package/build/main/engine/items/queue/ExportItemQueueOperation.js.map +0 -1
- package/build/main/engine/items/requests/ExportItemRequest.d.ts +0 -16
- package/build/main/engine/items/requests/ExportItemRequest.js +0 -68
- package/build/main/engine/items/requests/ExportItemRequest.js.map +0 -1
- package/build/main/engine/items/requests/ExportItemRequestProducer.d.ts +0 -8
- package/build/main/engine/items/requests/ExportItemRequestProducer.js +0 -24
- package/build/main/engine/items/requests/ExportItemRequestProducer.js.map +0 -1
- package/build/main/engine/items/requests/ExportItemResponse.d.ts +0 -9
- package/build/main/engine/items/requests/ExportItemResponse.js +0 -25
- package/build/main/engine/items/requests/ExportItemResponse.js.map +0 -1
- package/build/main/engine/items/requests/ExportItemResponseProducer.d.ts +0 -7
- package/build/main/engine/items/requests/ExportItemResponseProducer.js +0 -45
- package/build/main/engine/items/requests/ExportItemResponseProducer.js.map +0 -1
- package/build/main/engine/loaders/BlueprintLoader.d.ts +0 -9
- package/build/main/engine/loaders/BlueprintLoader.js +0 -55
- package/build/main/engine/loaders/BlueprintLoader.js.map +0 -1
- package/build/main/engine/writing/queue/ExportWriterQueue.d.ts +0 -16
- package/build/main/engine/writing/queue/ExportWriterQueue.js +0 -70
- package/build/main/engine/writing/queue/ExportWriterQueue.js.map +0 -1
- package/build/main/engine/writing/queue/ExportWriterQueueOperation.d.ts +0 -6
- package/build/main/engine/writing/queue/ExportWriterQueueOperation.js +0 -36
- package/build/main/engine/writing/queue/ExportWriterQueueOperation.js.map +0 -1
- package/build/main/engine/writing/requests/ExportWriterRequest.d.ts +0 -14
- package/build/main/engine/writing/requests/ExportWriterRequest.js +0 -40
- package/build/main/engine/writing/requests/ExportWriterRequest.js.map +0 -1
- package/build/main/engine/writing/requests/ExportWriterRequestProducer.d.ts +0 -8
- package/build/main/engine/writing/requests/ExportWriterRequestProducer.js +0 -30
- package/build/main/engine/writing/requests/ExportWriterRequestProducer.js.map +0 -1
- package/build/main/engine/writing/requests/ExportWriterResponse.d.ts +0 -9
- package/build/main/engine/writing/requests/ExportWriterResponse.js +0 -25
- package/build/main/engine/writing/requests/ExportWriterResponse.js.map +0 -1
- package/build/main/engine/writing/requests/ExportWriterResponseProducer.d.ts +0 -7
- package/build/main/engine/writing/requests/ExportWriterResponseProducer.js +0 -40
- package/build/main/engine/writing/requests/ExportWriterResponseProducer.js.map +0 -1
- package/build/main/engine/writing/writers/ExportItemWriter.d.ts +0 -14
- package/build/main/engine/writing/writers/ExportItemWriter.js +0 -70
- package/build/main/engine/writing/writers/ExportItemWriter.js.map +0 -1
- package/build/main/engine/writing/writers/ExportWriterRuleProcessor.d.ts +0 -9
- package/build/main/engine/writing/writers/ExportWriterRuleProcessor.js +0 -63
- package/build/main/engine/writing/writers/ExportWriterRuleProcessor.js.map +0 -1
- package/build/main/engine/writing/writers/memory/ExportWriterMemory.d.ts +0 -4
- package/build/main/engine/writing/writers/memory/ExportWriterMemory.js +0 -29
- package/build/main/engine/writing/writers/memory/ExportWriterMemory.js.map +0 -1
- package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.d.ts +0 -5
- package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.js +0 -59
- package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.js.map +0 -1
- package/build/main/engine/writing/writers/memory/ExportWriterStore.d.ts +0 -5
- package/build/main/engine/writing/writers/memory/ExportWriterStore.js +0 -33
- package/build/main/engine/writing/writers/memory/ExportWriterStore.js.map +0 -1
- package/build/main/exports.d.ts +0 -5
- package/build/main/exports.js +0 -15
- package/build/main/exports.js.map +0 -1
- package/build/main/index.d.ts +0 -1
- package/build/main/index.js +0 -14
- package/build/main/index.js.map +0 -1
- package/build/main/model/dsm/DSMReferenceStore.d.ts +0 -28
- package/build/main/model/dsm/DSMReferenceStore.js +0 -100
- package/build/main/model/dsm/DSMReferenceStore.js.map +0 -1
- package/build/main/model/exporters/Exporter.d.ts +0 -53
- package/build/main/model/exporters/Exporter.js +0 -106
- package/build/main/model/exporters/Exporter.js.map +0 -1
- package/build/main/model/maps/ExporterMapBlueprint.d.ts +0 -12
- package/build/main/model/maps/ExporterMapBlueprint.js +0 -39
- package/build/main/model/maps/ExporterMapBlueprint.js.map +0 -1
- package/build/main/model/sources/ExporterSource.d.ts +0 -26
- package/build/main/model/sources/ExporterSource.js +0 -64
- package/build/main/model/sources/ExporterSource.js.map +0 -1
- package/build/main/pulsar/Pulsar.d.ts +0 -105
- package/build/main/pulsar/Pulsar.js +0 -353
- package/build/main/pulsar/Pulsar.js.map +0 -1
- package/build/main/pulsar/PulsarInterface.d.ts +0 -152
- package/build/main/pulsar/PulsarInterface.js +0 -37
- package/build/main/pulsar/PulsarInterface.js.map +0 -1
- package/build/main/pulsar/PulsarStaticAnalysis.d.ts +0 -26
- package/build/main/pulsar/PulsarStaticAnalysis.js +0 -69
- package/build/main/pulsar/PulsarStaticAnalysis.js.map +0 -1
- package/build/main/pulsar/PulsarStaticAnalysisInterface.d.ts +0 -13
- package/build/main/pulsar/PulsarStaticAnalysisInterface.js +0 -10
- package/build/main/pulsar/PulsarStaticAnalysisInterface.js.map +0 -1
- package/build/main/pulsar/managers/PulsarBlueprintManager.d.ts +0 -16
- package/build/main/pulsar/managers/PulsarBlueprintManager.js +0 -76
- package/build/main/pulsar/managers/PulsarBlueprintManager.js.map +0 -1
- package/build/main/pulsar/managers/PulsarCIManager.d.ts +0 -25
- package/build/main/pulsar/managers/PulsarCIManager.js +0 -220
- package/build/main/pulsar/managers/PulsarCIManager.js.map +0 -1
- package/build/main/pulsar/managers/PulsarCodeManager.d.ts +0 -24
- package/build/main/pulsar/managers/PulsarCodeManager.js +0 -180
- package/build/main/pulsar/managers/PulsarCodeManager.js.map +0 -1
- package/build/main/pulsar/managers/PulsarConfigurationManager.d.ts +0 -17
- package/build/main/pulsar/managers/PulsarConfigurationManager.js +0 -88
- package/build/main/pulsar/managers/PulsarConfigurationManager.js.map +0 -1
- package/build/main/pulsar/managers/PulsarExporterManager.d.ts +0 -25
- package/build/main/pulsar/managers/PulsarExporterManager.js +0 -121
- package/build/main/pulsar/managers/PulsarExporterManager.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarExporterConfigFileGenerator.d.ts +0 -12
- package/build/main/pulsar/managers/generators/PulsarExporterConfigFileGenerator.js +0 -140
- package/build/main/pulsar/managers/generators/PulsarExporterConfigFileGenerator.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.d.ts +0 -8
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js +0 -45
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarExporterSourceFileGenerator.d.ts +0 -9
- package/build/main/pulsar/managers/generators/PulsarExporterSourceFileGenerator.js +0 -45
- package/build/main/pulsar/managers/generators/PulsarExporterSourceFileGenerator.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.d.ts +0 -7
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.js +0 -63
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarFileGenerator.d.ts +0 -20
- package/build/main/pulsar/managers/generators/PulsarFileGenerator.js +0 -77
- package/build/main/pulsar/managers/generators/PulsarFileGenerator.js.map +0 -1
- package/build/main/pulsar/managers/loaders/PulsarBaseLoader.d.ts +0 -5
- package/build/main/pulsar/managers/loaders/PulsarBaseLoader.js +0 -28
- package/build/main/pulsar/managers/loaders/PulsarBaseLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.d.ts +0 -11
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.js +0 -98
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.d.ts +0 -9
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.js +0 -81
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.d.ts +0 -11
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js +0 -106
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.d.ts +0 -12
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.js +0 -143
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.d.ts +0 -12
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.js +0 -115
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.js.map +0 -1
- package/build/main/pulsar/managers/validators/PulsarExporterConfigFileValidator.d.ts +0 -7
- package/build/main/pulsar/managers/validators/PulsarExporterConfigFileValidator.js +0 -124
- package/build/main/pulsar/managers/validators/PulsarExporterConfigFileValidator.js.map +0 -1
- package/build/main/tests/TestConfiguration.d.ts +0 -9
- package/build/main/tests/TestConfiguration.js +0 -25
- package/build/main/tests/TestConfiguration.js.map +0 -1
- package/build/main/tests/casebuilders/ci.d.ts +0 -12
- package/build/main/tests/casebuilders/ci.js +0 -38
- package/build/main/tests/casebuilders/ci.js.map +0 -1
- package/build/main/tests/casebuilders/configuration.d.ts +0 -5
- package/build/main/tests/casebuilders/configuration.js +0 -25
- package/build/main/tests/casebuilders/configuration.js.map +0 -1
- package/build/main/tests/casebuilders/dsm.d.ts +0 -7
- package/build/main/tests/casebuilders/dsm.js +0 -57
- package/build/main/tests/casebuilders/dsm.js.map +0 -1
- package/build/main/tests/casebuilders/modelObjects.d.ts +0 -13
- package/build/main/tests/casebuilders/modelObjects.js +0 -120
- package/build/main/tests/casebuilders/modelObjects.js.map +0 -1
- package/build/main/tools/Logger.d.ts +0 -27
- package/build/main/tools/Logger.js +0 -98
- package/build/main/tools/Logger.js.map +0 -1
- package/build/main/tools/LoggerDefaultMessages.d.ts +0 -13
- package/build/main/tools/LoggerDefaultMessages.js +0 -41
- package/build/main/tools/LoggerDefaultMessages.js.map +0 -1
- package/build/tsconfig.tsbuildinfo +0 -3045
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[".././src/engine/ExportEngine.ts",".././src/engine/configuration/ExportConfiguration.ts",".././src/engine/generation/ExportDataProducer.ts",".././src/engine/generation/queue/ExportDataQueue.ts",".././src/engine/generation/queue/ExportDataQueueOperation.ts",".././src/engine/generation/requests/ExportDataEmittedResponseProducer.ts",".././src/engine/generation/requests/ExportDataPrimaryResponseProducer.ts",".././src/engine/generation/requests/ExportDataRequest.ts",".././src/engine/generation/requests/ExportDataRequestDataStore.ts",".././src/engine/generation/requests/ExportDataRequestNameStore.ts",".././src/engine/generation/requests/ExportDataRequestProducer.ts",".././src/engine/generation/requests/ExportDataResponse.ts",".././src/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.ts",".././src/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.ts",".././src/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.ts",".././src/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.ts",".././src/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.ts",".././src/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.ts",".././src/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.ts",".././src/engine/items/ExportItemProducer.ts",".././src/engine/items/construction/ExportItem.ts",".././src/engine/items/construction/ExportItemBuilder.ts",".././src/engine/items/queue/ExportItemQueue.ts",".././src/engine/items/queue/ExportItemQueueOperation.ts",".././src/engine/items/requests/ExportItemRequest.ts",".././src/engine/items/requests/ExportItemRequestProducer.ts",".././src/engine/items/requests/ExportItemResponse.ts",".././src/engine/items/requests/ExportItemResponseProducer.ts",".././src/engine/loaders/BlueprintLoader.ts",".././src/engine/writing/queue/ExportWriterQueue.ts",".././src/engine/writing/queue/ExportWriterQueueOperation.ts",".././src/engine/writing/requests/ExportWriterRequest.ts",".././src/engine/writing/requests/ExportWriterRequestProducer.ts",".././src/engine/writing/requests/ExportWriterResponse.ts",".././src/engine/writing/requests/ExportWriterResponseProducer.ts",".././src/engine/writing/writers/ExportItemWriter.ts",".././src/engine/writing/writers/ExportWriterRuleProcessor.ts",".././src/engine/writing/writers/memory/ExportWriterMemoryRequest.ts",".././src/engine/writing/writers/memory/ExportWriterStore.ts",".././src/exports.ts",".././src/index.ts",".././src/model/dsm/DSMReferenceStore.ts",".././src/model/exporters/Exporter.ts",".././src/model/maps/ExporterMapBlueprint.ts",".././src/model/sources/ExporterSource.ts",".././src/pulsar/Pulsar.ts",".././src/pulsar/PulsarInterface.ts",".././src/pulsar/PulsarStaticAnalysis.ts",".././src/pulsar/managers/PulsarBlueprintManager.ts",".././src/pulsar/managers/PulsarCIManager.ts",".././src/pulsar/managers/PulsarCodeManager.ts",".././src/pulsar/managers/PulsarConfigurationManager.ts",".././src/pulsar/managers/PulsarExporterManager.ts",".././src/pulsar/managers/generators/PulsarExporterConfigFileGenerator.ts",".././src/pulsar/managers/generators/PulsarExporterJSONGenerator.ts",".././src/pulsar/managers/generators/PulsarExporterSourceFileGenerator.ts",".././src/pulsar/managers/generators/PulsarExporterZIPGenerator.ts",".././src/pulsar/managers/generators/PulsarFileGenerator.ts",".././src/pulsar/managers/loaders/PulsarBaseLoader.ts",".././src/pulsar/managers/loaders/local/PulsarFSLoader.ts",".././src/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.ts",".././src/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.ts",".././src/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.ts",".././src/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.ts",".././src/pulsar/managers/validators/PulsarExporterConfigFileValidator.ts",".././src/tools/Logger.ts","../../language/src/blueprints/Blueprint.ts","../../language/src/blueprints/BlueprintConfiguration.ts","../../language/src/blueprints/BlueprintFactory.ts","../../language/src/configuration/KeywordsFlows.ts","../../language/src/configuration/KeywordsFunctions.ts","../../language/src/configuration/KeywordsTranformers.ts","../../language/src/debugger/Debugger.ts","../../language/src/debugger/DebuggerErrorBuilder.ts","../../language/src/debugger/DebuggerErrors.ts","../../language/src/exports.ts","../../language/src/extensions/dsm/DSMBridge.ts","../../language/src/extensions/dsm/DSMExecutionContext.ts","../../language/src/extensions/dsm/configuration/DSMKeywordsFunctions.ts","../../language/src/extensions/dsm/functions/DSMFunctionAllThemes.ts","../../language/src/extensions/dsm/functions/assets/DSMFunctionAllAssets.ts","../../language/src/extensions/dsm/functions/assets/DSMFunctionAllBitmapAssets.ts","../../language/src/extensions/dsm/functions/assets/DSMFunctionAllFontAssets.ts","../../language/src/extensions/dsm/functions/assets/DSMFunctionAssetById.ts","../../language/src/extensions/dsm/functions/components/DSMFunctionAllComponents.ts","../../language/src/extensions/dsm/functions/components/DSMFunctionComponentById.ts","../../language/src/extensions/dsm/functions/dsms/DSMFunctionAllVersions.ts","../../language/src/extensions/dsm/functions/dsms/DSMFunctionMetadata.ts","../../language/src/extensions/dsm/functions/dsms/DSMFunctionVersionById.ts","../../language/src/extensions/dsm/functions/fonts/DSMFunctionFontIsItalic.ts","../../language/src/extensions/dsm/functions/fonts/DSMFunctionFontWeight.ts","../../language/src/extensions/dsm/functions/groups/DSMFunctionAllComponentGroups.ts","../../language/src/extensions/dsm/functions/groups/DSMFunctionAllTokenGroups.ts","../../language/src/extensions/dsm/functions/sandbox/DSMFunctionSandboxDataByComponentId.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionAllColorTokens.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionAllFontTokens.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionAllGradientTokens.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionAllImageTokens.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionAllMeasureTokens.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionAllRadiusTokens.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionAllShadowTokens.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionAllTokens.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionAllTypographyTokens.ts","../../language/src/extensions/dsm/functions/tokens/DSMFunctionTokenById.ts","../../language/src/extensions/dsm/resolver/DSMFunctionResolveTheme.ts","../../language/src/extensions/dsm/resolver/DSMFunctionResolveTokens.ts","../../language/src/extensions/dsm/resolver/DSMResolver.ts","../../language/src/extensions/dsm/resolver/types.ts","../../language/src/index.ts","../../language/src/interpreter/ExecutionContext.ts","../../language/src/interpreter/Interpreter.ts","../../language/src/interpreter/InterpreterContext.ts","../../language/src/interpreter/emitters/BlueprintEmitter.ts","../../language/src/interpreter/emitters/EmittedContent.ts","../../language/src/interpreter/emitters/MemoryBlueprintEmitter.ts","../../language/src/interpreter/flows/Flow.ts","../../language/src/interpreter/flows/FlowIterator.ts","../../language/src/interpreter/flows/FlowOutput.ts","../../language/src/interpreter/flows/FlowSource.ts","../../language/src/interpreter/flows/specific/code/FlowCodeMerge.ts","../../language/src/interpreter/flows/specific/debug/FlowLog.ts","../../language/src/interpreter/flows/specific/emit/FlowEmit.ts","../../language/src/interpreter/flows/specific/function/FlowImport.ts","../../language/src/interpreter/flows/specific/function/FlowReturn.ts","../../language/src/interpreter/flows/specific/if/FlowElse.ts","../../language/src/interpreter/flows/specific/if/FlowElseIf.ts","../../language/src/interpreter/flows/specific/if/FlowIf.ts","../../language/src/interpreter/flows/specific/inject/FlowInject.ts","../../language/src/interpreter/flows/specific/loops/FlowFor.ts","../../language/src/interpreter/flows/specific/loops/FlowMap.ts","../../language/src/interpreter/flows/specific/loops/FlowTraverse.ts","../../language/src/interpreter/flows/specific/switch/FlowCase.ts","../../language/src/interpreter/flows/specific/switch/FlowDefault.ts","../../language/src/interpreter/flows/specific/switch/FlowSwitch.ts","../../language/src/interpreter/flows/specific/var/FlowGlobal.ts","../../language/src/interpreter/flows/specific/var/FlowLet.ts","../../language/src/interpreter/flows/specific/var/FlowSet.ts","../../language/src/interpreter/flows/specific/var/FlowVar.ts","../../language/src/interpreter/functions/Function.ts","../../language/src/interpreter/functions/FunctionArgument.ts","../../language/src/interpreter/functions/specific/blueprints/FunctionCall.ts","../../language/src/interpreter/functions/specific/boolean/FunctionAnd.ts","../../language/src/interpreter/functions/specific/boolean/FunctionNot.ts","../../language/src/interpreter/functions/specific/boolean/FunctionOr.ts","../../language/src/interpreter/functions/specific/boolean/FunctionTernary.ts","../../language/src/interpreter/functions/specific/compare/FunctionEquals.ts","../../language/src/interpreter/functions/specific/compare/FunctionEqualsEmpty.ts","../../language/src/interpreter/functions/specific/compare/FunctionEqualsNonNull.ts","../../language/src/interpreter/functions/specific/compare/FunctionEqualsNull.ts","../../language/src/interpreter/functions/specific/compare/FunctionGreaterThan.ts","../../language/src/interpreter/functions/specific/compare/FunctionGreaterThanEquals.ts","../../language/src/interpreter/functions/specific/compare/FunctionLessThan.ts","../../language/src/interpreter/functions/specific/compare/FunctionLessThanEquals.ts","../../language/src/interpreter/functions/specific/init/FunctionNewArray.ts","../../language/src/interpreter/functions/specific/init/FunctionNewDate.ts","../../language/src/interpreter/functions/specific/init/FunctionNewDictionary.ts","../../language/src/interpreter/functions/specific/init/FunctionNewNull.ts","../../language/src/interpreter/functions/specific/init/FunctionNewNumber.ts","../../language/src/interpreter/functions/specific/init/FunctionNewString.ts","../../language/src/interpreter/functions/specific/network/FunctionNetworkGetAnonymous.ts","../../language/src/interpreter/functions/specific/random/FunctionRandomNumber.ts","../../language/src/interpreter/functions/specific/random/FunctionRandomNumericArray.ts","../../language/src/interpreter/functions/specific/random/FunctionRandomString.ts","../../language/src/interpreter/functions/specific/random/FunctionRandomStringArray.ts","../../language/src/interpreter/functions/specific/support/FunctionArraysToZippedMap.ts","../../language/src/interpreter/functions/specific/support/FunctionVarDefined.ts","../../language/src/interpreter/functions/specific/support/FunctionVarMutable.ts","../../language/src/interpreter/loaders/BlueprintLoader.ts","../../language/src/interpreter/loaders/MemoryBlueprintLoader.ts","../../language/src/interpreter/loggers/Logger.ts","../../language/src/interpreter/loggers/LoggerDefaultMessages.ts","../../language/src/interpreter/transformers/Transformer.ts","../../language/src/interpreter/transformers/TransformerArgument.ts","../../language/src/interpreter/transformers/specific/array/TransformerAppend.ts","../../language/src/interpreter/transformers/specific/array/TransformerAt.ts","../../language/src/interpreter/transformers/specific/array/TransformerConcat.ts","../../language/src/interpreter/transformers/specific/array/TransformerEnumerated.ts","../../language/src/interpreter/transformers/specific/array/TransformerFirst.ts","../../language/src/interpreter/transformers/specific/array/TransformerFrom.ts","../../language/src/interpreter/transformers/specific/array/TransformerJoin.ts","../../language/src/interpreter/transformers/specific/array/TransformerRandom.ts","../../language/src/interpreter/transformers/specific/array/TransformerRange.ts","../../language/src/interpreter/transformers/specific/array/TransformerReversed.ts","../../language/src/interpreter/transformers/specific/array/TransformerShuffled.ts","../../language/src/interpreter/transformers/specific/array/TransformerSorted.ts","../../language/src/interpreter/transformers/specific/array/TransformerUntil.ts","../../language/src/interpreter/transformers/specific/map/TransformerAdd.ts","../../language/src/interpreter/transformers/specific/map/TransformerAlwaysRootValue.ts","../../language/src/interpreter/transformers/specific/map/TransformerKeys.ts","../../language/src/interpreter/transformers/specific/map/TransformerValue.ts","../../language/src/interpreter/transformers/specific/map/TransformerValues.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerAbsolute.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerAddedBy.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerCeiled.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerDividedBy.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerFloored.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerMultipliedBy.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerNegative.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerPositive.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerRounded.ts","../../language/src/interpreter/transformers/specific/numeric/TransformerSubtractedBy.ts","../../language/src/interpreter/transformers/specific/shared/TransformerCount.ts","../../language/src/interpreter/transformers/specific/shared/TransformerFormatDate.ts","../../language/src/interpreter/transformers/specific/shared/TransformerIsArray.ts","../../language/src/interpreter/transformers/specific/shared/TransformerIsBool.ts","../../language/src/interpreter/transformers/specific/shared/TransformerIsDictionary.ts","../../language/src/interpreter/transformers/specific/shared/TransformerIsNull.ts","../../language/src/interpreter/transformers/specific/shared/TransformerIsNumber.ts","../../language/src/interpreter/transformers/specific/shared/TransformerIsString.ts","../../language/src/interpreter/transformers/specific/shared/TransformerToString.ts","../../language/src/interpreter/transformers/specific/string/TransformerCamelcased.ts","../../language/src/interpreter/transformers/specific/string/TransformerCapitalized.ts","../../language/src/interpreter/transformers/specific/string/TransformerContains.ts","../../language/src/interpreter/transformers/specific/string/TransformerDefault.ts","../../language/src/interpreter/transformers/specific/string/TransformerEquals.ts","../../language/src/interpreter/transformers/specific/string/TransformerEqualsTernary.ts","../../language/src/interpreter/transformers/specific/string/TransformerExtended.ts","../../language/src/interpreter/transformers/specific/string/TransformerLowercased.ts","../../language/src/interpreter/transformers/specific/string/TransformerPrefixed.ts","../../language/src/interpreter/transformers/specific/string/TransformerReplacing.ts","../../language/src/interpreter/transformers/specific/string/TransformerSlashDoubleQuotes.ts","../../language/src/interpreter/transformers/specific/string/TransformerSlashNewlines.ts","../../language/src/interpreter/transformers/specific/string/TransformerSlashSingleQuotes.ts","../../language/src/interpreter/transformers/specific/string/TransformerSnakecased.ts","../../language/src/interpreter/transformers/specific/string/TransformerSplit.ts","../../language/src/interpreter/transformers/specific/string/TransformerSplitExpr.ts","../../language/src/interpreter/transformers/specific/string/TransformerSubstring.ts","../../language/src/interpreter/transformers/specific/string/TransformerSuffixed.ts","../../language/src/interpreter/transformers/specific/string/TransformerTrimmingCharacter.ts","../../language/src/interpreter/transformers/specific/string/TransformerTrimmingSpaces.ts","../../language/src/interpreter/transformers/specific/string/TransformerUppercased.ts","../../language/src/interpreter/variables/Variable.ts","../../language/src/interpreter/variables/VariableContext.ts","../../language/src/parser/Tokenization/Concrete/ConcreteBuffer.ts","../../language/src/parser/Tokenization/Concrete/ConcreteParser.ts","../../language/src/parser/Tokenization/Concrete/ConcreteToken.ts","../../language/src/parser/Tokenization/Lexical/LexicalBuffer.ts","../../language/src/parser/Tokenization/Lexical/LexicalParser.ts","../../language/src/parser/Tokenization/Lexical/LexicalToken.ts","../../language/src/parser/errors/LanguageError.ts","../../language/src/parser/errors/LanguageErrorAnalysis.ts","../../language/src/parser/symbols/Symbol.ts","../../language/src/parser/symbols/SymbolBuffer.ts","../../language/src/parser/symbols/SymbolFactory.ts","../../language/src/parser/symbols/SymbolTable.ts","../../language/src/parser/symbols/SymbolType.ts","../../language/src/parser/syntax/SyntaxParser.ts","../../language/src/parser/syntax/SyntaxTree.ts","../../language/src/parser/syntax/nodes/SyntaxNode.ts","../../language/src/parser/syntax/nodes/SyntaxNodeFlow.ts","../../language/src/parser/syntax/nodes/SyntaxNodeGroup.ts","../../language/src/parser/syntax/nodes/SyntaxNodeSubstitution.ts","../../language/src/parser/syntax/nodes/SyntaxNodeText.ts","../../language/src/tools/autocomplete/AutocompleteEngine.ts","../../language/src/tools/autocomplete/BlueprintAutocompleteEngine.ts","../../language/src/tools/autocomplete/BlueprintSnippets.ts","../../language/src/tools/autocomplete/PlaceholderDisabledSnippetPool.ts","../../language/src/tools/autocomplete/PlaceholderEnabledSnippetPool.ts","../../language/src/tools/documentation/DeclarationBuilder.ts","../../language/src/tools/documentation/Doc.ts","../../language/src/tools/highlight/BlueprintHighlightEngine.ts","../../language/src/tools/highlight/BlueprintHighlightEngineState.ts","../../language/src/tools/highlight/HighlightEngine.ts","../../language/src/utils/FlowUtils.ts","../../language/src/utils/StringUtils.ts","../external \"axios\"","../external \"fs\"","../external \"jszip\"","../external \"lodash\"","../external \"lodash/fp\"","../external \"moment\"","../external \"parse-github-url\"","../external \"path\"","../external \"ts-dedent\"","../external \"util\"","../external \"uuid\"","../webpack/bootstrap","../webpack/startup"],"names":[],"mappings":";;;;;;;;;;;AAAA,EAAE;AACF,mBAAmB;AACnB,UAAU;AACV,EAAE;AACF,2BAA2B;AAC3B,oDAAoD;AACpD,EAAE;;;AAMF,6IAAuE;AACvE,+HAAiE;AACjE,yIAAsE;AAItE,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,iCAAiC;AAEjC,MAAa,cAAc;IAUzB,8GAA8G;IAC9G,gBAAgB;IAEhB,YAAY,aAAoC;QAC9C,IAAI,CAAC,aAAa,GAAG,aAAa;QAElC,kBAAkB;QAClB,IAAI,CAAC,YAAY,GAAG,IAAI,yCAAoB,CAAC,aAAa,CAAC;QAC3D,IAAI,CAAC,YAAY,GAAG,IAAI,yCAAoB,CAAC,aAAa,CAAC;QAC3D,IAAI,CAAC,UAAU,GAAG,IAAI,qCAAkB,CAAC,aAAa,CAAC;QACvD,IAAI,CAAC,KAAK,GAAG,WAAW,EAAC,QAAQ;IACnC,CAAC;IAED,8GAA8G;IAC9G,qBAAqB;IAErB,qBAAqB;QACnB,qEAAqE;QAErE,gCAAgC;QAChC,gFAAgF;QAChF,2DAA2D;QAC3D,wDAAwD;QACxD,yBAAyB;QACzB,OAAO,IAAI,OAAO,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;YACtC,IAAI,CAAC,YAAY;iBACd,sBAAsB,EAAE;iBACxB,IAAI,CAAC,GAAG,EAAE;gBACT,IAAI,CAAC,YAAY;qBACd,uBAAuB,EAAE;qBACzB,IAAI,CAAC,GAAG,EAAE;oBACT,IAAI,CAAC,UAAU;yBACZ,qBAAqB,EAAE;yBACvB,IA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E,GAAG,CAAC;YAC1D,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;gBACrB,eAAe;gBACf,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;aAC1B;iBAAM;gBACL,kBAAkB;gBAClB,OAAO,IAAI;aACZ;SACF;QAED,OAAO,GAAG;IACZ,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,GAAW,EAAE,IAAY,EAAE,OAAe;QACjE,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IACvE,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,MAAc;QACvC,OAAO,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACxD,CAAC;CACF;AAxgBD,kCAwgBC;;;;;;;;;;;AChhBD,mC;;;;;;;;;;ACAA,gC;;;;;;;;;;ACAA,mC;;;;;;;;;;ACAA,oC;;;;;;;;;;ACAA,uC;;;;;;;;;;ACAA,oC;;;;;;;;;;ACAA,8C;;;;;;;;;;ACAA,kC;;;;;;;;;;ACAA,uC;;;;;;;;;;ACAA,kC;;;;;;;;;;ACAA,kC;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UCrBA;UACA;UACA;UACA","file":"pulsar-core.js","sourcesContent":["//\n// ExportEngine.ts\n// Pulsar\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from './configuration/ExportConfiguration'\nimport { PCExportItemWriter } from './writing/writers/ExportItemWriter'\nimport { PCExportItemProducer } from './items/ExportItemProducer'\nimport { PCExportDataProducer } from './generation/ExportDataProducer'\nimport { PCExportWriterResponse } from './writing/requests/ExportWriterResponse'\nimport { PCExportWriterMemoryStore } from './writing/writers/memory/ExportWriterStore'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport class PCExportEngine {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n dataProducer: PCExportDataProducer\n itemProducer: PCExportItemProducer\n itemWriter: PCExportItemWriter\n configuration: PCExportConfiguration\n runId: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(configuration: PCExportConfiguration) {\n this.configuration = configuration\n\n // Create managers\n this.dataProducer = new PCExportDataProducer(configuration)\n this.itemProducer = new PCExportItemProducer(configuration)\n this.itemWriter = new PCExportItemWriter(configuration)\n this.runId = 'random-id' // TODO:\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Validation\n\n processExportValidate(): Promise<boolean> {\n // this.progressLogger.log(systemMessage: .validationStarted, id: \"\")\n\n // Validate the entire procedure\n // - It is possible to create data based on the configuration of custom exporter\n // - It is possible to convert raw data into write requests\n // - It is possible to write data into final destination\n // Validate data producer\n return new Promise((response, reject) => {\n this.dataProducer\n .validateCanProduceData()\n .then(() => {\n this.itemProducer\n .validateCanProduceItems()\n .then(() => {\n this.itemWriter\n .validateCanWriteItems()\n .then(() => {\n response(true)\n })\n .catch(error => {\n reject(error)\n })\n })\n .catch(error => {\n reject(error)\n })\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Export\n\n processExport(): Promise<PCExportWriterMemoryStore> {\n return new Promise<PCExportWriterMemoryStore>((resolve, reject) => {\n // Validate both writer, content producer and context loader whether they can produce items\n this.processExportValidate()\n .then(() => {\n // this.progressLogger.log(systemMessage: .validationFinished, id: \"\")\n // Validation successful, proceed with export\n this.processExportValidated()\n .then(() => {\n resolve(this.configuration.outputStore)\n })\n .catch(error => {\n // Export failed, error out\n reject(error)\n })\n })\n .catch(error => {\n // Validation failed, error out\n reject(error)\n })\n })\n }\n\n processExportValidated(): Promise<Array<PCExportWriterResponse>> {\n return new Promise<Array<PCExportWriterResponse>>((resolve, reject) => {\n // this.progressLogger.log(systemMessage: .exportStarted, id: \"\")\n\n // Generate data pieces out of the context / configuration using content producer\n this.dataProducer\n .produceData()\n .then(dataProducerResponses => {\n // Convert responses into items that have all the information to write them into their final destination\n this.itemProducer\n .produceItemsFromResponses(dataProducerResponses)\n .then(itemProducerResponses => {\n // Write items to their final destinations using one of the writers\n this.itemWriter\n .write(itemProducerResponses)\n .then(writerResponses => {\n resolve(writerResponses)\n })\n .catch(error => {\n // Write failed, reject\n reject(error)\n })\n })\n .catch(error => {\n // Item production failed, reject\n reject(error)\n })\n })\n .catch(error => {\n // Context generation failed, reject\n reject(error)\n })\n })\n }\n}\n","//\n// PCExportConfiguration.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from './../../model/exporters/Exporter'\nimport { PCLogger } from '../../tools/Logger'\nimport { DSMReferenceStore } from './../../model/dsm/DSMReferenceStore'\nimport { PCExportWriterMemoryStore } from './../writing/writers/memory/ExportWriterStore'\nimport { PLMemoryBlueprintEmitter, DSMBridge, DSMBridgeConfiguration, DSMExecutionContext } from '@pulsar/language'\nimport { PCBlueprintLoader } from '../loaders/BlueprintLoader'\nimport { PLLogger } from '@pulsar/language/interpreter/loggers/Logger'\nimport { PCPulsarExporterMode } from '../../pulsar/Pulsar'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCExportConfiguration {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n exporter: PCExporter\n exportMode: PCPulsarExporterMode\n logger: PCLogger\n\n dsmStore: DSMReferenceStore\n dsmBridgeConfig: DSMBridgeConfiguration\n\n outputStore: PCExportWriterMemoryStore\n outputPathPrefix: string = ''\n\n sandboxData: Object\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(\n exporter: PCExporter,\n logger: PCLogger,\n dsmStore: DSMReferenceStore,\n dsmBridgeConfig: DSMBridgeConfiguration,\n exportMode: PCPulsarExporterMode,\n sandboxData: Object\n ) {\n this.exporter = exporter\n this.exportMode = exportMode\n\n // Core output pipes\n this.logger = logger\n this.outputStore = new PCExportWriterMemoryStore()\n\n // DSM configuration\n this.dsmStore = dsmStore\n this.dsmBridgeConfig = dsmBridgeConfig\n\n // Sandbox data\n this.sandboxData = sandboxData\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n newExecutionContext(): DSMExecutionContext {\n // Create new loaders, emitters, loggers and bridge for execution of every source. Each request has its own separate execution context\n let blueprintLoader = new PCBlueprintLoader(this.exporter)\n let blueprintEmitter = new PLMemoryBlueprintEmitter(false)\n let logger = new PLLogger()\n let bridge = new DSMBridge(this.dsmBridgeConfig)\n\n // Retrieve context\n let context = new DSMExecutionContext(blueprintLoader, blueprintEmitter, logger, bridge, this.sandboxData)\n return context\n }\n}\n","//\n// PCExportDataProducer.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportDataQueue } from './queue/ExportDataQueue'\nimport { PCExportConfiguration } from '../configuration/ExportConfiguration'\nimport { PCExportDataResponse } from './requests/ExportDataResponse'\nimport { PCExportDataEmittedResponseProducer } from './requests/ExportDataEmittedResponseProducer'\nimport { PCExportDataPrimaryResponseProducer } from './requests/ExportDataPrimaryResponseProducer'\nimport { PCExporterMapBlueprint } from './../../model/maps/ExporterMapBlueprint'\nimport { PCExportDataRequest } from './requests/ExportDataRequest'\nimport { PCExportDataRequestProducer } from './requests/ExportDataRequestProducer'\nimport { PCPulsarExporterMode } from '../../pulsar/Pulsar'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --O- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataProducer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n configuration: PCExportConfiguration\n processingQueue: PCExportDataQueue\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(exportConfiguration: PCExportConfiguration) {\n this.configuration = exportConfiguration\n this.processingQueue = new PCExportDataQueue(exportConfiguration)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Validation\n\n validateCanProduceData(): Promise<void> {\n // It is always possible to produce data for now, no validation\n return new Promise((resolve, _) => {\n resolve()\n })\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content creation\n\n produceData(): Promise<Array<PCExportDataResponse>> {\n return new Promise((resolve, reject) => {\n // Create queue with all processed operations\n for (let map of this.configuration.exporter.outputs.values()) {\n // Filter generated results based on the mode of the exporter. Only allow maps that have appropriate target\n let skipGeneration = false\n let source = this.configuration.exporter.sourceByIdIgnoringExecutableExtension(map.invoke)\n if (!source) {\n throw `Output defines unknown source '${map.invoke}'`\n }\n\n switch (this.configuration.exportMode) {\n case PCPulsarExporterMode.ci:\n skipGeneration = !source.targetsCI\n break\n case PCPulsarExporterMode.docs:\n skipGeneration = !source.targetsDocumentation\n break\n case PCPulsarExporterMode.sandbox:\n skipGeneration = !source.targetsSandbox\n break\n }\n\n if (!skipGeneration) {\n let requests = this.generateRequestsForMap(map)\n this.processingQueue.addQueuedRequests(requests)\n }\n }\n\n // Process all items at once\n this.processingQueue\n .processQueue()\n .then(processedRequests => {\n let primaryResponses = this.generatePrimaryResponsesFromFinishedRequests(processedRequests)\n let emittedResponses = this.generateEmittedResponsesFromFinishedRequests(processedRequests)\n let result = primaryResponses.concat(emittedResponses)\n resolve(result)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Request processing\n\n generateRequestsForMap(map: PCExporterMapBlueprint): Array<PCExportDataRequest> {\n // Generate array of requests from the source-entry configuration\n let requestProducer = new PCExportDataRequestProducer(this.configuration)\n return requestProducer.produceRequestsForMap(map)\n }\n\n generatePrimaryResponsesFromFinishedRequests(requests: Array<PCExportDataRequest>): Array<PCExportDataResponse> {\n // Generate responses from finished requests. This generates content from primary response, but not potentially emitted files\n // Note: at this point, all requests will have the data, otherwise this is not called. No additional checks are neccessary\n let responseProducer = new PCExportDataPrimaryResponseProducer()\n return responseProducer.producePrimaryResponsesFromRequests(requests)\n }\n\n generateEmittedResponsesFromFinishedRequests(requests: Array<PCExportDataRequest>): Array<PCExportDataResponse> {\n // Generate responses from finished requests. This generates content from emitted responses but not from primary content\n // Note: at this point, all requests will have the data, otherwise this is not called. No additional checks are neccessary\n let responseProducer = new PCExportDataEmittedResponseProducer()\n return responseProducer.produceEmittedResponsesFromRequests(requests)\n }\n}\n","//\n// PCExportDataQueue.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportDataQueueOperation } from './ExportDataQueueOperation'\nimport { PCExportDataRequest } from '../requests/ExportDataRequest'\nimport { PCExportConfiguration } from './../../configuration/ExportConfiguration'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataQueue {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Delegation\n configuration: PCExportConfiguration\n\n // Queue\n waitingOperations: Array<PCExportDataQueueOperation>\n isLockedForChanges: boolean = false\n isFinished: boolean = false\n\n // Tracker\n requests: Array<PCExportDataRequest>\n requestsCompleted: number\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(configuration: PCExportConfiguration) {\n this.configuration = configuration\n this.waitingOperations = new Array<PCExportDataQueueOperation>()\n this.requests = new Array<PCExportDataRequest>()\n this.requestsCompleted = 0\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Queue management\n\n addQueuedRequest(request: PCExportDataRequest) {\n // Create operation\n let operation = new PCExportDataQueueOperation(request)\n\n // Add operation to queue\n this.requests.push(request)\n this.waitingOperations.push(operation)\n }\n\n addQueuedRequests(requests: Array<PCExportDataRequest>) {\n requests.forEach(r => {\n this.addQueuedRequest(r)\n })\n }\n\n clearQueue() {\n this.requestsCompleted = 0\n this.waitingOperations = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Processing\n\n processQueue(): Promise<Array<PCExportDataRequest>> {\n // Sort the files and add them to export buffer\n this.isLockedForChanges = true\n this.requestsCompleted = 0\n\n // Create new queue promise, processing all items at once\n return new Promise((resolve, reject) => {\n let queue = new Array<Promise<PCExportDataRequest>>()\n for (let operation of this.waitingOperations) {\n let promise = operation.processOperation()\n queue.push(promise)\n }\n\n // When one queue item fails, immediately cancel\n Promise.all(queue)\n .then(result => {\n resolve(result)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n}\n","//\n// PCExportDataQueueOperation.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportDataRequest } from '../requests/ExportDataRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataQueueOperation {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Delegation\n request: PCExportDataRequest\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(request: PCExportDataRequest) {\n this.request = request\n }\n\n processOperation(): Promise<PCExportDataRequest> {\n return new Promise((respond, reject) => {\n // Generate request data, then resolve the promise\n this.request\n .produceData()\n .then(response => {\n respond(response)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n}\n","//\n// PCExportDataEmittedResponseProducer.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\nimport { PCExportDataRequest } from './ExportDataRequest'\nimport { PCExportDataResponse } from './ExportDataResponse'\nimport { PCExportDataRequestDataStore } from './ExportDataRequestDataStore'\nimport { PCExportDataRequestNameStore } from './ExportDataRequestNameStore'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataEmittedResponseProducer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Response production\n\n produceEmittedResponsesFromRequests(requests: Array<PCExportDataRequest>): Array<PCExportDataResponse> {\n let result: Array<PCExportDataResponse> = []\n for (let request of requests) {\n let responses = this.produceEmittedResponsesFromRequest(request)\n for (let response of responses) {\n result.push(response)\n }\n }\n\n return result\n }\n\n produceEmittedResponsesFromRequest(request: PCExportDataRequest): Array<PCExportDataResponse> {\n let responses: Array<PCExportDataResponse> = []\n\n // Create response for each emitted content - each emitted content produces exactly one file\n for (let emittedContent of request.emittedContent) {\n let filename = emittedContent.filename\n let content = emittedContent.content\n\n // Create data and name store from the emitted data\n let dataStore = PCExportDataRequestDataStore.storeWithPlainData(content)\n let nameStore = PCExportDataRequestNameStore.storeWithResolvedName(filename)\n let response = new PCExportDataResponse(request, request.map, dataStore, nameStore, [])\n responses.push(response)\n }\n\n return responses\n }\n}\n","//\n// PCExportDataPrimaryResponseProducer.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportDataResponse } from './ExportDataResponse'\nimport { PCExportDataRequest } from './ExportDataRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataPrimaryResponseProducer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Response production\n\n producePrimaryResponsesFromRequests(requests: Array<PCExportDataRequest>): Array<PCExportDataResponse> {\n let responses: Array<PCExportDataResponse> = []\n for (let request of requests) {\n let response = this.producePrimaryResponseFromRequest(request)\n responses.push(response)\n }\n\n return responses\n }\n\n producePrimaryResponseFromRequest(request: PCExportDataRequest): PCExportDataResponse {\n let response = new PCExportDataResponse(\n request,\n request.map,\n request.dataStore,\n request.nameStore,\n request.emittedContent\n )\n return response\n }\n}\n","//\n// PCExportDataRequest.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '../../configuration/ExportConfiguration'\nimport { PCExporterMapBlueprint } from './../../../model/maps/ExporterMapBlueprint'\nimport { PCExportDataRequestDataStore } from './ExportDataRequestDataStore'\nimport { PCExportDataRequestNameStore } from './ExportDataRequestNameStore'\nimport { PLEmittedContent } from '@pulsar/language'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequest {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Data store\n dataStore: PCExportDataRequestDataStore | null\n nameStore: PCExportDataRequestNameStore | null\n emittedContent: Array<PLEmittedContent> | null\n\n // Export definitions\n map: PCExporterMapBlueprint\n\n // Configuration\n configuration: PCExportConfiguration\n\n // States\n processingError: Error | null = null\n processingFinished: boolean = false\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(configuration: PCExportConfiguration, map: PCExporterMapBlueprint) {\n this.map = map\n this.configuration = configuration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n produceData(): Promise<PCExportDataRequest> {\n throw Error('Content must be produced by each individual subclass')\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Request handling\n\n requestSuccesfullGeneratingPlainData(\n plainData: any,\n nameData: Map<string, any>,\n emittedContent: Array<PLEmittedContent>\n ) {\n this.processingFinished = true\n this.dataStore = PCExportDataRequestDataStore.storeWithPlainData(plainData)\n this.nameStore = PCExportDataRequestNameStore.storeWithPlainData(nameData)\n this.emittedContent = emittedContent\n // this.responseHandler?(true, this.dataStore, emittedContent, nil)\n }\n\n requestSuccessfullGeneratingMultipartData(\n multipartData: Map<string, any>,\n multipartNameData: Map<string, Map<string, any>>,\n emittedContent: Array<PLEmittedContent>\n ) {\n this.processingFinished = true\n this.dataStore = PCExportDataRequestDataStore.storeWithMultipartData(multipartData)\n this.nameStore = PCExportDataRequestNameStore.storeWithMultipartData(multipartNameData)\n this.emittedContent = emittedContent\n // this.responseHandler?(true, this.dataStore, emittedContent, nil)\n }\n\n requestFailed(error: Error) {\n this.processingFinished = true\n this.processingError = error\n // this.responseHandler?(false, nil, [], error)\n }\n}\n","//\n// PCExportDataRequestDataStore.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nexport enum PCExportDataRequestDataStoreMode {\n plain,\n multipart\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestDataStore {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n plainDataKey: string = '_plain_data'\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n dataStore: Map<string, any>\n mode: PCExportDataRequestDataStoreMode\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n static storeWithPlainData(data: any): PCExportDataRequestDataStore {\n let store = new PCExportDataRequestDataStore(PCExportDataRequestDataStoreMode.plain)\n store.dataStore.set(store.plainDataKey, data)\n return store\n }\n\n static storeWithMultipartData(data: Map<string, any>): PCExportDataRequestDataStore {\n let store = new PCExportDataRequestDataStore(PCExportDataRequestDataStoreMode.multipart)\n store.dataStore = data\n return store\n }\n\n constructor(mode: PCExportDataRequestDataStoreMode) {\n this.mode = mode\n this.dataStore = new Map<string, any>()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Data retrieval\n\n /** Plain data. Note that if data was created using \"multipart\" mode, exception will be thrown */\n plainData(): any {\n if (this.mode === PCExportDataRequestDataStoreMode.multipart) {\n throw Error('Using plain data in multipart store is prohibited')\n }\n\n return this.dataStore.get(this.plainDataKey)\n }\n\n /** Multipart data. Note that is data was created using \"plain\" mode, this will still work. Use .plainDataKey property to access the stored data in that case */\n multipartData(): Map<string, any> {\n return this.dataStore\n }\n}\n","//\n// PCExportDataRequestNameStore.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nexport enum PCExportDataRequestNameStoreMode {\n plain,\n multipart,\n resolved\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestNameStore {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n plainDataKey: string = '_plain_data'\n resolvedDataKey: string = '_resolved_name'\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Data store\n nameStore: Map<string, Map<string, any>>\n mode: PCExportDataRequestNameStoreMode\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(mode: PCExportDataRequestNameStoreMode) {\n this.mode = mode\n this.nameStore = new Map<string, Map<string, any>>()\n }\n\n static storeWithResolvedName(name: string): PCExportDataRequestNameStore {\n let store = new PCExportDataRequestNameStore(PCExportDataRequestNameStoreMode.resolved)\n let data = new Map<string, any>()\n data.set(store.plainDataKey, name)\n store.nameStore.set(store.resolvedDataKey, data)\n\n return store\n }\n\n static storeWithPlainData(data: Map<string, any>): PCExportDataRequestNameStore {\n let store = new PCExportDataRequestNameStore(PCExportDataRequestNameStoreMode.plain)\n store.nameStore.set(store.plainDataKey, data)\n\n return store\n }\n\n static storeWithMultipartData(data: Map<string, any>): PCExportDataRequestNameStore {\n let store = new PCExportDataRequestNameStore(PCExportDataRequestNameStoreMode.multipart)\n store.nameStore = data\n\n return store\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Data retrieval\n\n /// Plain data. Note that if data was created using \"multipart\" mode, exception will be thrown\n plainData(): Map<string, any> {\n this.checkInCorrectMode(PCExportDataRequestNameStoreMode.plain)\n return this.nameStore.get(this.plainDataKey)\n }\n\n /// Multipart data. Note that is data was created using \"plain\" mode, this will still work. Use .plainDataKey property to\n multipartData(): Map<string, Map<string, any>> {\n this.checkInCorrectMode(PCExportDataRequestNameStoreMode.multipart)\n return this.nameStore\n }\n\n /// Resolved name. This is only available for mode \"resolved\" and signifies that store shouldn't be used for partial resolution but instead provides fully resolved data\n resolvedData(): string {\n this.checkInCorrectMode(PCExportDataRequestNameStoreMode.resolved)\n let resolvedStore = this.nameStore.get(this.resolvedDataKey)\n return resolvedStore.get(this.plainDataKey)\n }\n\n checkInCorrectMode(mode: PCExportDataRequestNameStoreMode): boolean {\n if (this.mode !== mode) {\n throw Error(`Using data mode ${mode} is prohibited in store that was created as ${this.mode}`)\n }\n\n return true\n }\n\n isPlain(): boolean {\n return this.mode === PCExportDataRequestNameStoreMode.plain\n }\n\n isMultipart(): boolean {\n return this.mode === PCExportDataRequestNameStoreMode.multipart\n }\n\n isResolved(): boolean {\n return this.mode === PCExportDataRequestNameStoreMode.resolved\n }\n}\n","//\n// ExportDataRequestProducer.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '../../configuration/ExportConfiguration'\nimport { PCExportDataRequest } from './ExportDataRequest'\nimport { PCExporterSourceContextType } from '../../../model/sources/ExporterSource'\nimport { PCExportDataRequestDSMComponent } from './specific/dsm/ExportDataRequestDSMComponent'\nimport { PCExportDataRequestDSMGeneric } from './specific/dsm/ExportDataRequestDSMGeneric'\nimport { PCExporterSource } from '../../../model/sources/ExporterSource'\nimport { PCExportDataRequestDSMTheme } from './specific/dsm/ExportDataRequestDSMTheme'\nimport { PCExportDataRequestDSMTokenGroup } from './specific/dsm/ExportDataRequestDSMTokenGroup'\nimport { PCExportDataRequestDSMComponentGroup } from './specific/dsm/ExportDataRequestDSMComponentGroup'\nimport { PCExportDataRequestDSMTokenType } from './specific/dsm/ExportDataRequestDSMTokenType'\nimport { PCExporterMapBlueprint } from '../../../model/maps/ExporterMapBlueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestProducer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n configuration: PCExportConfiguration\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(exportConfiguration: PCExportConfiguration) {\n this.configuration = exportConfiguration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Request creation\n\n produceRequestsForMap(map: PCExporterMapBlueprint): Array<PCExportDataRequest> {\n let sourceId = map.invoke\n let referencedSource = this.configuration.exporter.sourceByIdIgnoringExecutableExtension(sourceId)\n\n if (!referencedSource) {\n // throw SCPulsarExportDataProducerError.blueprintNotFound(entry.blueprintId ?? \"\")\n throw Error(`Source ${map.write_using ?? ''} defined inside output not found`)\n }\n\n switch (referencedSource.context) {\n case PCExporterSourceContextType.generic:\n case PCExporterSourceContextType.component:\n case PCExporterSourceContextType.componentGroup:\n case PCExporterSourceContextType.tokenType:\n case PCExporterSourceContextType.tokenGroup:\n case PCExporterSourceContextType.theme:\n return this.createExporterEntryDSMDataRequest(referencedSource, map)\n default:\n return []\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Request creation - Supernova loader\n\n createExporterEntryDSMDataRequest(source: PCExporterSource, map: PCExporterMapBlueprint): Array<PCExportDataRequest> {\n switch (source.context) {\n case PCExporterSourceContextType.generic:\n return this.createExporterEntryRequestsForDSMGenericOption(source, map)\n case PCExporterSourceContextType.component:\n return this.createExporterEntryRequestsForDSMComponentOption(source, map)\n case PCExporterSourceContextType.componentGroup:\n return this.createExporterEntryRequestsForDSMComponentGroupOption(source, map)\n case PCExporterSourceContextType.tokenGroup:\n return this.createExporterEntryRequestsForDSMTokenGroupOption(source, map)\n case PCExporterSourceContextType.tokenType:\n return this.createExporterEntryRequestsForDSMTokenTypeOption(source, map)\n case PCExporterSourceContextType.theme:\n return this.createExporterEntryRequestsForDSMThemeOption(source, map)\n default:\n return []\n }\n }\n\n createExporterEntryRequestsForDSMGenericOption(\n source: PCExporterSource,\n map: PCExporterMapBlueprint\n ): Array<PCExportDataRequest> {\n // Create new dsm-enabled execution context\n let executionContext = this.configuration.newExecutionContext() // TODO: Modify to accept DSM configuration\n\n // Create request\n let request = new PCExportDataRequestDSMGeneric(source, map, this.configuration, executionContext)\n return [request]\n }\n\n createExporterEntryRequestsForDSMComponentOption(\n source: PCExporterSource,\n map: PCExporterMapBlueprint\n ): Array<PCExportDataRequest> {\n // Get configuration\n let requests: Array<PCExportDataRequestDSMComponent> = []\n let components = this.configuration.dsmStore.executableComponents()\n\n // Generate N requests per number of components in the current dsm context from the store\n for (let component of components) {\n // Create execution context\n let executionContext = this.configuration.newExecutionContext()\n\n // Create request for specific component\n let request = new PCExportDataRequestDSMComponent(component, source, map, this.configuration, executionContext)\n requests.push(request)\n }\n\n return requests\n }\n\n createExporterEntryRequestsForDSMComponentGroupOption(\n source: PCExporterSource,\n map: PCExporterMapBlueprint\n ): Array<PCExportDataRequest> {\n // Get configuration\n let requests: Array<PCExportDataRequestDSMComponentGroup> = []\n let components = this.configuration.dsmStore.executableComponentGroups()\n\n // Generate N requests per number of components in the current dsm context from the store\n for (let component of components) {\n // Create execution context\n let executionContext = this.configuration.newExecutionContext()\n\n // Create request for specific component\n let request = new PCExportDataRequestDSMComponentGroup(\n component,\n source,\n map,\n this.configuration,\n executionContext\n )\n requests.push(request)\n }\n\n return requests\n }\n\n createExporterEntryRequestsForDSMTokenGroupOption(\n source: PCExporterSource,\n map: PCExporterMapBlueprint\n ): Array<PCExportDataRequest> {\n // Get configuration\n let requests: Array<PCExportDataRequestDSMTokenGroup> = []\n let tokenGroups = this.configuration.dsmStore.executableTokenGroups()\n\n // Generate N requests per number of components in the current dsm context from the store\n for (let tokenGroup of tokenGroups) {\n // Create execution context\n let executionContext = this.configuration.newExecutionContext()\n\n // Create request for specific component\n let request = new PCExportDataRequestDSMTokenGroup(tokenGroup, source, map, this.configuration, executionContext)\n requests.push(request)\n }\n\n return requests\n }\n\n createExporterEntryRequestsForDSMThemeOption(\n source: PCExporterSource,\n map: PCExporterMapBlueprint\n ): Array<PCExportDataRequest> {\n // Get configuration\n let requests: Array<PCExportDataRequestDSMTheme> = []\n let themes = this.configuration.dsmStore.executableThemes()\n\n // Generate N requests per number of components in the current dsm context from the store\n for (let theme of themes) {\n // Create execution context\n let executionContext = this.configuration.newExecutionContext()\n\n // Create request for specific component\n let request = new PCExportDataRequestDSMTheme(theme, source, map, this.configuration, executionContext)\n requests.push(request)\n }\n\n return requests\n }\n\n createExporterEntryRequestsForDSMTokenTypeOption(\n source: PCExporterSource,\n map: PCExporterMapBlueprint\n ): Array<PCExportDataRequest> {\n // Get configuration\n let requests: Array<PCExportDataRequestDSMTokenType> = []\n let tokenTypes = this.configuration.dsmStore.executableTokenTypes()\n\n // Generate N requests per number of components in the current dsm context from the store\n for (let tokenType of tokenTypes) {\n // Create execution context\n let executionContext = this.configuration.newExecutionContext()\n\n // Create request for specific component\n let request = new PCExportDataRequestDSMTokenType(tokenType, source, map, this.configuration, executionContext)\n requests.push(request)\n }\n\n return requests\n }\n}\n","//\n// PCExportDataResponse.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportDataRequest } from './ExportDataRequest'\nimport { PCExporterMapBlueprint } from './../../../model/maps/ExporterMapBlueprint'\nimport { PCExportDataRequestDataStore } from './ExportDataRequestDataStore'\nimport { PCExportDataRequestNameStore } from './ExportDataRequestNameStore'\nimport { PLEmittedContent } from '@pulsar/language'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataResponse {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Response data\n dataStore: PCExportDataRequestDataStore\n nameStore: PCExportDataRequestNameStore\n emittedContent: Array<PLEmittedContent>\n\n // Definition data\n map: PCExporterMapBlueprint\n request: PCExportDataRequest\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(\n request: PCExportDataRequest,\n map: PCExporterMapBlueprint,\n dataStore: PCExportDataRequestDataStore,\n nameStore: PCExportDataRequestNameStore,\n emittedContent: Array<PLEmittedContent>\n ) {\n // Request\n this.request = request\n\n // Data stores\n this.dataStore = dataStore\n this.nameStore = nameStore\n this.emittedContent = emittedContent\n\n // Store entry\n this.map = map\n }\n}\n","//\n// PCExportDataRequestBlueprint.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '@pulsar/core/engine/configuration/ExportConfiguration'\nimport { PCExporterMapBlueprint } from '@pulsar/core/model/maps/ExporterMapBlueprint'\nimport { PCExporterSource } from '@pulsar/core/model/sources/ExporterSource'\nimport {\n PLBlueprintFactory,\n PLEmittedContent,\n PLExecutionContext,\n PLInterpreter,\n PLInterpreterContext,\n PLMemoryBlueprintEmitter\n} from '@pulsar/language'\nimport { PCExportDataRequest } from '../../ExportDataRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestBlueprint extends PCExportDataRequest {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n executionContext: PLExecutionContext\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(configuration: PCExportConfiguration, map: PCExporterMapBlueprint, executionContext: PLExecutionContext) {\n super(configuration, map)\n this.executionContext = executionContext\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Blueprint processing\n\n processBlueprintData(\n source: PCExporterSource,\n context: Map<string, any>,\n name: string | null\n ): Promise<{ data: any; emittedContext: Array<PLEmittedContent> }> {\n return new Promise(async (resolve, reject) => {\n try {\n if (name) {\n this.configuration.logger.logInfo(`Exporting source ${source.id} for ${name}`, '')\n } else {\n this.configuration.logger.logInfo(`Exporting source ${source.id}`, '')\n }\n\n // Create pulsar source from definition\n let definitionBlueprint = PLBlueprintFactory.blueprint(source.content, source.id, this.executionContext)\n\n // Render source\n let interpretingContext = new PLInterpreterContext(context)\n let interpreter = new PLInterpreter()\n let result = await interpreter.interpret(definitionBlueprint, interpretingContext, this.executionContext)\n\n // Get emitted content\n let emittedContent = (this.executionContext.blueprintEmitter as PLMemoryBlueprintEmitter).allEmittedContent()\n\n if (name) {\n this.configuration.logger.logInfo(`Finished exporting source ${source.id} for ${name}`, '')\n } else {\n this.configuration.logger.logInfo(`Finished exporting source ${source.id}`, '')\n }\n\n resolve({\n data: result,\n emittedContext: emittedContent\n })\n } catch (error) {\n this.logBlueprintProcessingFailure(error, source, name)\n reject(error)\n }\n })\n }\n\n logBlueprintProcessingFailure(error: Error, source: PCExporterSource, name: string | null) {\n let reason: string = error.message\n\n if (name) {\n this.configuration.logger.logError(`Export of source ${source.id} for ${name} failed`, '')\n } else {\n this.configuration.logger.logError(`Export of source ${source.id} failed`, '')\n }\n\n this.configuration.logger.logError(`Reason: ${reason}`, '')\n }\n}\n","//\n// ExportDataRequestDSMComponent.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '@pulsar/core/engine/configuration/ExportConfiguration'\nimport { DSMReferenceStoreEntry } from '@pulsar/core/model/dsm/DSMReferenceStore'\nimport { PCExporterMapBlueprint } from '@pulsar/core/model/maps/ExporterMapBlueprint'\nimport { PCExporterSource } from '@pulsar/core/model/sources/ExporterSource'\nimport { PLExecutionContext } from '@pulsar/language'\nimport { PCExportDataRequest } from '../../ExportDataRequest'\nimport { PCExportDataRequestBlueprint } from './ExportDataRequestBlueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestDSMComponent extends PCExportDataRequestBlueprint {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n source: PCExporterSource\n entry: DSMReferenceStoreEntry\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(\n entry: DSMReferenceStoreEntry,\n source: PCExporterSource,\n map: PCExporterMapBlueprint,\n configuration: PCExportConfiguration,\n executionContext: PLExecutionContext\n ) {\n super(configuration, map, executionContext)\n\n this.source = source\n this.entry = entry\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n produceData(): Promise<PCExportDataRequest> {\n // Create data context for source evaluation\n let context = new Map<string, any>()\n context.set('componentId', this.entry.id)\n\n // Process source\n return new Promise((resolve, reject) => {\n let debugName = `component ${this.entry.name ?? ''}`\n this.processBlueprintData(this.source, context, debugName)\n .then(result => {\n this.requestSuccesfullGeneratingPlainData(result.data, context, result.emittedContext)\n resolve(this)\n })\n .catch(error => {\n this.requestFailed(error)\n reject(error)\n })\n })\n }\n}\n","//\n// ExportDataRequestDSMComponentGroup.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '@pulsar/core/engine/configuration/ExportConfiguration'\nimport { DSMReferenceStoreEntry } from '@pulsar/core/model/dsm/DSMReferenceStore'\nimport { PCExporterMapBlueprint } from '@pulsar/core/model/maps/ExporterMapBlueprint'\nimport { PCExporterSource } from '@pulsar/core/model/sources/ExporterSource'\nimport { PLExecutionContext } from '@pulsar/language'\nimport { PCExportDataRequest } from '../../ExportDataRequest'\nimport { PCExportDataRequestBlueprint } from './ExportDataRequestBlueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestDSMComponentGroup extends PCExportDataRequestBlueprint {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n source: PCExporterSource\n entry: DSMReferenceStoreEntry\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(\n entry: DSMReferenceStoreEntry,\n source: PCExporterSource,\n map: PCExporterMapBlueprint,\n configuration: PCExportConfiguration,\n executionContext: PLExecutionContext\n ) {\n super(configuration, map, executionContext)\n\n this.source = source\n this.entry = entry\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n produceData(): Promise<PCExportDataRequest> {\n // Create data context for source evaluation\n let context = new Map<string, any>()\n context.set('groupId', this.entry.id)\n\n // Process source\n return new Promise((resolve, reject) => {\n let debugName = `component group ${this.entry.name ?? ''}`\n this.processBlueprintData(this.source, context, debugName)\n .then(result => {\n this.requestSuccesfullGeneratingPlainData(result.data, context, result.emittedContext)\n resolve(this)\n })\n .catch(error => {\n this.requestFailed(error)\n reject(error)\n })\n })\n }\n}\n","//\n// ExportDataRequestDSMGeneric.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '@pulsar/core/engine/configuration/ExportConfiguration'\nimport { PCExporterMapBlueprint } from '@pulsar/core/model/maps/ExporterMapBlueprint'\nimport { PCExporterSource } from '@pulsar/core/model/sources/ExporterSource'\nimport { PLExecutionContext } from '@pulsar/language'\nimport { PCExportDataRequest } from '../../ExportDataRequest'\nimport { PCExportDataRequestBlueprint } from './ExportDataRequestBlueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestDSMGeneric extends PCExportDataRequestBlueprint {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n source: PCExporterSource\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(\n source: PCExporterSource,\n map: PCExporterMapBlueprint,\n configuration: PCExportConfiguration,\n executionContext: PLExecutionContext\n ) {\n super(configuration, map, executionContext)\n\n this.source = source\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n produceData(): Promise<PCExportDataRequest> {\n // Create data context for source evaluation\n let context = new Map<string, any>()\n\n // Process source\n return new Promise((resolve, reject) => {\n this.processBlueprintData(this.source, context, null)\n .then(result => {\n this.requestSuccesfullGeneratingPlainData(result.data, context, result.emittedContext)\n resolve(this)\n })\n .catch(error => {\n this.requestFailed(error)\n reject(error)\n })\n })\n }\n}\n","//\n// ExportDataRequestDSMTheme.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '@pulsar/core/engine/configuration/ExportConfiguration'\nimport { DSMReferenceStoreEntry } from '@pulsar/core/model/dsm/DSMReferenceStore'\nimport { PCExporterMapBlueprint } from '@pulsar/core/model/maps/ExporterMapBlueprint'\nimport { PCExporterSource } from '@pulsar/core/model/sources/ExporterSource'\nimport { PLExecutionContext } from '@pulsar/language'\nimport { PCExportDataRequest } from '../../ExportDataRequest'\nimport { PCExportDataRequestBlueprint } from './ExportDataRequestBlueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestDSMTheme extends PCExportDataRequestBlueprint {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n source: PCExporterSource\n entry: DSMReferenceStoreEntry\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(\n entry: DSMReferenceStoreEntry,\n source: PCExporterSource,\n map: PCExporterMapBlueprint,\n configuration: PCExportConfiguration,\n executionContext: PLExecutionContext\n ) {\n super(configuration, map, executionContext)\n\n this.source = source\n this.entry = entry\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n produceData(): Promise<PCExportDataRequest> {\n // Create data context for source evaluation\n let context = new Map<string, any>()\n context.set('themeId', this.entry.id)\n\n // Process source\n return new Promise((resolve, reject) => {\n let debugName = `theme ${this.entry.name ?? ''}`\n this.processBlueprintData(this.source, context, debugName)\n .then(result => {\n this.requestSuccesfullGeneratingPlainData(result.data, context, result.emittedContext)\n resolve(this)\n })\n .catch(error => {\n this.requestFailed(error)\n reject(error)\n })\n })\n }\n}\n","//\n// ExportDataRequestDSMTokenGroup.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '@pulsar/core/engine/configuration/ExportConfiguration'\nimport { DSMReferenceStoreEntry } from '@pulsar/core/model/dsm/DSMReferenceStore'\nimport { PCExporterMapBlueprint } from '@pulsar/core/model/maps/ExporterMapBlueprint'\nimport { PCExporterSource } from '@pulsar/core/model/sources/ExporterSource'\nimport { PLExecutionContext } from '@pulsar/language'\nimport { PCExportDataRequest } from '../../ExportDataRequest'\nimport { PCExportDataRequestBlueprint } from './ExportDataRequestBlueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestDSMTokenGroup extends PCExportDataRequestBlueprint {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n source: PCExporterSource\n entry: DSMReferenceStoreEntry\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(\n entry: DSMReferenceStoreEntry,\n source: PCExporterSource,\n map: PCExporterMapBlueprint,\n configuration: PCExportConfiguration,\n executionContext: PLExecutionContext\n ) {\n super(configuration, map, executionContext)\n\n this.source = source\n this.entry = entry\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n produceData(): Promise<PCExportDataRequest> {\n // Create data context for source evaluation\n let context = new Map<string, any>()\n context.set('groupId', this.entry.id)\n\n // Process source\n return new Promise((resolve, reject) => {\n let debugName = `token group ${this.entry.name ?? ''}`\n this.processBlueprintData(this.source, context, debugName)\n .then(result => {\n this.requestSuccesfullGeneratingPlainData(result.data, context, result.emittedContext)\n resolve(this)\n })\n .catch(error => {\n this.requestFailed(error)\n reject(error)\n })\n })\n }\n}\n","//\n// ExportDataRequestDSMTokenType.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '@pulsar/core/engine/configuration/ExportConfiguration'\nimport { DSMReferenceStoreEntry } from '@pulsar/core/model/dsm/DSMReferenceStore'\nimport { PCExporterMapBlueprint } from '@pulsar/core/model/maps/ExporterMapBlueprint'\nimport { PCExporterSource } from '@pulsar/core/model/sources/ExporterSource'\nimport { PLExecutionContext } from '@pulsar/language'\nimport { PCExportDataRequest } from '../../ExportDataRequest'\nimport { PCExportDataRequestBlueprint } from './ExportDataRequestBlueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportDataRequestDSMTokenType extends PCExportDataRequestBlueprint {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n source: PCExporterSource\n entry: DSMReferenceStoreEntry\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(\n entry: DSMReferenceStoreEntry,\n source: PCExporterSource,\n map: PCExporterMapBlueprint,\n configuration: PCExportConfiguration,\n executionContext: PLExecutionContext\n ) {\n super(configuration, map, executionContext)\n\n this.source = source\n this.entry = entry\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n produceData(): Promise<PCExportDataRequest> {\n // Create data context for source evaluation\n let context = new Map<string, any>()\n context.set('tokenTypeId', this.entry.id)\n\n // Process source\n return new Promise((resolve, reject) => {\n let debugName = `token type ${this.entry.name ?? ''}`\n this.processBlueprintData(this.source, context, debugName)\n .then(result => {\n this.requestSuccesfullGeneratingPlainData(result.data, context, result.emittedContext)\n resolve(this)\n })\n .catch(error => {\n this.requestFailed(error)\n reject(error)\n })\n })\n }\n}\n","//\n// PCExportItemProducer.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nimport { PCExportItemQueue } from './queue/ExportItemQueue'\nimport { PCExportConfiguration } from './../configuration/ExportConfiguration'\nimport { PCExportDataResponse } from '../generation/requests/ExportDataResponse'\nimport { PCExportItemRequest } from './requests/ExportItemRequest'\nimport { PCExportItemResponseProducer } from './requests/ExportItemResponseProducer'\nimport { PCExportItemResponse } from './requests/ExportItemResponse'\nimport { PCExportItemRequestProducer } from './requests/ExportItemRequestProducer'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItemProducer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n configuration: PCExportConfiguration\n processingQueue: PCExportItemQueue\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(exportConfiguration: PCExportConfiguration) {\n this.configuration = exportConfiguration\n this.processingQueue = new PCExportItemQueue(exportConfiguration)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Validation\n\n validateCanProduceItems(): Promise<void> {\n // It is always possible to produce items for now, no validation\n return new Promise((resolve, _) => {\n resolve()\n })\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content creation\n\n produceItemsFromResponses(responses: Array<PCExportDataResponse>): Promise<Array<PCExportItemResponse>> {\n return new Promise((resolve, reject) => {\n // Create queue with all processed operations\n for (let dataResponse of responses) {\n let requests = this.generateRequestsForDataResponse(dataResponse)\n this.processingQueue.addQueuedRequests(requests)\n }\n\n // Process all items at once\n this.processingQueue\n .processQueue()\n .then(processedRequests => {\n let responses = this.generateResponsesFromFinishedRequests(processedRequests)\n resolve(responses)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Request processing\n\n generateRequestsForDataResponse(dataResponse: PCExportDataResponse): Array<PCExportItemRequest> {\n // Generate array of requests from the source-entry configuration\n let requestProducer = new PCExportItemRequestProducer(this.configuration)\n return requestProducer.produceRequestsForDataResponse(dataResponse)\n }\n\n generateResponsesFromFinishedRequests(finishedRequests: Array<PCExportItemRequest>): Array<PCExportItemResponse> {\n // Gemerate array of items from processed requests - at this point, all requests should already have data\n let responseProducer = new PCExportItemResponseProducer()\n return responseProducer.produceResponsesFromRequests(finishedRequests)\n }\n}\n","//\n// PCExportItem.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporterMapBlueprint } from './../../../model/maps/ExporterMapBlueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItem {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n map: PCExporterMapBlueprint\n contentData: any\n nameData: Map<string, any>\n resolvedName: string | null\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(map: PCExporterMapBlueprint, contentData: any, nameData: Map<string, any>, resolvedName: string | null) {\n this.map = map\n this.contentData = contentData\n this.nameData = nameData\n\n // If resolved name is provided, .nameData is ignored\n this.resolvedName = resolvedName\n }\n}\n","//\n// PCExportItemBuilder.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportDataResponse } from '../../generation/requests/ExportDataResponse'\nimport { PCExportItem } from './ExportItem'\nimport { PCExportDataRequest } from './../../generation/requests/ExportDataRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItemBuilder {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Item building\n\n buildItemsUsingResponse(response: PCExportDataResponse): Array<PCExportItem> {\n // Build items based on the request type - some can produce just one item, some can be much more complex cases\n let request = response.request\n return this.buildBlueprintItemsUsingRequest(request, response)\n }\n\n buildBlueprintItemsUsingRequest(_request: PCExportDataRequest, response: PCExportDataResponse): Array<PCExportItem> {\n // Blueprints always produce just one item\n let contentData = response.dataStore.plainData()\n let nameData = response.nameStore.isPlain() ? response.nameStore.plainData() : new Map<string, any>()\n let resolvedName = response.nameStore.isResolved() ? response.nameStore.resolvedData() : null\n\n // Create and store data\n let item = new PCExportItem(response.map, contentData, nameData, resolvedName)\n return [item]\n }\n\n buildAssetItemsUsingRequest(_request: PCExportDataRequest, _response: PCExportDataResponse): Array<PCExportItem> {\n throw new Error('Unsupported type of request')\n }\n}\n","//\n// PCExportItemQueue.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportItemRequest } from './../requests/ExportItemRequest'\nimport { PCExportItemQueueOperation } from './ExportItemQueueOperation'\nimport { PCExportConfiguration } from './../../configuration/ExportConfiguration'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItemQueue {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Configuration\n configuration: PCExportConfiguration\n\n // Queue\n waitingOperations: Array<PCExportItemQueueOperation>\n isLockedForChanges: boolean = false\n isFinished: boolean = false\n\n // Tracker\n requests: Array<PCExportItemRequest>\n requestsCompleted: number\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(configuration: PCExportConfiguration) {\n this.configuration = configuration\n this.waitingOperations = new Array<PCExportItemQueueOperation>()\n this.requests = new Array<PCExportItemRequest>()\n this.requestsCompleted = 0\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Queue management\n\n addQueuedRequest(request: PCExportItemRequest) {\n // Create operation\n let operation = new PCExportItemQueueOperation(request)\n\n // Add operation to queue\n this.requests.push(request)\n this.waitingOperations.push(operation)\n }\n\n addQueuedRequests(requests: Array<PCExportItemRequest>) {\n requests.forEach(r => {\n this.addQueuedRequest(r)\n })\n }\n\n clearQueue() {\n this.requestsCompleted = 0\n this.waitingOperations = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Processing\n\n processQueue(): Promise<Array<PCExportItemRequest>> {\n // Sort the files and add them to export buffer\n this.isLockedForChanges = true\n this.requestsCompleted = 0\n\n // Create new queue promise, processing all items at once\n return new Promise((resolve, reject) => {\n let queue = new Array<Promise<PCExportItemRequest>>()\n for (let operation of this.waitingOperations) {\n let promise = operation.processOperation()\n queue.push(promise)\n }\n\n // When one queue item fails, immediately cancel\n Promise.all(queue)\n .then(_ => {\n resolve(this.requests)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n}\n","//\n// ExportItemQueueOperation.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportItemRequest } from './../requests/ExportItemRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItemQueueOperation {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Delegation\n request: PCExportItemRequest\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(request: PCExportItemRequest) {\n this.request = request\n }\n\n processOperation(): Promise<PCExportItemRequest> {\n return new Promise((respond, reject) => {\n // Generate request data, then resolve the promise\n this.request\n .produceItem()\n .then(_ => {\n respond(this.request)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n}\n","//\n// PCExportItemRequest.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportItemBuilder } from './../construction/ExportItemBuilder'\nimport { PCExportConfiguration } from './../../configuration/ExportConfiguration'\nimport { PCExportDataResponse } from './../../generation/requests/ExportDataResponse'\nimport { PCExportItem } from './../construction/ExportItem'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItemRequest {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Data\n items: Array<PCExportItem> | null = null\n error: Error | null = null\n dataResponse: PCExportDataResponse\n\n // Configuration\n configuration: PCExportConfiguration\n\n // States\n processingError: Error | null = null\n processingFinished: boolean = false\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(configuration: PCExportConfiguration, dataResponse: PCExportDataResponse) {\n this.dataResponse = dataResponse\n this.configuration = configuration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n produceItem(): Promise<Array<PCExportItem>> {\n // Create the items\n return new Promise((resolve, reject) => {\n try {\n // Create the item\n let builder = new PCExportItemBuilder()\n let items = builder.buildItemsUsingResponse(this.dataResponse)\n\n // Request successful\n this.requestSuccessful(items)\n resolve(items)\n } catch (error) {\n // Request successful\n this.requestFailed(error)\n reject(error)\n }\n })\n }\n\n cancel() {\n // Doesn't support cancellation\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Request handling\n\n requestSuccessful(items: Array<PCExportItem>) {\n this.processingFinished = true\n this.items = items\n }\n\n requestFailed(error: Error) {\n this.processingFinished = true\n this.processingError = error\n }\n}\n","import { PCExportDataResponse } from './../../generation/requests/ExportDataResponse'\n//\n// PCExportItemRequestProducer.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from './../../configuration/ExportConfiguration'\nimport { PCExportItemRequest } from './ExportItemRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItemRequestProducer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n configuration: PCExportConfiguration\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(exportConfiguration: PCExportConfiguration) {\n this.configuration = exportConfiguration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Request creation\n\n produceRequestsForDataResponse(dataResponse: PCExportDataResponse): Array<PCExportItemRequest> {\n // For now, only create one item request per one data response\n let request = new PCExportItemRequest(this.configuration, dataResponse)\n return [request]\n }\n}\n","//\n// PCExportItemResponse.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporterMapBlueprint } from './../../../model/maps/ExporterMapBlueprint'\nimport { PCExportItem } from './../construction/ExportItem'\nimport { PCExportItemRequest } from './ExportItemRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItemResponse {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Data\n item: PCExportItem\n map: PCExporterMapBlueprint\n request: PCExportItemRequest\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(item: PCExportItem, map: PCExporterMapBlueprint, request: PCExportItemRequest) {\n this.item = item\n this.map = map\n this.request = request\n }\n}\n","//\n// PCExportItemResponseProducer.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportItemRequest } from './ExportItemRequest'\nimport { PCExportItemResponse } from './ExportItemResponse'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItemResponseProducer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Response production\n\n produceResponsesFromRequests(requests: Array<PCExportItemRequest>): Array<PCExportItemResponse> {\n let responses: Array<PCExportItemResponse> = []\n for (let request of requests) {\n let requestResponses = this.produceResponseFromRequest(request)\n for (let response of requestResponses) {\n responses.push(response)\n }\n }\n\n return responses\n }\n\n produceResponseFromRequest(request: PCExportItemRequest): Array<PCExportItemResponse> {\n let responses: Array<PCExportItemResponse> = []\n for (let item of request.items ?? []) {\n let response = new PCExportItemResponse(item, item.map, request)\n responses.push(response)\n }\n\n return responses\n }\n}\n","//\n// BlueprintLoader.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from '@pulsar/core/model/exporters/Exporter'\nimport { PLBlueprint, PLBlueprintConfiguration, PLBlueprintFactory, PLExecutionContext } from '@pulsar/language'\nimport { PLBlueprintLoader } from '@pulsar/language/interpreter/loaders/BlueprintLoader'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCBlueprintLoader extends PLBlueprintLoader {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n exporter: PCExporter\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(exporter: PCExporter) {\n super()\n this.exporter = exporter\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Blueprint Loading\n\n loadBlueprint(\n blueprintId: string,\n executionContext: PLExecutionContext,\n configuration: PLBlueprintConfiguration\n ): PLBlueprint {\n let cachedBlueprint = this.cachedBlueprint(blueprintId)\n let containedBlueprint = this.exporter.sourceByIdIgnoringExecutableExtension(blueprintId)\n\n if (!cachedBlueprint && !containedBlueprint) {\n for (const bp of this.exporter.sources.values()) {\n if (bp.id === blueprintId) {\n blueprintId = bp.id\n break\n }\n }\n }\n\n return this.loadSourceForSourceId(blueprintId, executionContext, configuration)\n }\n\n loadSourceForSourceId(\n sourceId: string,\n executionContext: PLExecutionContext,\n configuration: PLBlueprintConfiguration\n ): PLBlueprint {\n // Use cached source if exists\n let cachedBlueprint = this.cachedBlueprint(sourceId)\n if (cachedBlueprint) {\n return cachedBlueprint\n }\n\n // Blueprint must be present in loader scope\n let containedBlueprint = this.exporter.sourceByIdIgnoringExecutableExtension(sourceId)\n if (!containedBlueprint) {\n throw Error(`Undefined source ${sourceId}`)\n }\n\n // Create new source, cache it and retrieve\n let source = PLBlueprintFactory.blueprint(containedBlueprint.content, sourceId, executionContext, configuration)\n this.cache(source, sourceId)\n return source\n }\n}\n","//\n// PCExportWriterQueue.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from './../../configuration/ExportConfiguration'\nimport { PCExportWriterQueueOperation } from './ExportWriterQueueOperation'\nimport { PCExportWriterRequest } from './../requests/ExportWriterRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportWriterQueue {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Configuration\n configuration: PCExportConfiguration\n\n // Queue\n waitingOperations: Array<PCExportWriterQueueOperation>\n isLockedForChanges: boolean = false\n isFinished: boolean = false\n\n // Tracker\n requests: Array<PCExportWriterRequest>\n requestsCompleted: number\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(configuration: PCExportConfiguration) {\n this.configuration = configuration\n\n this.waitingOperations = new Array<PCExportWriterQueueOperation>()\n this.requests = new Array<PCExportWriterRequest>()\n this.requestsCompleted = 0\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Queue management\n\n addQueuedRequest(request: PCExportWriterRequest) {\n // Create operation\n let operation = new PCExportWriterQueueOperation(request)\n\n // Add operation to queue\n this.requests.push(request)\n this.waitingOperations.push(operation)\n }\n\n addQueuedRequests(requests: Array<PCExportWriterRequest>) {\n requests.forEach(r => {\n this.addQueuedRequest(r)\n })\n }\n\n clearQueue() {\n this.requestsCompleted = 0\n this.waitingOperations = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Processing\n\n processQueue(): Promise<Array<PCExportWriterRequest>> {\n // Sort the files and add them to export buffer\n this.isLockedForChanges = true\n this.requestsCompleted = 0\n\n // Create new queue promise, processing all items at once\n return new Promise((resolve, reject) => {\n let queue = new Array<Promise<PCExportWriterRequest>>()\n for (let operation of this.waitingOperations) {\n let promise = operation.processOperation()\n queue.push(promise)\n }\n\n // When one queue item fails, immediately cancel\n Promise.all(queue)\n .then(_ => {\n resolve(this.requests)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n}\n","//\n// PCExportWriterQueueOperation.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportWriterRequest } from './../requests/ExportWriterRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportWriterQueueOperation {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Delegation\n request: PCExportWriterRequest\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(request: PCExportWriterRequest) {\n this.request = request\n }\n\n processOperation(): Promise<PCExportWriterRequest> {\n return new Promise((respond, reject) => {\n // Generate request data, then resolve the promise\n this.request\n .writeItem()\n .then(_ => {\n respond(this.request)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n}\n","//\n// PCExportWriterRequest.ts\n// Pulsar\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporterMapBlueprint } from './../../../model/maps/ExporterMapBlueprint'\nimport { PCExportConfiguration } from './../../configuration/ExportConfiguration'\nimport { PCExportItem } from './../../items/construction/ExportItem'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportWriterRequest {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Data\n item: PCExportItem\n map: PCExporterMapBlueprint\n\n // Configuration\n configuration: PCExportConfiguration\n\n // States\n processingError: Error | null = null\n processingFinished: boolean = false\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(configuration: PCExportConfiguration, item: PCExportItem, map: PCExporterMapBlueprint) {\n this.item = item\n this.map = map\n this.configuration = configuration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n writeItem(): Promise<PCExportItem> {\n throw Error('Content must be written by each individual subclass')\n }\n\n requestSuccesful(_: PCExportItem) {\n this.processingFinished = true\n }\n\n requestFailed(error: Error) {\n this.processingFinished = true\n this.processingError = error\n }\n}\n","//\n// PCExportWriterRequestProducer.ts\n// Pulsar\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportWriterRequest } from './ExportWriterRequest'\nimport { PCExportItemResponse } from './../../items/requests/ExportItemResponse'\nimport { PCExportConfiguration } from './../../configuration/ExportConfiguration'\nimport { PCExportWriterMemoryRequest } from './../writers/memory/ExportWriterMemoryRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportWriterRequestProducer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n configuration: PCExportConfiguration\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(configuration: PCExportConfiguration) {\n this.configuration = configuration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Request creation\n\n produceRequestsForItemResponse(response: PCExportItemResponse): Array<PCExportWriterRequest> {\n let request = new PCExportWriterMemoryRequest(this.configuration, response.item, response.map)\n return [request]\n }\n}\n","//\n// PCExportWriterResponse.ts\n// Pulsar\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportWriterRequest } from './ExportWriterRequest'\nimport { PCExporterMapBlueprint } from './../../../model/maps/ExporterMapBlueprint'\nimport { PCExportItem } from './../../items/construction/ExportItem'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportWriterResponse {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Data\n item: PCExportItem\n map: PCExporterMapBlueprint\n request: PCExportWriterRequest\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(request: PCExportWriterRequest, map: PCExporterMapBlueprint, item: PCExportItem) {\n this.item = item\n this.map = map\n this.request = request\n }\n}\n","//\n// ExportWriterResponseProducer.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportWriterResponse } from './ExportWriterResponse'\nimport { PCExportWriterRequest } from './ExportWriterRequest'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportWriterResponseProducer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Response production\n\n produceResponsesFromRequests(requests: Array<PCExportWriterRequest>): Array<PCExportWriterResponse> {\n let responses: Array<PCExportWriterResponse> = []\n for (let request of requests) {\n let response = this.produceResponseFromRequest(request)\n responses.push(response)\n }\n\n return responses\n }\n\n produceResponseFromRequest(request: PCExportWriterRequest): PCExportWriterResponse {\n let response = new PCExportWriterResponse(request, request.map, request.item)\n return response\n }\n}\n","//\n// PCExportItemWriter.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportWriterResponseProducer } from './../requests/ExportWriterResponseProducer'\nimport { PCExportWriterRequestProducer } from './../requests/ExportWriterRequestProducer'\nimport { PCExportWriterRequest } from './../requests/ExportWriterRequest'\nimport { PCExportWriterResponse } from './../requests/ExportWriterResponse'\nimport { PCExportItemResponse } from './../../items/requests/ExportItemResponse'\nimport { PCExportConfiguration } from './../../configuration/ExportConfiguration'\nimport { PCExportWriterQueue } from '../queue/ExportWriterQueue'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportItemWriter {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n configuration: PCExportConfiguration\n processingQueue: PCExportWriterQueue\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(exportConfiguration: PCExportConfiguration) {\n this.configuration = exportConfiguration\n this.processingQueue = new PCExportWriterQueue(exportConfiguration)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Validation\n\n validateCanWriteItems(): Promise<void> {\n // It is always possible to produce items for now, no validation\n return new Promise((resolve, _) => {\n resolve()\n })\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content creation\n\n write(itemResponses: Array<PCExportItemResponse>): Promise<Array<PCExportWriterResponse>> {\n return new Promise((resolve, reject) => {\n // Create queue with all processed operations\n for (let itemResponse of itemResponses) {\n let requests = this.generateRequestsForItemResponse(itemResponse)\n this.processingQueue.addQueuedRequests(requests)\n }\n\n // Process all items at once\n this.processingQueue\n .processQueue()\n .then(processedRequests => {\n let responses = this.generateResponsesFromFinishedRequests(processedRequests)\n resolve(responses)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Request processing\n\n generateRequestsForItemResponse(itemResponse: PCExportItemResponse): Array<PCExportWriterRequest> {\n // Generate array of requests from the source-entry configuration\n let requestProducer = new PCExportWriterRequestProducer(this.configuration)\n return requestProducer.produceRequestsForItemResponse(itemResponse)\n }\n\n generateResponsesFromFinishedRequests(finishedRequests: Array<PCExportWriterRequest>): Array<PCExportWriterResponse> {\n // Gemerate array of items from processed requests - at this point, all requests should already have data\n let responseProducer = new PCExportWriterResponseProducer()\n return responseProducer.produceResponsesFromRequests(finishedRequests)\n }\n}\n","//\n// PCExportWriterRuleProcessor.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLBlueprintFactory, PLInterpreter, PLInterpreterContext } from '@pulsar/language'\nimport { PCExportConfiguration } from '../../configuration/ExportConfiguration'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCExportWriterRuleProcessor {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n configuration: PCExportConfiguration\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(configuration: PCExportConfiguration) {\n this.configuration = configuration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n resolveDestinationURL(dynamicRule: string, data: Map<string, any>, root: string | null): Promise<string> {\n return new Promise((resolve, reject) => {\n // Process dynamic mapping rule using source engine\n let parsingExecutionContext = this.configuration.newExecutionContext()\n let source = PLBlueprintFactory.blueprint(dynamicRule, '', parsingExecutionContext)\n\n // Use default source configuration, with execution context providing context loader and access to SN functions\n let interpreter = new PLInterpreter()\n\n // Create replica of current execution context to avoid multi-threading issues\n let executionContext = this.configuration.newExecutionContext()\n interpreter\n .interpret(source, this.interpreterContext(data), executionContext)\n .then(resolvedRule => {\n // Append resolved url fragment to the base URL\n if (root) {\n let url = root + resolvedRule\n resolve(url)\n } else {\n resolve(resolvedRule)\n }\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n\n resolvedDestinationURL(staticRule: string, root: string | null): string {\n // Append resolved url fragment to the base URL\n if (root) {\n let url = root + staticRule\n return url\n } else {\n return staticRule\n }\n }\n\n interpreterContext(data: Map<string, any>): PLInterpreterContext {\n return new PLInterpreterContext(data)\n }\n}\n","//\n// PCExportWriterFileSystemRequest.swift\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportWriterRequest } from './../../requests/ExportWriterRequest'\nimport { PCExportItem } from './../../../items/construction/ExportItem'\nimport { PCExportWriterRuleProcessor } from './../ExportWriterRuleProcessor'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportWriterMemoryRequest extends PCExportWriterRequest {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content production\n\n writeItem(): Promise<PCExportItem> {\n return new Promise(async (respond, _) => {\n // Build the url to write to\n let processor = new PCExportWriterRuleProcessor(this.configuration)\n let destinationURL: string\n if (this.item.resolvedName) {\n destinationURL = processor.resolvedDestinationURL(this.item.resolvedName, this.configuration.outputPathPrefix)\n } else {\n if (this.item.map.write_to) {\n destinationURL = await processor.resolveDestinationURL(\n this.item.map.write_to,\n this.item.nameData,\n this.configuration.outputPathPrefix\n )\n } else if (this.item.map.write_using) {\n let source = this.configuration.exporter.sourceByIdIgnoringExecutableExtension(this.item.map.write_using)\n if (!source) {\n throw `Output defines unknown source '${this.item.map.write_using}'`\n }\n destinationURL = await processor.resolveDestinationURL(\n source.content,\n this.item.nameData,\n this.configuration.outputPathPrefix\n )\n } else {\n throw `Output needs to define one of 'write_to' or 'write_using'`\n }\n }\n\n // Log writing entry\n this.configuration.logger.logInfo(\n `Writing ${destinationURL.replace(this.configuration.outputPathPrefix, '')}`,\n ''\n )\n\n // Write the item to the destination\n this.configuration.outputStore.storeItem(this.item.contentData, destinationURL)\n\n // Respond with written item\n respond(this.item)\n })\n }\n}\n","//\n// PCExportWriterMemoryStore.swift\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Object definition\n\nexport class PCExportWriterMemoryStore {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n dataStore: Map<string, any>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {\n this.dataStore = new Map<string, any>()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content storage\n\n storeItem(item: any, path: string) {\n if (this.dataStore.get(path)) {\n throw Error(`Item already exists at path ${path}`)\n }\n\n this.dataStore.set(path, item)\n }\n}\n","// Pulsar core\nexport { PCPulsar } from './pulsar/Pulsar'\nexport { PCPulsarStaticAnalysis } from './pulsar/PulsarStaticAnalysis'\nexport { DSMReferenceStore } from './model/dsm/DSMReferenceStore'\n\n// Utilities\nexport { PCPulsarZIPGenerator } from './pulsar/managers/generators/PulsarExporterZIPGenerator'\nexport { PCPulsarExporterJSONGenerator } from './pulsar/managers/generators/PulsarExporterJSONGenerator'\nexport * from './pulsar/PulsarInterface'\n","export * from './exports'\n","//\n// DSMReferenceStore.ts\n// Pulsar\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\nimport { PCExporterSourceContextType } from '../sources/ExporterSource'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport type DSMReferenceStoreEntry = {\n id: string\n name: string\n}\n\nexport type DSMReferenceStoreModel = {\n components: Array<DSMReferenceStoreEntry>\n componentGroups: Array<DSMReferenceStoreEntry>\n tokenGroups: Array<DSMReferenceStoreEntry>\n tokenTypes: Array<DSMReferenceStoreEntry>\n themes: Array<DSMReferenceStoreEntry>\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport class DSMReferenceStore {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n components: Array<DSMReferenceStoreEntry>\n componentGroups: Array<DSMReferenceStoreEntry>\n tokenGroups: Array<DSMReferenceStoreEntry>\n tokenTypes: Array<DSMReferenceStoreEntry>\n themes: Array<DSMReferenceStoreEntry>\n contexts: Array<DSMReferenceStoreEntry>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(data: DSMReferenceStoreModel) {\n // No validation, as it is expected that data already have correct structure\n this.components = data.components\n this.componentGroups = data.componentGroups\n this.tokenGroups = data.tokenGroups\n this.tokenTypes = data.tokenTypes\n this.themes = data.themes\n\n // Add \"none\" key to arrays that are empty\n if (this.components.length === 0) {\n this.components.push(this.emptyState())\n }\n if (this.componentGroups.length === 0) {\n this.componentGroups.push(this.emptyState())\n }\n if (this.tokenGroups.length === 0) {\n this.tokenGroups.push(this.emptyState())\n }\n if (this.tokenTypes.length === 0) {\n this.tokenTypes.push(this.emptyState())\n }\n if (this.themes.length === 0) {\n this.themes.push(this.emptyState())\n }\n\n // Construct contexts statically\n this.contexts = [\n {\n id: PCExporterSourceContextType.generic,\n name: 'Generic'\n },\n {\n id: PCExporterSourceContextType.component,\n name: 'Components'\n },\n {\n id: PCExporterSourceContextType.componentGroup,\n name: 'Component Groups'\n },\n {\n id: PCExporterSourceContextType.tokenGroup,\n name: 'Token Group'\n },\n {\n id: PCExporterSourceContextType.tokenType,\n name: 'Token Type'\n },\n {\n id: PCExporterSourceContextType.theme,\n name: 'Themes'\n }\n ]\n }\n\n emptyState(): DSMReferenceStoreEntry {\n return {\n id: 'none',\n name: 'None'\n }\n }\n\n executableComponentGroups(): Array<DSMReferenceStoreEntry> {\n return this.retrieveFixingEmptyState(this.componentGroups)\n }\n\n executableComponents(): Array<DSMReferenceStoreEntry> {\n return this.retrieveFixingEmptyState(this.components)\n }\n\n executableTokenGroups(): Array<DSMReferenceStoreEntry> {\n return this.retrieveFixingEmptyState(this.tokenGroups)\n }\n\n executableTokenTypes(): Array<DSMReferenceStoreEntry> {\n return this.retrieveFixingEmptyState(this.tokenTypes)\n }\n\n executableThemes(): Array<DSMReferenceStoreEntry> {\n return this.retrieveFixingEmptyState(this.themes)\n }\n\n private retrieveFixingEmptyState(array: Array<DSMReferenceStoreEntry>): Array<DSMReferenceStoreEntry> {\n return this.arrayIsEmptyState(array) ? [] : array\n }\n\n private arrayIsEmptyState(array: Array<DSMReferenceStoreEntry>): boolean {\n if (array.length === 1 && array[0].id === 'none') {\n return true\n }\n\n return false\n }\n}\n","//\n// Exporter.ts\n// Pulsar\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporterSource } from '../sources/ExporterSource'\nimport { PCExporterMapBlueprint } from './../maps/ExporterMapBlueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport type PCExporterModel = {\n id: string\n name: string\n description: string\n author?: string\n organization?: string\n icon?: string\n homepage: string\n source_dir: string\n version: string\n\n config?: {\n sources?: string\n output?: string\n }\n\n engines?: {\n pulsar?: string\n supernova?: string\n }\n\n tags: Array<string>\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Exporter Object\n\nexport class PCExporter {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n id: string\n name: string\n description: string\n author: string | null\n organization: string | null\n icon: string | null\n homepage: string\n sourceDirectory: string\n version: string\n\n sourceConfigFilePath: string | null\n outputConfigFilePath: string | null\n\n pulsarEngineVersion: string | null\n supernovaEngineVersion: string | null\n\n tags: Array<string>\n\n // Loaded data (runtime)\n sources: Map<string, PCExporterSource>\n outputs: Array<PCExporterMapBlueprint>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(data: PCExporterModel) {\n this.applyConfiguration(data)\n\n this.sources = new Map<string, PCExporterSource>()\n this.outputs = new Array<PCExporterMapBlueprint>()\n }\n\n applyConfiguration(data: PCExporterModel) {\n // No validation, as it is expected that data already have correct structure\n this.id = data.id\n this.name = data.name\n this.description = data.description\n this.author = data.author ?? null\n this.organization = data.organization ?? null\n this.homepage = data.homepage ?? null\n this.icon = data.icon ?? null\n this.sourceDirectory = data.source_dir\n this.version = data.version\n this.tags = data.tags\n\n this.sourceConfigFilePath = data.config?.sources ?? null\n this.outputConfigFilePath = data.config?.output ?? null\n\n this.pulsarEngineVersion = data.engines?.pulsar ?? null\n this.supernovaEngineVersion = data.engines?.supernova ?? null\n }\n\n linkSources(sources: Array<PCExporterSource>) {\n for (let source of sources) {\n this.sources.set(source.id, source)\n }\n }\n\n linkOutputs(outputs: Array<PCExporterMapBlueprint>) {\n for (let output of outputs) {\n this.outputs.push(output)\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n sourceByIdIgnoringExecutableExtension(sourceId: string): PCExporterSource | null {\n // Make sure everything is referenced with proper extension, even if we say inject blueprint without it\n if (sourceId.endsWith('.pr')) {\n return this.sourceById(sourceId)\n } else {\n return this.sourceById(`${sourceId}.pr`)\n }\n // TODO: Javascript ignore\n }\n\n sourceById(sourceId: string): PCExporterSource | null {\n return this.sources.get(sourceId) ?? null\n }\n\n storeNewSource(source: PCExporterSource) {\n // Only add source if doesn't exist already\n if (this.sources.get(source.id)) {\n return\n }\n\n this.sources.set(source.id, source)\n }\n\n removeSource(source: PCExporterSource) {\n this.sources.delete(source.id)\n }\n\n removeSourceById(sourceId: string) {\n this.sources.delete(sourceId)\n }\n\n storeSources(sources: Array<PCExporterSource>) {\n sources.forEach(s => {\n this.storeNewSource(s)\n })\n }\n\n removeSources(sources: Array<PCExporterSource>) {\n sources.forEach(s => {\n this.removeSource(s)\n })\n }\n\n moveBlueprintSource(oldId: string, newId: string, newPath: string | null) {\n // Find if there is loaded source, otherwise, silently fail\n if (!this.sources.get(oldId)) {\n return\n }\n\n // Find the loaded source and re-assign it with new ID\n let sourceObject = this.sources.get(oldId)\n this.sources.delete(oldId)\n this.sources.set(newId, sourceObject)\n sourceObject.path = newPath\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Outputs\n\n removeOutputs() {\n this.outputs = []\n }\n}\n","//\n// ExporterMapBlueprint.ts\n// Pulsar\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport type PCExporterMapBlueprintModel = {\n invoke: string\n write_to?: string\n write_using?: string\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport class PCExporterMapBlueprint {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n invoke: string\n\n write_to: string | null\n write_using: string | null\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(data: PCExporterMapBlueprintModel) {\n // Construct base map entry\n this.invoke = data.invoke\n this.write_to = data.write_to ?? null\n this.write_using = data.write_using ?? null\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Serialization\n\n toObject(): PCExporterMapBlueprintModel {\n let data = {\n invoke: this.invoke\n }\n\n if (this.write_using) {\n data['write_using'] = this.write_using\n }\n\n if (this.write_to) {\n data['write_to'] = this.write_to\n }\n\n return data\n }\n}\n","//\n// Blueprint.ts\n// Pulsar\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport enum PCExporterSourceContextType {\n // General-purpose\n generic = 'generic',\n\n // Components\n component = 'component',\n componentGroup = 'componentGroup',\n\n // Tokens\n tokenType = 'tokenType',\n tokenGroup = 'tokenGroup',\n\n // Themes\n theme = 'theme'\n}\n\nexport type PCExporterBlueprintModel = {\n targets_ci?: boolean\n targets_sandbox?: boolean\n targets_documentation?: boolean\n\n context?: PCExporterSourceContextType\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Blueprint Object\n\nexport class PCExporterSource {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n id: string\n path: string\n\n targetsCI: boolean\n targetsSandbox: boolean\n targetsDocumentation: boolean\n\n context: PCExporterSourceContextType\n\n content: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(id: string, path: string | null, content: string) {\n this.id = id\n this.path = path ?? null // Null denotes root of the source directory\n this.content = content\n\n this.targetsCI = true\n this.targetsDocumentation = false\n this.targetsSandbox = false\n\n this.context = PCExporterSourceContextType.generic\n }\n\n loadBlueprintConfiguration(data: PCExporterBlueprintModel) {\n if ('targets_ci' in data) {\n this.targetsCI = data.targets_ci\n }\n if ('targets_sandbox' in data) {\n this.targetsSandbox = data.targets_sandbox\n }\n if ('targets_documentation' in data) {\n this.targetsDocumentation = data.targets_documentation\n }\n if (data.context) {\n this.context = data.context\n }\n }\n\n resetToDefault() {\n this.targetsCI = true\n this.targetsDocumentation = false\n this.targetsSandbox = false\n\n this.context = PCExporterSourceContextType.generic\n }\n}\n","//\n// PCPulsar.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from '../model/exporters/Exporter'\nimport {\n PCEngineExporterDetail,\n PCEngineExporterProcessingResult,\n PCPulsarInterface,\n PCEngineSourceDetail,\n PCEngineSourceProcessingResult\n} from './PulsarInterface'\nimport { PCPulsarExporterManager } from './managers/PulsarExporterManager'\nimport { PCPulsarCodeManager } from './managers/PulsarCodeManager'\nimport { PCPulsarCIManager } from './managers/PulsarCIManager'\nimport { PLHighlightEngineToken, DSMBridgeConfiguration } from '@pulsar/language'\nimport { PCPulsarExporterGitHubLoader } from './managers/loaders/remote/PulsarExporterGitHubLoader'\nimport { PCPulsarExporterJSONLoader } from './managers/loaders/memory/PulsarExporterJSONLoader'\nimport { PCExporterSource } from '../model/sources/ExporterSource'\nimport { DSMReferenceStore } from '../model/dsm/DSMReferenceStore'\nimport { PCPulsarExporterZIPLoader } from './managers/loaders/remote/PulsarExporterZIPLoader'\nimport { PCPulsarSourceManager } from './managers/PulsarBlueprintManager'\nimport { PCPulsarFSLoader } from './managers/loaders/local/PulsarFSLoader'\nimport { PCPulsarConfigurationManager } from './managers/PulsarConfigurationManager'\nimport {\n PLAutocompleteEngineApplicationResult,\n PLAutocompleteEngineSuggestion\n} from '@pulsar/language/tools/autocomplete/AutocompleteEngine'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport enum PCPulsarEngineState {\n waiting = 'waiting',\n loading = 'loading',\n ready = 'ready'\n}\n\nexport enum PCPulsarExporterMode {\n ci = 'ci',\n sandbox = 'sandbox',\n docs = 'docs'\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsar implements PCPulsarInterface {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n private state: PCPulsarEngineState\n private exporter: PCExporter\n\n private sourceManager: PCPulsarSourceManager\n private ciManager: PCPulsarCIManager\n private codeManager: PCPulsarCodeManager\n private exporterManager: PCPulsarExporterManager\n private configurationManager: PCPulsarConfigurationManager\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor() {\n this.state = PCPulsarEngineState.waiting\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Loading and instantiation\n\n /** Initiates Pulsar library from existing exporter. This is only for internal use (especially for tests) and doesn't validate integrity of the exporter, and shouldn't not be used in production! */\n async initiateWithExporter(exporter: PCExporter): Promise<PCEngineExporterDetail> {\n // Pre-init\n this.preInit()\n\n // Post-init\n this.postInit(exporter)\n\n return this.convertExporterToDetail(exporter)\n }\n\n /** Initiates Pulsar library from a local filepath. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */\n async initiateWithLocalURL(url: string): Promise<PCEngineExporterDetail> {\n // Pre-init\n this.preInit()\n\n // Load exporter using S3 signed URL\n let packageManager = new PCPulsarFSLoader(url)\n let exporter = await packageManager.initialize()\n\n // Post-init\n this.postInit(exporter)\n\n return this.convertExporterToDetail(exporter)\n }\n\n /** Initiates Pulsar library from remote S3 URL. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */\n async initiateWithPackageS3URL(s3URL: string): Promise<PCEngineExporterDetail> {\n // Pre-init\n this.preInit()\n\n // Load exporter using S3 signed URL\n let packageManager = new PCPulsarExporterZIPLoader(s3URL)\n let exporter = await packageManager.initialize()\n\n // Post-init\n this.postInit(exporter)\n\n return this.convertExporterToDetail(exporter)\n }\n\n /** Initiates Pulsar library from github URL. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */\n async initiateWithPackageGitHubURL(githubURL: string): Promise<PCEngineExporterDetail> {\n // Pre-init\n this.preInit()\n\n // Load exporter using S3 signed URL\n let packageManager = new PCPulsarExporterGitHubLoader(githubURL)\n let exporter = await packageManager.initialize()\n\n // Post-init\n this.postInit(exporter)\n\n return this.convertExporterToDetail(exporter)\n }\n\n /** Initiates Pulsar library from JSON blob or already parsed object. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package */\n async initiateWithPackageBlob(blob: Object | string): Promise<PCEngineExporterDetail> {\n // Pre-init\n this.preInit()\n\n // Load exporter using S3 signed URL\n let packageManager = new PCPulsarExporterJSONLoader(blob)\n let exporter = await packageManager.initialize()\n\n // Post-init\n this.postInit(exporter)\n\n return this.convertExporterToDetail(exporter)\n }\n\n private preInit() {\n // Validate that we didn't load the library just yet\n if (this.state !== PCPulsarEngineState.waiting) {\n throw Error(\n \"Can't instantiate Pulsar library for the second time. Create new instance to load different exporter.\"\n )\n }\n\n // Retrieve the exporter using the package manager\n this.state = PCPulsarEngineState.loading\n }\n\n private postInit(exporter: PCExporter) {\n // Configure all managers\n this.exporter = exporter\n this.sourceManager = new PCPulsarSourceManager(this.exporter)\n this.ciManager = new PCPulsarCIManager(this.exporter)\n this.codeManager = new PCPulsarCodeManager(this.exporter)\n this.exporterManager = new PCPulsarExporterManager(this.exporter)\n this.configurationManager = new PCPulsarConfigurationManager(this.exporter)\n\n // Retrieve exporter\n this.state = PCPulsarEngineState.ready\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Exporter manipulation\n\n /** Retrieve underlaying exporter object. Not to be used on the client, as it exposes other properties of exporter that are not to be consumed */\n getExporterBackingObject(): PCExporter {\n this.validateCanManipulateState()\n return this.exporter\n }\n\n /** Retrieve details about currently loaded exporter. Note that this only retrieves settings of the exporter, to request blueprints and mapping, use separate functions */\n getExporterDetail(): PCEngineExporterDetail {\n this.validateCanManipulateState()\n return this.convertExporterToDetail(this.exporterManager.getExporterDetail())\n }\n\n /** Update exporter name. Name must be non-empty and contain at least 6 characters */\n updateExporterName(name: string): PCEngineExporterDetail {\n this.validateCanManipulateState()\n return this.convertExporterToDetail(this.exporterManager.updateExporterName(name))\n }\n\n /** Update exporter description. Description must be non-empty and contain at least 20 characters */\n updateExporterDescription(description: string): PCEngineExporterDetail {\n this.validateCanManipulateState()\n return this.convertExporterToDetail(this.exporterManager.updateExporterDescription(description))\n }\n\n /** Update exporter version. Exporter version needs to follow standard major.minor.patch versioning. Patch is optional */\n updateExporterVersion(version: string): PCEngineExporterDetail {\n this.validateCanManipulateState()\n return this.convertExporterToDetail(this.exporterManager.updateExporterVersion(version))\n }\n\n /** Update exporter author. Author can be empty. If non-empty, only alpha-numerics are allowed */\n updateExporterAuthor(author: string | null): PCEngineExporterDetail {\n this.validateCanManipulateState()\n return this.convertExporterToDetail(this.exporterManager.updateExporterAuthor(author))\n }\n\n /** Update exporter homepage. Homepage can be empty. If non-empty, validates the URL */\n updateExporterHomepage(homepage: string): PCEngineExporterDetail {\n this.validateCanManipulateState()\n return this.convertExporterToDetail(this.exporterManager.updateExporterHomepage(homepage))\n }\n\n /** Update exporter icon. Not available at the moment */\n updateExporterIcon(icon: string): PCEngineExporterDetail {\n this.validateCanManipulateState()\n return this.convertExporterToDetail(this.exporterManager.updateExporterIcon(icon))\n }\n\n /** Update exporter tags. Each tag must consist of letters and numbers */\n updateExporterTags(tags: string[]): PCEngineExporterDetail {\n this.validateCanManipulateState()\n return this.convertExporterToDetail(this.exporterManager.updateExporterTags(tags))\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration files\n\n /** Get exporter configuration JSON */\n getExporterConfigurationJSON(): string {\n this.validateCanManipulateState()\n return this.configurationManager.getExporterConfigurationJSON()\n }\n\n /** Get source configuration JSON */\n getSourceConfigurationJSON(): string {\n this.validateCanManipulateState()\n return this.configurationManager.getSourceConfigurationJSON()\n }\n\n /** Get output configuration JSON */\n getOutputConfigurationJSON(): string {\n this.validateCanManipulateState()\n return this.configurationManager.getOutputConfigurationJSON()\n }\n\n /** Update exporter configuration JSON */\n updateExporterConfigurationJSON(content: string) {\n this.validateCanManipulateState()\n this.configurationManager.updateExporterConfigurationJSON(content)\n }\n\n /** Update source configuration JSON */\n updateSourceConfigurationJSON(content: string) {\n this.validateCanManipulateState()\n this.configurationManager.updateSourceConfigurationJSON(content)\n }\n\n /** Update output configuration JSON */\n updateOutputConfigurationJSON(content: string) {\n this.validateCanManipulateState()\n this.configurationManager.updateOutputConfigurationJSON(content)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Source manipulation\n\n /** Get all blueprints associated with loaded exporter */\n getSources(): Array<PCEngineSourceDetail> {\n this.validateCanManipulateState()\n return this.convertSourcesToDetails(this.sourceManager.getSources())\n }\n\n /** Get specific source associated with loaded exporter */\n getSourceById(blueprintId: string): PCEngineSourceDetail {\n this.validateCanManipulateState()\n return this.convertSourceToDetail(this.sourceManager.getSourceById(blueprintId))\n }\n\n /** Create new source for loaded exporter. Source comes with default name and code and uses generic context */\n createNewSource(): PCEngineSourceDetail {\n this.validateCanManipulateState()\n return this.convertSourceToDetail(this.sourceManager.createNewSource())\n }\n\n /** Delete specified source. Throws error when source is not found */\n deleteSourceById(blueprintId: string) {\n this.validateCanManipulateState()\n return this.sourceManager.deleteSourceById(blueprintId)\n }\n\n /** Update source location. Id must be non-empty and contain at least 3 characters. It must also be unique in scope of the entire exporter */\n updateSourceLocation(oldSourceId: string, newSourceId: string, newPath: string): PCEngineSourceDetail {\n this.validateCanManipulateState()\n return this.convertSourceToDetail(this.sourceManager.updateSourceLocation(oldSourceId, newSourceId, newPath))\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Context\n\n /** Get reference store containing description of all elements in the DSM, including all context categories */\n getDSMContextStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore> {\n this.validateCanManipulateState()\n return this.ciManager.getDSMContextStore(dsmBridgeConfig)\n }\n\n /** Get reference store containing description of all elements in the DSM, including all context categories. Note this can be called as static method to see the store content regardless of the exporter */\n static getDSMContextStoreStatic(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore> {\n return PCPulsarCIManager.fetchReferenceStoreStatic(dsmBridgeConfig)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Code editor\n\n /** Execute source code and retrieve the resulting code. This also retrieves any emitted extra files. Throws error when source is not found */\n async executeSourceById(\n blueprintId: string,\n dsmBridgeConfig: DSMBridgeConfiguration,\n contextKey: string,\n contextId: string\n ): Promise<PCEngineSourceProcessingResult> {\n await this.validateCanManipulateState()\n let result = await this.codeManager.executeSourceById(blueprintId, dsmBridgeConfig, contextKey, contextId)\n return result\n }\n\n /** Update source code definition. Overview can be empty. Throws error when source is not found */\n updateSourceCodeDefinitionForSourceId(sourceId: string, definition: string) {\n this.validateCanManipulateState()\n return this.codeManager.updateSourceCodeDefinitionForSourceId(sourceId, definition)\n }\n\n /** Suggest next characters, words or snippets to be inserted into pulsar code as user types */\n suggestNextFromSourceCode(\n code: string,\n selectionLocation: number,\n selectionLength: number\n ): Array<PLAutocompleteEngineSuggestion> {\n this.validateCanManipulateState()\n return this.codeManager.suggestNextFromSourceCode(code, selectionLocation, selectionLength)\n }\n\n /** Apply autocompletion result to specified pulsar code */\n applyAutocompletionResultToCode(\n code: string,\n selectionLocation: number,\n selectionLength: number,\n apply: PLAutocompleteEngineSuggestion\n ): PLAutocompleteEngineApplicationResult {\n this.validateCanManipulateState()\n return this.codeManager.applyAutocompletionResultToCode(code, selectionLocation, selectionLength, apply)\n }\n\n /** Compute highlight tokens for the provided pulsar code */\n suggestHighlightFromSourceCode(code: string): Array<PLHighlightEngineToken> {\n this.validateCanManipulateState()\n return this.codeManager.suggestHighlightFromSourceCode(code)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Server / CI support\n\n /** Serialize entire exporter into single javascript object. Returns object representation */\n getExporterBlob(): Object {\n this.validateCanManipulateState()\n return this.exporterManager.getExporterBlob()\n }\n\n /** Serialize entire exporter into single javascript object. Returns JSON-string representation */\n getExporterBlobJSONSerialized(): string {\n this.validateCanManipulateState()\n return this.exporterManager.getExporterBlobJSONSerialized()\n }\n\n /** Execute entire exporter and retrieve all files produced as a result of this export */\n async executeExporter(\n dsmBridgeConfig: DSMBridgeConfiguration,\n exportMode: PCPulsarExporterMode = PCPulsarExporterMode.ci\n ): Promise<PCEngineExporterProcessingResult> {\n await this.validateCanManipulateState()\n let result = await this.ciManager.executeExporter(dsmBridgeConfig, exportMode)\n return result\n }\n\n /** Execute exporter in sandbox mode for a specific component */\n async executeExporterForSingleSandboxedComponent(\n dsmBridgeConfig: DSMBridgeConfiguration,\n sandboxComponentId: string,\n serializedSandboxData: string\n ): Promise<PCEngineExporterProcessingResult> {\n await this.validateCanManipulateState()\n let result = await this.ciManager.executeExporterForSingleSandboxedComponent(\n dsmBridgeConfig,\n PCPulsarExporterMode.ci,\n sandboxComponentId,\n serializedSandboxData\n )\n return result\n }\n\n /** Retrieve intermediate output of exporter in progress */\n retrieveRunningExporterState(): PCEngineExporterProcessingResult | null {\n let result = this.ciManager.retrieveRunningExporterState()\n return result\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n private validateCanManipulateState(): Promise<void> {\n return new Promise((resolve, reject) => {\n if (this.state === PCPulsarEngineState.ready) {\n resolve()\n } else {\n if (this.state === PCPulsarEngineState.waiting) {\n reject(new Error('Unable to manipulate state because the exporter has to be loaded first'))\n } else if (this.state === PCPulsarEngineState.loading) {\n reject(new Error('Unable to manipulate state because the engine is currently loading an exporter'))\n } else {\n // Should never happen, only when extended\n reject(new Error('Unhandled manipulation state'))\n }\n }\n })\n }\n\n private convertExporterToDetail(exporter: PCExporter): PCEngineExporterDetail {\n let detail = new PCEngineExporterDetail()\n\n detail.id = exporter.id\n detail.name = exporter.name\n detail.description = exporter.description\n detail.author = exporter.author\n detail.organization = exporter.organization\n detail.homepage = exporter.homepage\n detail.source_dir = exporter.sourceDirectory\n detail.version = exporter.version\n detail.tags = exporter.tags\n detail.icon = exporter.icon\n\n detail.config = {\n sources: exporter.sourceConfigFilePath,\n output: exporter.outputConfigFilePath\n }\n\n detail.engines = {\n pulsar: exporter.pulsarEngineVersion,\n supernova: exporter.supernovaEngineVersion\n }\n\n return detail\n }\n\n private convertSourceToDetail(source: PCExporterSource): PCEngineSourceDetail {\n let detail = new PCEngineSourceDetail()\n detail.id = source.id\n detail.path = source.path\n\n detail.targetsCI = source.targetsCI\n detail.targetsSandbox = source.targetsSandbox\n detail.targetsDocumentation = source.targetsDocumentation\n\n detail.context = source.context\n detail.content = source.content\n\n return detail\n }\n\n private convertSourcesToDetails(blueprints: Array<PCExporterSource>): Array<PCEngineSourceDetail> {\n let convertedSources = new Array<PCEngineSourceDetail>()\n for (let source of blueprints) {\n convertedSources.push(this.convertSourceToDetail(source))\n }\n\n return convertedSources\n }\n}\n","//\n// PCPulsarInterface.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMBridgeConfiguration, PLHighlightEngineToken } from '@pulsar/language'\nimport { PLLogger } from '@pulsar/language/interpreter/loggers/Logger'\nimport {\n PLAutocompleteEngineSuggestion,\n PLAutocompleteEngineApplicationResult\n} from '@pulsar/language/tools/autocomplete/AutocompleteEngine'\nimport { DSMReferenceStore } from '..'\nimport { PCExporterSourceContextType } from '../model/sources/ExporterSource'\nimport { PCExporter } from './../model/exporters/Exporter'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n/** Exporter detail containing data about the currently loaded exporter */\nexport class PCEngineExporterDetail {\n id: string\n name: string\n description: string\n author?: string\n organization?: string\n homepage: string\n source_dir: string\n version: string\n icon?: string\n\n config?: {\n sources?: string\n output?: string\n }\n\n engines?: {\n pulsar?: string\n supernova?: string\n }\n\n tags: Array<string>\n}\n\n/** Source detail containing data about specific source including its code definition */\nexport class PCEngineSourceDetail {\n id: string\n path: string\n\n targetsCI: boolean\n targetsSandbox: boolean\n targetsDocumentation: boolean\n\n context: PCExporterSourceContextType\n\n content: string\n}\n\n/** Unique, computed file group */\nexport class PCEngineFileGroup {\n name: string\n path: string\n files: Array<PCEngineFileDescriptor>\n groups: Array<PCEngineFileGroup>\n\n constructor(name: string, path: string, files: Array<PCEngineFileDescriptor>, groups: Array<PCEngineFileGroup>) {\n this.name = name\n this.path = path\n this.files = files\n this.groups = groups\n }\n}\n\n// Export & Source processing\n/** Result of a specific run of a singular exporter. Also used to retrieve export in progress as a way to load files gradually as they are fed and written by the exporter */\nexport type PCEngineExporterProcessingResult = {\n exporterId: string\n runId: string\n state: PCEngineExporterState\n emittedFiles: Array<PCEngineFileDescriptor>\n rootGroup: PCEngineFileGroup\n}\n\n/** Result of a specific run of a singular source. Can optionally produce multiple files if emitter was used within the source */\nexport type PCEngineSourceProcessingResult = {\n sourceId: string\n logger: PLLogger\n producedContent: Array<PCEngineFileDescriptor>\n}\n\n/** Result of a specific run of a singular file map. Always produces one file because that file represents the generates the path to the file */\nexport type PCEngineMapProcessingResult = {\n mapId: string\n logger: PLLogger\n producedContent: Array<PCEngineFileDescriptor>\n}\n\n/** File descriptor for one specific file produced by either source, map generation or exporter run */\nexport type PCEngineFileDescriptor = {\n name: string\n path: string\n content: string\n source: 'primary' | 'emitter'\n type: 'string'\n}\n\nexport enum PCEngineExporterState {\n running = 'running',\n finished_success = 'finished_success',\n finished_failure = 'finished_failure'\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport interface PCPulsarInterface {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Loading and instantiation\n\n /** Initiates Pulsar library from existing exporter. This is only for internal use (especially for tests) and doesn't validate integrity of the exporter, and shouldn't not be used in production! */\n initiateWithExporter(exporter: PCExporter): Promise<PCEngineExporterDetail>\n\n /** Initiates Pulsar library from a local filepath. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */\n initiateWithLocalURL(url: string): Promise<PCEngineExporterDetail>\n\n /** Initiates Pulsar library from remote S3 URL. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */\n initiateWithPackageS3URL(s3URL: string): Promise<PCEngineExporterDetail>\n\n /** Initiates Pulsar library from github URL. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */\n initiateWithPackageGitHubURL(githubURL: string): Promise<PCEngineExporterDetail>\n\n /** Initiates Pulsar library from JSON blob or already parsed object. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package */\n initiateWithPackageBlob(blob: Object | string): Promise<PCEngineExporterDetail>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Exporter manipulation\n\n /** Retrieve underlaying exporter object. Not to be used on the client, as it exposes other properties of exporter that are not to be consumed */\n getExporterBackingObject(): PCExporter\n\n /** Retrieve details about currently loaded exporter. Note that this only retrieves settings of the exporter, to request Sources and mapping, use separate functions */\n getExporterDetail(): PCEngineExporterDetail\n\n /** Update exporter name. Name must be non-empty and contain at least 6 characters */\n updateExporterName(name: string): PCEngineExporterDetail\n\n /** Update exporter description. Overview must be non-empty and contain at least 20 characters */\n updateExporterDescription(description: string): PCEngineExporterDetail\n\n /** Update exporter version. Exporter version needs to follow standard major.minor.patch versioning. Patch is optional */\n updateExporterVersion(version: string): PCEngineExporterDetail\n\n /** Update exporter author. Author can be empty. If non-empty, only alpha-numerics are allowed */\n updateExporterAuthor(author: string | null): PCEngineExporterDetail\n\n /** Update exporter homepage. Homepage can be empty */\n updateExporterHomepage(homepage: string): PCEngineExporterDetail\n\n /** Update exporter icon. Not available at the moment and will throw */\n updateExporterIcon(icon: string): PCEngineExporterDetail\n\n /** Update exporter tags. Each tag must consist of letters and numbers */\n updateExporterTags(tags: string[]): PCEngineExporterDetail\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Source manipulation\n\n /** Get all Sources associated with loaded exporter. Note that Sources don't contain their code definitions, as those need to be requested separaterly */\n getSources(): Array<PCEngineSourceDetail>\n\n /** Get specific source associated with loaded exporter */\n getSourceById(sourceId: string): PCEngineSourceDetail\n\n /** Create new source for loaded exporter. Source comes with default name and code and uses generic context */\n createNewSource(): PCEngineSourceDetail\n\n /** Delete specified source. Throws error when source is not found */\n deleteSourceById(sourceId: string)\n\n /** Update source id. Id must be non-empty and contain at least 3 characters. It must also be unique in scope. Note that this also updates all maps that are referencing this source */\n updateSourceLocation(oldSourceId: string, newSourceId: string, newPath: string): PCEngineSourceDetail\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration files\n\n /** Get exporter configuration JSON */\n getExporterConfigurationJSON(): string\n\n /** Get source configuration JSON */\n getSourceConfigurationJSON(): string\n\n /** Get output configuration JSON */\n getOutputConfigurationJSON(): string\n\n /** Update exporter configuration JSON */\n updateExporterConfigurationJSON(content: string)\n\n /** Update source configuration JSON */\n updateSourceConfigurationJSON(content: string)\n\n /** Update output configuration JSON */\n updateOutputConfigurationJSON(content: string)\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Context\n\n /** Get reference store containing description of all elements in the DSM, including all context categories */\n getDSMContextStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Code editor\n\n /** Execute source code and retrieve the resulting code. This also retrieves any emitted extra files. Throws error when source is not found */\n executeSourceById(\n sourceId: string,\n dsmBridgeConfig: DSMBridgeConfiguration,\n contextKey: string,\n contextId: string\n ): Promise<PCEngineSourceProcessingResult>\n\n /** Update source code definition. Overview can be empty. Throws error when source is not found */\n updateSourceCodeDefinitionForSourceId(sourceId: string, definition: string)\n\n /** @deprecated Use PCPulsarStaticAnalysis instead. Suggest next characters, words or snippets to be inserted into pulsar code as user types */\n suggestNextFromSourceCode(\n code: string,\n selectionLocation: number,\n selectionLength: number\n ): Array<PLAutocompleteEngineSuggestion>\n\n /** @deprecated Use PCPulsarStaticAnalysis instead. Apply autocompletion result to specified pulsar code */\n applyAutocompletionResultToCode(\n code: string,\n selectionLocation: number,\n selectionLength: number,\n apply: PLAutocompleteEngineSuggestion\n ): PLAutocompleteEngineApplicationResult\n\n /** @deprecated Use PCPulsarStaticAnalysis instead. Compute highlight tokens for the provided pulsar code */\n suggestHighlightFromSourceCode(code: string): Array<PLHighlightEngineToken>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Server / CI support\n\n /** Serialize entire exporter into single javascript object. Returns object representation */\n getExporterBlob(): Object\n\n /** Serialize entire exporter into single javascript object. Returns JSON-string representation */\n getExporterBlobJSONSerialized(): string\n\n /** Execute entire exporter and retrieve all files produced as a result of this export */\n executeExporter(\n dsmBridgeConfig: DSMBridgeConfiguration,\n exportMode: string\n ): Promise<PCEngineExporterProcessingResult>\n\n /** Execute exporter in sandbox mode for a specific component */\n executeExporterForSingleSandboxedComponent(\n dsmBridgeConfig: DSMBridgeConfiguration,\n sandboxComponentId: string,\n serializedSandboxData: string\n ): Promise<PCEngineExporterProcessingResult>\n\n /** Retrieve intermediate output of exporter in progress */\n retrieveRunningExporterState(): PCEngineExporterProcessingResult | null\n}\n","//\n// PCPulsar.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport {\n DSMExecutionContext,\n PLBlueprintEmitter,\n DSMBridge,\n PLBlueprintFactory,\n PLHighlightEngineToken\n} from '@pulsar/language'\nimport { PLBlueprintLoader } from '@pulsar/language/interpreter/loaders/BlueprintLoader'\nimport { PLLogger } from '@pulsar/language/interpreter/loggers/Logger'\nimport { PLError } from '@pulsar/language/parser/errors/LanguageError'\nimport {\n PLAutocompleteEngineSuggestion,\n PLAutocompleteEngineApplicationResult\n} from '@pulsar/language/tools/autocomplete/AutocompleteEngine'\nimport { PCPulsarCodeManager } from './managers/PulsarCodeManager'\nimport { PCPulsarStaticAnalysisInterface } from './PulsarStaticAnalysisInterface'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport enum PCPulsarEngineState {\n waiting = 'waiting',\n loading = 'loading',\n ready = 'ready'\n}\n\nexport enum PCPulsarExporterMode {\n ci = 'ci',\n sandbox = 'sandbox',\n docs = 'docs'\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarStaticAnalysis implements PCPulsarStaticAnalysisInterface {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n private codeManager: PCPulsarCodeManager\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Code editor\n\n /** Run analysis and return errors if found, otherwise empty */\n analyzeBlueprintCode(code: string, sourceFileName: string): Array<PLError> {\n let context = new DSMExecutionContext(\n new PLBlueprintLoader(),\n new PLBlueprintEmitter(),\n new PLLogger(),\n new DSMBridge({\n accessToken: '',\n apiUrl: '',\n designSystemId: '',\n dsVersionId: '',\n apiVersion: '0.2'\n }),\n null\n )\n try {\n PLBlueprintFactory.blueprint(code, sourceFileName, context)\n return []\n } catch (error) {\n // TODO: Analyzer should return array of errors but right now will only return one\n // though the interface is at least stable and will work when we retrieve more\n return [error]\n }\n }\n\n /** Suggest next characters, words or snippets to be inserted into pulsar code as user types */\n suggestNextFromBlueprintCode(\n code: string,\n selectionLocation: number,\n selectionLength: number\n ): Array<PLAutocompleteEngineSuggestion> {\n return this.codeManager.suggestNextFromSourceCode(code, selectionLocation, selectionLength)\n }\n\n /** Apply autocompletion result to specified pulsar code */\n applyAutocompletionResultToCode(\n code: string,\n selectionLocation: number,\n selectionLength: number,\n apply: PLAutocompleteEngineSuggestion\n ): PLAutocompleteEngineApplicationResult {\n return this.codeManager.applyAutocompletionResultToCode(code, selectionLocation, selectionLength, apply)\n }\n\n /** Compute highlight tokens for the provided pulsar code */\n suggestHighlightFromBlueprintCode(code: string): Array<PLHighlightEngineToken> {\n return this.codeManager.suggestHighlightFromSourceCode(code)\n }\n}\n","//\n// PulsarSourceManager.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from './../../model/exporters/Exporter'\nimport { PCExporterSource } from '../../model/sources/ExporterSource'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarSourceManager {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n private exporter: PCExporter\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(exporter: PCExporter) {\n this.exporter = exporter\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Source manipulation\n\n /** Get all sources associated with loaded exporter. Note that sources don't contain their code definitions, as those need to be requested separaterly */\n getSources(): Array<PCExporterSource> {\n // Create true array, as every other approach returns some form of iterator\n let sourceStore = new Array<PCExporterSource>()\n for (let source of this.exporter.sources.values()) {\n sourceStore.push(source)\n }\n\n return sourceStore\n }\n\n /** Get specific source associated with loaded exporter */\n getSourceById(sourceId: string): PCExporterSource {\n for (let source of this.exporter.sources.values()) {\n if (source.id === sourceId) {\n return source\n }\n }\n\n throw new Error(`Unknown source ${sourceId}`)\n }\n\n /** Create new source for loaded exporter. Source comes with default name and code and uses generic context */\n createNewSource(): PCExporterSource {\n let count = this.exporter.sources.size\n let source = new PCExporterSource(`source${count + 1}.pr`, null, ``)\n\n this.exporter.storeNewSource(source)\n return source\n }\n\n /** Delete specified source. Throws error when source is not found */\n deleteSourceById(sourceId: string) {\n if (!this.exporter.sourceById(sourceId)) {\n throw Error(`Unknown source for deletion ${sourceId}`)\n }\n\n this.exporter.removeSourceById(sourceId)\n }\n\n /** Update source id. Id must be non-empty and contain at least 3 characters. It must also be unique in scope. Note that this also updates all maps that are referencing this source */\n updateSourceLocation(oldSourceId: string, newSourceId: string, newPath: string): PCExporterSource {\n // Find the source\n let source = this.exporter.sourceById(oldSourceId)\n if (!source) {\n throw Error(`Unknown source for update ${oldSourceId}`)\n }\n\n let sourceId = newSourceId.trim()\n if (sourceId.length < 3) {\n throw Error('Source id must be at least 3 letters long')\n }\n\n if (!sourceId.match(/^[0-9a-zA-Z._]+$/)) {\n throw Error('Source id must only contain letters, numbers, dots or underscores')\n }\n\n // Modify source id\n this.exporter.moveBlueprintSource(oldSourceId, newSourceId, newPath)\n return source\n }\n}\n","//\n// PulsarCIManager.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExportConfiguration } from '@pulsar/core/engine/configuration/ExportConfiguration'\nimport { PCExportEngine } from '@pulsar/core/engine/ExportEngine'\nimport { PCExportWriterMemoryStore } from '@pulsar/core/engine/writing/writers/memory/ExportWriterStore'\nimport { PCExporter } from '@pulsar/core/model/exporters/Exporter'\nimport { PCLogger } from '@pulsar/core/tools/Logger'\nimport { DSMBridge, DSMBridgeConfiguration } from '@pulsar/language'\nimport { DSMReferenceStore } from '../..'\nimport { PCPulsarExporterMode } from '../Pulsar'\nimport {\n PCEngineExporterProcessingResult,\n PCEngineExporterState,\n PCEngineFileDescriptor,\n PCEngineFileGroup\n} from '../PulsarInterface'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarCIManager {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n private exporter: PCExporter\n private currentExporterInstance: PCExportEngine | null\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(exporter: PCExporter) {\n this.exporter = exporter\n this.currentExporterInstance = null\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - CI support\n\n /** Execute entire exporter and retrieve all files produced as a result of this export */\n async executeExporter(\n dsmBridgeConfig: DSMBridgeConfiguration,\n exportMode: PCPulsarExporterMode\n ): Promise<PCEngineExporterProcessingResult> {\n // Fetch the reference store containing description of the entire dsm, with all its elements\n let store = await this.fetchReferenceStore(dsmBridgeConfig)\n\n // Configure export engine\n let logger = new PCLogger()\n let configuration = new PCExportConfiguration(this.exporter, logger, store, dsmBridgeConfig, exportMode, {})\n let pulsarEngine = new PCExportEngine(configuration)\n this.currentExporterInstance = pulsarEngine\n\n // Run the export and wait for results, processing all blueprints against all file maps\n let result = await pulsarEngine.processExport()\n\n // Convert results and ditch the current export instance\n let convertedResult = this.convertExportResultToPulsarResult(result, this.currentExporterInstance)\n this.currentExporterInstance\n\n return convertedResult\n }\n\n /** Execute entire exporter and retrieve all files produced as a result of this export */\n async executeExporterForSingleSandboxedComponent(\n dsmBridgeConfig: DSMBridgeConfiguration,\n exportMode: PCPulsarExporterMode,\n sandboxComponentId: string,\n serializedSandboxData: string\n ): Promise<PCEngineExporterProcessingResult> {\n // Fetch the reference store containing description of the entire dsm, with all its elements\n let store = await this.fetchReferenceStoreForSandboxedComponent(sandboxComponentId)\n\n // Configure export engine\n let logger = new PCLogger()\n let sandboxData = JSON.parse(serializedSandboxData)\n let configuration = new PCExportConfiguration(\n this.exporter,\n logger,\n store,\n dsmBridgeConfig,\n exportMode,\n sandboxData\n )\n let pulsarEngine = new PCExportEngine(configuration)\n this.currentExporterInstance = pulsarEngine\n\n // Run the export and wait for results, processing all blueprints against all file maps\n let result = await pulsarEngine.processExport()\n\n // Convert results and ditch the current export instance\n let convertedResult = this.convertExportResultToPulsarResult(result, this.currentExporterInstance)\n this.currentExporterInstance\n\n return convertedResult\n }\n\n /** Retrieve intermediate output of exporter in progress */\n retrieveRunningExporterState(): PCEngineExporterProcessingResult | null {\n if (this.currentExporterInstance !== null) {\n let store = this.currentExporterInstance.configuration.outputStore\n return this.convertExportResultToPulsarResult(store, this.currentExporterInstance)\n } else {\n return null\n }\n }\n\n /** Get reference store containing description of all elements in the DSM, including all context categories */\n async getDSMContextStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore> {\n return this.fetchReferenceStore(dsmBridgeConfig)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Context\n\n private convertExportResultToPulsarResult(\n sourceStore: PCExportWriterMemoryStore,\n exportEngine: PCExportEngine\n ): PCEngineExporterProcessingResult {\n let files = new Array<PCEngineFileDescriptor>()\n for (let [path, partialResult] of sourceStore.dataStore.entries()) {\n if (typeof partialResult === 'string') {\n let pathDescriptor = this.parseName(path)\n let fileDescriptor: PCEngineFileDescriptor = {\n name: pathDescriptor.fullname,\n path: pathDescriptor.path,\n content: partialResult,\n type: 'string',\n source: 'primary' // TODO: Decide whether it is a main invoked file or emitted\n }\n files.push(fileDescriptor)\n } else {\n throw new Error('Unsupported type of produced file for write')\n }\n }\n\n return {\n exporterId: this.exporter.id,\n runId: exportEngine.runId,\n emittedFiles: files,\n state: PCEngineExporterState.finished_success,\n rootGroup: this.computeRootFileGroupFromFiles(files)\n }\n }\n\n private parseName(\n fullPath: string\n ): {\n fullname: string\n name: string\n extension: string\n folder: string\n path\n } {\n // Only retrieve files that are .pr or .json\n // Modify filename by removing the first directory\n let components = fullPath.split('/')\n\n // Extract filename, extension and paths\n let filename = components[components.length - 1]\n let fullpath = components.join('/')\n\n // Extract directory\n components.pop()\n let directory = components.join('/')\n\n // Get extension and check whether it is correct format\n let nameParts = filename.split('.')\n let extension: string\n let name: string\n if (nameParts.length >= 2) {\n extension = nameParts[nameParts.length - 1]\n nameParts.pop()\n name = nameParts.join('.')\n } else {\n throw Error('Unable to properly parse output file')\n }\n\n return {\n fullname: filename,\n name: name,\n extension: extension,\n folder: directory,\n path: fullpath\n }\n }\n\n async fetchReferenceStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore> {\n let dsmBridge = new DSMBridge(dsmBridgeConfig)\n let result = await dsmBridge.getDSMDataFromEndpoint('bff/structure', null)\n\n // Construct store from the result\n let store = new DSMReferenceStore(result)\n return store\n }\n\n static async fetchReferenceStoreStatic(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore> {\n let dsmBridge = new DSMBridge(dsmBridgeConfig)\n let result = await dsmBridge.getDSMDataFromEndpoint('bff/structure', null)\n\n // Construct store from the result\n let store = new DSMReferenceStore(result)\n return store\n }\n\n async fetchReferenceStoreForSandboxedComponent(componentId: string): Promise<DSMReferenceStore> {\n // Construct store from the result\n let store = new DSMReferenceStore({\n components: [{ id: componentId, name: 'Sandboxed Component' }],\n componentGroups: [],\n tokenGroups: [],\n tokenTypes: [],\n themes: []\n })\n return store\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - File group computing\n\n private computeRootFileGroupFromFiles(files: Array<PCEngineFileDescriptor>): PCEngineFileGroup {\n // Create root group to which everything goes\n let rootGroup = new PCEngineFileGroup('Root', '/', [], [])\n let subgroups = new Map<string, PCEngineFileGroup>()\n let currentParent = rootGroup\n\n for (let file of files) {\n // Assign current parent as root\n currentParent = rootGroup\n\n // Compute all subpaths leading to certain path, for example path like /root/sub/sub will return following:\n // /root\n // /root/sub\n // /root/sub/sub\n let permutations = this.pathPermutations(file.path)\n\n if (permutations.length === 0) {\n // Assuming no directories, it belongs to the root group\n rootGroup.files.push(file)\n } else {\n // With directories, we go through each one, create it and we also create subgroup and link them proprly together\n // File is added to the last group\n for (let [index, permutation] of permutations.entries()) {\n let group = subgroups.get(permutation.path)\n if (group) {\n // Group exists, we do nothing except moving parent\n currentParent = group\n } else {\n // Group doesn't exist, we create one, assign it to parent and buffer\n group = new PCEngineFileGroup(permutation.lastComponent, permutation.path, [], [])\n currentParent.groups.push(group)\n subgroups.set(permutation.path, group)\n }\n\n if (index === permutations.length - 1) {\n // For last permutation, we add the file to it\n group.files.push(file)\n }\n }\n }\n }\n\n return rootGroup\n }\n\n private pathPermutations(path: string): Array<{ path: string; lastComponent: string }> {\n // Path always contains filename in our case, so we remove it\n let pathComponents = path.split('/')\n pathComponents.pop()\n\n let buffer = new Array<{ path: string; lastComponent: string }>()\n let stringBuffer = ''\n for (let component of pathComponents) {\n stringBuffer += `/${component}`\n buffer.push({\n path: stringBuffer,\n lastComponent: component\n })\n }\n\n return buffer\n }\n}\n","//\n// PulsarCodeManager.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCBlueprintLoader } from '@pulsar/core/engine/loaders/BlueprintLoader'\nimport { PCExporter } from '@pulsar/core/model/exporters/Exporter'\nimport { PCExporterSourceContextType } from '@pulsar/core/model/sources/ExporterSource'\nimport {\n DSMBridge,\n DSMBridgeConfiguration,\n DSMExecutionContext,\n PLAutocompleteBlueprintSnippets,\n PLBlueprint,\n PLBlueprintAutocompleteEngine,\n PLBlueprintEmitter,\n PLBlueprintFactory,\n PLBlueprintHighlightEngine,\n PLHighlightEngineToken,\n PLInterpreter,\n PLInterpreterContext,\n PLMemoryBlueprintEmitter\n} from '@pulsar/language'\nimport { PLBlueprintLoader } from '@pulsar/language/interpreter/loaders/BlueprintLoader'\nimport { PLLogger } from '@pulsar/language/interpreter/loggers/Logger'\nimport {\n PLAutocompleteEngineApplicationResult,\n PLAutocompleteEngineSuggestion\n} from '@pulsar/language/tools/autocomplete/AutocompleteEngine'\nimport { PCEngineFileDescriptor, PCEngineSourceProcessingResult } from './../PulsarInterface'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarCodeManager {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n private exporter: PCExporter\n private codeExecutionContext: DSMExecutionContext\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(exporter: PCExporter) {\n this.exporter = exporter\n\n // Context is not usable for actual execution, but provides data about all types of functions / flows etc. available in the system\n this.codeExecutionContext = new DSMExecutionContext(\n new PLBlueprintLoader(),\n new PLBlueprintEmitter(),\n new PLLogger(),\n new DSMBridge({\n accessToken: '',\n apiUrl: '',\n designSystemId: '',\n dsVersionId: '',\n apiVersion: '0.2'\n }),\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Code editor\n\n /** Execute source code and retrieve the resulting output. This also retrieves any emitted extra files. Throws error when source is not found */\n async executeSourceById(\n sourceId: string,\n dsmBridgeConfig: DSMBridgeConfiguration,\n contextKey: string,\n contextId: string\n ): Promise<PCEngineSourceProcessingResult> {\n //\n // Find the source\n let source = this.exporter.sourceById(sourceId)\n if (!source) {\n throw Error(`Unknown source to execute ${sourceId}`)\n }\n\n // Create context data\n let contextData = this.createContextData(contextKey, contextId)\n\n // Create execution context for the DSM access, with in-memory loaders and emitters\n let logger = new PLLogger()\n let loader = new PCBlueprintLoader(this.exporter)\n let emitter = new PLMemoryBlueprintEmitter(false)\n let configuredBridge = new DSMBridge(dsmBridgeConfig)\n\n let executionContext = new DSMExecutionContext(loader, emitter, logger, configuredBridge, null)\n\n // Parse sources using custom context with dsm functionality and execute\n let parsedSource = await this.parseSource(source.content, executionContext)\n let interpretedResult = await this.interpretSource(parsedSource, contextData, executionContext)\n\n // Generate file pack. In case of generated source, one file will be produced as primary and there can be additional files based on emitted content\n let producedPrimaryFile: PCEngineFileDescriptor = {\n name: 'Main',\n path: '',\n content: interpretedResult,\n source: 'primary',\n type: 'string'\n }\n\n let producedEmittedFiles: Array<PCEngineFileDescriptor> = new Array<PCEngineFileDescriptor>()\n for (let emittedResult of emitter.allEmittedContent()) {\n let producedEmittedFile: PCEngineFileDescriptor = {\n name: emittedResult.filename,\n path: '',\n content: emittedResult.content,\n source: 'emitter',\n type: 'string'\n }\n producedEmittedFiles.push(producedEmittedFile)\n }\n\n // Construct all information into result\n return {\n sourceId: sourceId,\n producedContent: [producedPrimaryFile, ...producedEmittedFiles],\n logger: logger\n }\n }\n\n /** Update source code definition. Content can be anything */\n updateSourceCodeDefinitionForSourceId(sourceId: string, definition: string) {\n // Find the source\n let source = this.exporter.sourceById(sourceId)\n if (!source) {\n throw Error(`Unknown source to update ${sourceId}`)\n }\n\n // Update the source definition. Note that even invalid definition should be saved, so we don't validate\n source.content = definition\n }\n\n /** Update source code definition. Overview can be empty. Throws error when source is not found */\n updateSourceLocation(oldSourceId: string, newSourceId: string, newPath: string) {\n // Find the source\n let source = this.exporter.sourceById(oldSourceId)\n if (!source) {\n throw Error(`Unknown source to update ${oldSourceId}`)\n }\n\n // Move it\n this.exporter.moveBlueprintSource(oldSourceId, newSourceId, newPath)\n }\n\n /** Suggest next characters, words or snippets to be inserted into pulsar code as user types */\n suggestNextFromSourceCode(\n code: string,\n selectionLocation: number,\n selectionLength: number\n ): Array<PLAutocompleteEngineSuggestion> {\n let suggestionEngine = new PLBlueprintAutocompleteEngine(this.codeExecutionContext)\n suggestionEngine.loadSnippets(new PLAutocompleteBlueprintSnippets().snippetPool())\n let suggestions = suggestionEngine.suggestNextBasedOnString(code, selectionLocation, selectionLength)\n return suggestions\n }\n\n /** Apply autocompletion result to specified pulsar code */\n applyAutocompletionResultToCode(\n code: string,\n selectionLocation: number,\n selectionLength: number,\n apply: PLAutocompleteEngineSuggestion\n ): PLAutocompleteEngineApplicationResult {\n let suggestionEngine = new PLBlueprintAutocompleteEngine(this.codeExecutionContext)\n let result = suggestionEngine.applySuggestion(apply, code, selectionLocation, selectionLength, 0)\n return result\n }\n\n /** Compute highlight tokens for the provided pulsar code */\n suggestHighlightFromSourceCode(code: string): Array<PLHighlightEngineToken> {\n let suggestionEngine = new PLBlueprintHighlightEngine(this.codeExecutionContext)\n let result = suggestionEngine.tokenize(code)\n return result\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Context\n\n createContextData(contextKey: string, contextId: string): Map<string, any> {\n let data = new Map<string, any>()\n\n if (contextId === 'none') {\n if (contextKey === PCExporterSourceContextType.generic) {\n return data\n } else if (contextKey === PCExporterSourceContextType.component) {\n throw new Error(\n 'Source with component context can only be tested against design system with one or more defined components. Create new component and run this source again.'\n )\n } else if (contextKey === PCExporterSourceContextType.componentGroup) {\n throw new Error(\n 'Source with component group context can only be tested against design system with one or more defined component groups. Create new component group and run this source again.'\n )\n } else if (contextKey === PCExporterSourceContextType.tokenType) {\n throw new Error(\n 'Source with token type context can only be tested against design system with one or more token types. Create new token and run this source again.'\n )\n } else if (contextKey === PCExporterSourceContextType.tokenGroup) {\n throw new Error(\n 'Source with token group context can only be tested against design system with one or more defined token groups. Create new token group and run this source again.'\n )\n } else if (contextKey === PCExporterSourceContextType.theme) {\n throw new Error(\n 'Source with theme context can only be tested against design system with one or more defined themes. Create new theme and run this source again.'\n )\n }\n } else {\n if (contextKey === PCExporterSourceContextType.generic) {\n // Generic ignores context id\n return data\n } else if (contextKey === PCExporterSourceContextType.component) {\n data.set('componentId', contextId)\n } else if (contextKey === PCExporterSourceContextType.componentGroup) {\n data.set('groupId', contextId)\n } else if (contextKey === PCExporterSourceContextType.tokenType) {\n data.set('tokenTypeId', contextId)\n } else if (contextKey === PCExporterSourceContextType.tokenGroup) {\n data.set('groupId', contextId)\n } else if (contextKey === PCExporterSourceContextType.theme) {\n data.set('themeId', contextId)\n }\n }\n\n return data\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n async parseSource(declaration: string, executionContext: DSMExecutionContext): Promise<PLBlueprint> {\n let source = PLBlueprintFactory.blueprint(declaration, 'test', executionContext, null)\n return source\n }\n\n async interpretSource(\n source: PLBlueprint,\n data: Map<string, any>,\n executionContext: DSMExecutionContext\n ): Promise<string> {\n let renderingContext = new PLInterpreterContext(data)\n let interpreter = new PLInterpreter()\n return interpreter.interpret(source, renderingContext, executionContext)\n }\n}\n","//\n// PulsarConfigurationManager.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\nimport { PCExporter } from '../../model/exporters/Exporter'\nimport { PCExporterMapBlueprint } from '../../model/maps/ExporterMapBlueprint'\nimport { PCPulsarExporterConfigurationGenerator } from './generators/PulsarExporterConfigFileGenerator'\nimport { PCPulsarExporterConfigurationFileValidator } from './validators/PulsarExporterConfigFileValidator'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarConfigurationManager {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n private exporter: PCExporter\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(exporter: PCExporter) {\n this.exporter = exporter\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration manager\n\n /** Get exporter configuration JSON */\n getExporterConfigurationJSON(): string {\n let generator = new PCPulsarExporterConfigurationGenerator(this.exporter)\n let payload = generator.exporterConfigurationData()\n return JSON.stringify(payload, null, 2)\n }\n\n /** Get source configuration JSON */\n getSourceConfigurationJSON(): string {\n let generator = new PCPulsarExporterConfigurationGenerator(this.exporter)\n let payload = generator.sourceConfigurationData()\n return JSON.stringify(payload, null, 2)\n }\n\n /** Get output configuration JSON */\n getOutputConfigurationJSON(): string {\n let generator = new PCPulsarExporterConfigurationGenerator(this.exporter)\n let payload = generator.outputConfigurationData()\n return JSON.stringify(payload, null, 2)\n }\n\n /** Update exporter configuration JSON */\n updateExporterConfigurationJSON(content: string) {\n // Parse and validate configuration file\n let validator = new PCPulsarExporterConfigurationFileValidator()\n let parsedConfiguration = validator.validateExporterConfigFileContent(content)\n\n // Validate that previous ID is still the same. This is a special step specifically for the update routine\n if (parsedConfiguration.id !== this.exporter.id) {\n throw Error(\n `Exporter ID must be the same (${this.exporter.id}) and can not be changed by editing the configuration file`\n )\n }\n\n // Re-write configuration of the loaded exporter\n this.exporter.applyConfiguration(parsedConfiguration)\n }\n\n /** Update source configuration JSON */\n updateSourceConfigurationJSON(content: string) {\n // Configuration file must contain source definitions\n let validator = new PCPulsarExporterConfigurationFileValidator()\n let parsedConfiguration = validator.validateSourceConfigFileContent(content, this.exporter)\n\n // Set all the previous sources to default so the new config doesn't interfere with the old one\n this.exporter.sources.forEach(source => {\n source.resetToDefault()\n })\n // Update each source that are already pre-validated\n for (const [sourceId, configuration] of Object.entries(parsedConfiguration)) {\n let source = this.exporter.sourceById(sourceId)\n source.loadBlueprintConfiguration(configuration)\n }\n }\n\n /** Update output configuration JSON */\n updateOutputConfigurationJSON(content: string) {\n // Configuration file must contain source definitions\n let parsedConfiguration = JSON.parse(content)\n let outputDefinition = parsedConfiguration['blueprints']\n\n // Remove all previous outputs first so the new config doesn't interfere with the old one\n this.exporter.removeOutputs()\n\n // Create output mapping object from each output entry.\n for (let configuration of outputDefinition) {\n let map = new PCExporterMapBlueprint(configuration)\n this.exporter.linkOutputs([map])\n }\n }\n}\n","import { PCPulsarExporterJSONGenerator } from './generators/PulsarExporterJSONGenerator'\n//\n// PulsarExporterManager.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from './../../model/exporters/Exporter'\n\n// https://stackoverflow.com/a/5717133\nconst URL_REGEX = new RegExp(\n '^(https?:\\\\/\\\\/)?' + // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|' + // domain name\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // port and path\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // query string\n '(\\\\#[-a-z\\\\d_]*)?$', // fragment locator\n 'i'\n)\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarExporterManager {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n private exporter: PCExporter\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(exporter: PCExporter) {\n this.exporter = exporter\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Exporter manipulation\n\n /** Retrieve details about currently loaded exporter. Note that this only retrieves settings of the exporter, to request blueprints and mapping, use separate functions */\n getExporterDetail(): PCExporter {\n return this.exporter\n }\n\n /** Update exporter name. Name must be non-empty and contain at least 6 characters */\n updateExporterName(name: string): PCExporter {\n let trimmedName = name.trim()\n if (trimmedName.length < 6) {\n throw Error('Exporter name must be at least 6 letters long')\n }\n\n if (!trimmedName.match(/^[0-9a-zA-Z -]+$/)) {\n throw Error('Exporter name must only contain letters, numbers, spaces and hyphens')\n }\n\n this.exporter.name = trimmedName\n return this.exporter\n }\n\n /** Update exporter description. Description must be non-empty and contain at least 20 characters */\n updateExporterDescription(description: string): PCExporter {\n let trimmedOverview = description.trim()\n if (trimmedOverview.length <= 0) {\n throw Error('Exporter description must be at least 20 characters longs')\n }\n\n this.exporter.description = trimmedOverview\n return this.exporter\n }\n\n /** Update exporter version. Exporter version needs to follow standard major.minor.patch versioning. Patch is optional */\n updateExporterVersion(version: string): PCExporter {\n let trimmedVersion = version.trim()\n if (!trimmedVersion.match(/^\\d+(\\.\\d+){1,2}$/)) {\n throw Error(\n 'Exporter version must be in formatted as major.minor.patch. Major and minor version is required, patch is optional'\n )\n }\n\n this.exporter.version = trimmedVersion\n return this.exporter\n }\n\n /** Update exporter author. Author can be empty. If non-empty, only alpha-numerics and spaces are allowed */\n updateExporterAuthor(author: string | null): PCExporter {\n let trimmedAuthor = author.trim()\n if (!trimmedAuthor || trimmedAuthor.length === 0) {\n this.exporter.author = null\n return this.exporter\n }\n\n const NAME_REGEX = /^[\\s,.'\\-\\p{L}]+$/u\n\n if (!trimmedAuthor.match(NAME_REGEX)) {\n throw Error('Exporter author name cannot contain numbers or special characters')\n }\n\n this.exporter.author = trimmedAuthor\n return this.exporter\n }\n\n /** Update exporter homepage. Homepage can be empty. If non-empty, validates the URL */\n updateExporterHomepage(homepage: string): PCExporter {\n let trimmedHomepage = homepage.trim()\n if (!trimmedHomepage || trimmedHomepage.length === 0) {\n this.exporter.homepage = null\n return this.exporter\n }\n\n if (!trimmedHomepage.match(URL_REGEX)) {\n throw Error('Exporter home page must be a valid url')\n }\n\n this.exporter.homepage = trimmedHomepage\n return this.exporter\n }\n\n /** Update exporter tags. Only alpha-numeric are allowed */\n updateExporterTags(tags: Array<string>): PCExporter {\n for (const tag of tags) {\n if (!tag.match(/^[0-9a-zA-Z]+$/)) {\n throw Error('Exporter tags must only contain letters or numbers')\n }\n }\n\n this.exporter.tags = tags\n return this.exporter\n }\n\n /** Update exporter icon. Not available at the moment */\n updateExporterIcon(icon: string): PCExporter {\n let trimmedIcon = icon.trim()\n if (!trimmedIcon || trimmedIcon.length === 0) {\n this.exporter.icon = null\n return this.exporter\n }\n\n if (!trimmedIcon.match(URL_REGEX)) {\n throw Error('Exporter icon must be a valid url')\n }\n\n this.exporter.icon = trimmedIcon\n return this.exporter\n }\n\n /** Serialize entire exporter into single javascript object. Returns object representation */\n getExporterBlob(): Object {\n let blobGenerator = new PCPulsarExporterJSONGenerator(this.exporter)\n return blobGenerator.constructBlob()\n }\n\n /** Serialize entire exporter into single javascript object. Returns JSON-string representation */\n getExporterBlobJSONSerialized(): string {\n let blobGenerator = new PCPulsarExporterJSONGenerator(this.exporter)\n return blobGenerator.constructBlobJSON()\n }\n}\n","//\n// PCPulsarExporterConfigurationGenerator.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from '../../../model/exporters/Exporter'\nimport { PCExporterSourceContextType } from '../../../model/sources/ExporterSource'\nimport { PCPulsarFile, PCPulsarFileGenerator } from './PulsarFileGenerator'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarExporterConfigurationGenerator {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n exporter: PCExporter\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(exporter: PCExporter) {\n this.exporter = exporter\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Exporter Configuration JSON\n\n exporterConfigurationFile(): PCPulsarFile {\n // Create description of exporter.json main configuration file\n let fileGenerator = new PCPulsarFileGenerator()\n let name = 'exporter'\n let extension = 'json'\n let directory = ''\n let content = this.exporterConfigurationData()\n\n return fileGenerator.pulsarFileDescriptorForFileWrite(name, extension, directory, content)\n }\n\n exporterConfigurationData(): Object {\n let data = {\n id: this.exporter.id,\n name: this.exporter.name,\n description: this.exporter.description,\n source_dir: this.exporter.sourceDirectory,\n version: this.exporter.version,\n tags: this.exporter.tags\n }\n\n if (this.exporter.author) {\n data['author'] = this.exporter.author\n }\n if (this.exporter.organization) {\n data['organization'] = this.exporter.organization\n }\n if (this.exporter.homepage) {\n data['homepage'] = this.exporter.homepage\n }\n if (this.exporter.icon) {\n data['icon'] = this.exporter.icon\n }\n\n if (this.exporter.outputConfigFilePath !== null || this.exporter.sourceConfigFilePath !== null) {\n let config = {}\n if (this.exporter.outputConfigFilePath !== null) {\n config['output'] = this.exporter.outputConfigFilePath\n }\n if (this.exporter.sourceConfigFilePath !== null) {\n config['sources'] = this.exporter.sourceConfigFilePath\n }\n data['config'] = config\n }\n\n if (this.exporter.pulsarEngineVersion !== null || this.exporter.supernovaEngineVersion !== null) {\n let engines = {}\n if (this.exporter.pulsarEngineVersion !== null) {\n engines['pulsar'] = this.exporter.pulsarEngineVersion\n }\n if (this.exporter.supernovaEngineVersion !== null) {\n engines['supernova'] = this.exporter.supernovaEngineVersion\n }\n data['engines'] = engines\n }\n\n return data\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Source Configuration\n\n sourceConfigurationFile(): PCPulsarFile {\n // Create description of source configuration file\n let fileGenerator = new PCPulsarFileGenerator()\n let content = this.sourceConfigurationData()\n let descriptor = this.exporter.sourceConfigFilePath\n ? fileGenerator.pulsarFileDescriptorFromFilePath(this.exporter.sourceConfigFilePath)\n : fileGenerator.pulsarFileDescriptorFromFilePath('blueprints.json')\n\n return fileGenerator.pulsarFileDescriptorForFileWrite(\n descriptor.name,\n descriptor.extension,\n descriptor.directory,\n content\n )\n }\n\n sourceConfigurationData(): Object {\n // Create non-default configuration entries for each source\n let data = new Object()\n for (let source of this.exporter.sources.values()) {\n let object = new Object()\n if (source.context != PCExporterSourceContextType.generic) {\n object['context'] = source.context.toString()\n }\n if (source.targetsCI) {\n object['targets_ci'] = true\n }\n if (source.targetsSandbox) {\n object['targets_sandbox'] = true\n }\n if (source.targetsDocumentation) {\n object['targets_documentation'] = true\n }\n\n data[source.id] = object\n }\n\n return data\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Source Configuration\n\n outputConfigurationFile(): PCPulsarFile {\n // Create description of output configuration file\n let fileGenerator = new PCPulsarFileGenerator()\n let content = this.outputConfigurationData()\n let descriptor = this.exporter.outputConfigFilePath\n ? fileGenerator.pulsarFileDescriptorFromFilePath(this.exporter.outputConfigFilePath)\n : fileGenerator.pulsarFileDescriptorFromFilePath('output.json')\n\n return fileGenerator.pulsarFileDescriptorForFileWrite(\n descriptor.name,\n descriptor.extension,\n descriptor.directory,\n content\n )\n }\n\n outputConfigurationData(): Object {\n let blueprintOutput = new Array<Object>()\n for (let map of this.exporter.outputs) {\n let object = {\n invoke: map.invoke\n }\n if (map.write_to !== null) {\n object['write_to'] = map.write_to\n }\n if (map.write_using !== null) {\n object['write_using'] = map.write_using\n }\n\n blueprintOutput.push(object)\n }\n\n return {\n blueprints: blueprintOutput\n }\n }\n}\n","//\n// PulsarExporterJSONGenerator.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from '../../../model/exporters/Exporter'\nimport { PCPulsarExporterConfigurationGenerator } from './PulsarExporterConfigFileGenerator'\nimport { PCPulsarFile } from './PulsarFileGenerator'\nimport { PCPulsarExporterSourceFileGenerator } from './PulsarExporterSourceFileGenerator'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarExporterJSONGenerator {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n exporter: PCExporter\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(exporter: PCExporter) {\n this.exporter = exporter\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Interface\n\n constructBlob(): Array<PCPulsarFile> {\n // Create file generator\n let configGenerator = new PCPulsarExporterConfigurationGenerator(this.exporter)\n let sourceGenerator = new PCPulsarExporterSourceFileGenerator(this.exporter)\n\n // Generate configuration files\n let exporterConfigurationFile = configGenerator.exporterConfigurationFile()\n let sourceConfigurationFile = configGenerator.sourceConfigurationFile()\n let outputConfigurationFile = configGenerator.outputConfigurationFile()\n\n // Generate source files\n let sourceFiles = sourceGenerator.sourceFiles()\n\n // Merge everything and retrieve as object\n return [exporterConfigurationFile, sourceConfigurationFile, outputConfigurationFile, ...sourceFiles]\n }\n\n constructBlobJSON(): string {\n let blob = this.constructBlob()\n let json = JSON.stringify(blob)\n return json\n }\n}\n","//\n// PCPulsarExporterSourceFileGenerator.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from '../../../model/exporters/Exporter'\nimport { PCExporterSource } from '../../../model/sources/ExporterSource'\nimport { PCPulsarFile, PCPulsarFileGenerator } from './PulsarFileGenerator'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarExporterSourceFileGenerator {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n exporter: PCExporter\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(exporter: PCExporter) {\n this.exporter = exporter\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Source Files\n\n sourceFiles(): Array<PCPulsarFile> {\n var files = new Array<PCPulsarFile>()\n for (let [name, source] of this.exporter.sources) {\n let file = this.sourceFile(source, name)\n files.push(file)\n }\n\n return files\n }\n\n sourceFile(source: PCExporterSource, name: string): PCPulsarFile {\n let fileGenerator = new PCPulsarFileGenerator()\n let directory = source.path ? `${source.path}` : ``\n let content = source.content\n let nameComponents = name.split('.')\n let extension = nameComponents[nameComponents.length - 1]\n nameComponents.pop()\n name = nameComponents.join('.')\n\n let file = fileGenerator.pulsarFileDescriptorForFileWrite(name, extension, directory, content)\n return file\n }\n}\n","//\n// PulsarZipGenerator.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from '../../../model/exporters/Exporter'\nimport { PCPulsarExporterJSONGenerator } from './PulsarExporterJSONGenerator'\nimport { PCEngineExporterProcessingResult } from '../../PulsarInterface'\nimport { PCPulsarFile } from './PulsarFileGenerator'\nimport JSZip from 'jszip'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarZIPGenerator {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Interface\n\n static constructZIPBufferForExporterStructure(exporter: PCExporter): NodeJS.ReadableStream {\n // Create file descriptors for config file, blueprints and maps using the blob generator\n let blobGenerator = new PCPulsarExporterJSONGenerator(exporter)\n let files = blobGenerator.constructBlob() as Array<PCPulsarFile>\n\n // Create the zip file and write all files into it\n let zip = new JSZip()\n for (let file of files) {\n zip.file(file.key, file.content)\n }\n\n // Create node in-memory buffer\n let streamConfig: JSZip.JSZipGeneratorOptions<'nodebuffer'> = {\n type: 'nodebuffer',\n streamFiles: true\n }\n\n return zip.generateNodeStream(streamConfig)\n }\n\n static constructZIPBufferForExporterResult(result: PCEngineExporterProcessingResult): NodeJS.ReadableStream {\n // Create the zip file and write all files into it\n let zip = new JSZip()\n for (let file of result.emittedFiles) {\n if (file.type === 'string') {\n zip.file(file.path, file.content)\n } else {\n throw new Error('Unsupported type when zipping export result')\n }\n }\n\n // Create node in-memory buffer\n let streamConfig: JSZip.JSZipGeneratorOptions<'nodebuffer'> = {\n type: 'nodebuffer',\n streamFiles: true\n }\n\n return zip.generateNodeStream(streamConfig)\n }\n}\n","//\n// PCPulsarFileGenerator.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport type PCPulsarFileMap = Map<string, PCPulsarFile>\n\nexport type PCPulsarFileDescriptor = {\n filename: string\n name: string\n extension: string\n directory: string\n}\n\nexport type PCPulsarFile = {\n directory: string\n filename: string\n name: string\n extension: string\n content: string\n key: string\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarFileGenerator {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - File builder\n\n pulsarFileDescriptorForFileWrite(\n name: string,\n extension: string,\n directory: string | null,\n content: string | Object\n ): PCPulsarFile {\n // Prepare filenames and unique key\n let filename = `${name}.${extension}`\n let key = filename\n if (directory) {\n key = `${directory}/${key}`\n }\n\n // Stringify content if it is object\n let resultingContent: string\n if (content instanceof Object) {\n resultingContent = JSON.stringify(content)\n } else {\n resultingContent = content\n }\n\n return {\n key: key,\n directory: directory ?? '',\n filename: filename,\n name: name,\n extension: extension,\n content: resultingContent\n }\n }\n\n pulsarFileDescriptorFromFilePath(filePath: string): PCPulsarFileDescriptor {\n let components = filePath.split('/')\n if (components.length == 0) {\n return null\n }\n\n // Extract filename, extension and paths\n let filename = components[components.length - 1]\n\n // Extract directory\n components.pop()\n let directory = components.join('/')\n\n // Get extension and check whether it is correct format\n let nameParts = filename.split('.')\n let extension: string\n let name: string\n if (nameParts.length >= 2) {\n extension = nameParts[nameParts.length - 1]\n nameParts.pop()\n name = nameParts.join('.')\n }\n\n // Only pr and json extension are of interest to us\n if (extension !== 'pr' && extension !== 'json') {\n return null\n }\n\n return {\n filename: filename,\n name: name,\n extension: extension,\n directory: directory\n }\n }\n}\n","//\n// PulsarBaseLoader.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter } from '../../../model/exporters/Exporter'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarBaseLoader {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Blueprint manipulation\n\n initialize(): Promise<PCExporter> {\n throw new Error('Initializer must provide its own implementation of init procedure')\n }\n}\n","// PCPulsarFSLoader.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCPulsarBaseLoader } from '../PulsarBaseLoader'\nimport { PCExporter } from '../../../../model/exporters/Exporter'\nimport { PCPulsarExporterMemoryLoader } from '../memory/PulsarExporterMemoryLoader'\nimport fs from 'fs'\nimport { promisify } from 'util'\nimport { resolve } from 'path'\nimport { PCPulsarFile, PCPulsarFileMap } from '../../generators/PulsarFileGenerator'\n\n// This crazy code makes browser bundle work and reminds us we need to split loaders to separate packages\nconst readdir = promisify && fs?.readdir ? promisify(fs.readdir) : null\nconst stat = promisify && fs?.stat ? promisify(fs.stat) : null\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarFSLoader extends PCPulsarBaseLoader {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n exporterRootURL: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(sourceZIPURL: string) {\n super()\n this.exporterRootURL = sourceZIPURL\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Initialization of the exporter\n\n async initialize(): Promise<PCExporter> {\n let processedFiles = await this.loadFilesFromRootDirectory(this.exporterRootURL)\n\n let unpackager = new PCPulsarExporterMemoryLoader(processedFiles)\n let exporter = await unpackager.constructExporterFromSourceFiles()\n return exporter\n }\n\n async loadFilesFromRootDirectory(rootDirectory: string): Promise<PCPulsarFileMap> {\n let processedFiles = new Map<string, PCPulsarFile>()\n\n let files = (await this.getFiles(rootDirectory)) as Array<string>\n\n // Fetch each file from zip (only if not directory)\n for (let file of files) {\n // Obtain directory and filename of the unzipped file\n let parsedFile = await this.loadFileAtUrl(file, rootDirectory)\n if (parsedFile) {\n processedFiles.set(parsedFile.key, parsedFile)\n }\n }\n\n return processedFiles\n }\n\n async getFiles(directory: string) {\n const subdirs = await readdir(directory)\n const files = await Promise.all(\n subdirs.map(async subdir => {\n const res = resolve(directory, subdir)\n return (await stat(res)).isDirectory() ? this.getFiles(res) : res\n })\n )\n\n return files.reduce((a, f) => a.concat(f), [])\n }\n\n async loadFileAtUrl(filePath: string, rootDirectory: string): Promise<PCPulsarFile | null> {\n // Only retrieve files that are .pr or .json\n let components = filePath.split('/')\n\n // Extract filename, extension and paths\n let filename = components[components.length - 1]\n let fullpath = components.join('/')\n\n // Extract directory\n components.pop()\n let directory = components.join('/')\n\n // Get extension and check whether it is correct format\n let nameParts = filename.split('.')\n let extension: string\n let name: string\n if (nameParts.length >= 2) {\n extension = nameParts[nameParts.length - 1]\n nameParts.pop()\n name = nameParts.join('.')\n }\n\n // Only pulsar and json extension are of interest to us\n if (extension !== 'pr' && extension !== 'json') {\n return null\n }\n\n // Extract content\n let content = fs.readFileSync(filePath, 'utf-8')\n\n return {\n key: fullpath.substring(rootDirectory.length + 1),\n filename: filename,\n name: name,\n extension: extension,\n directory: directory.substring(rootDirectory.length + 1),\n content: content\n }\n }\n}\n","// PulsarExporterJSONLoader.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCPulsarBaseLoader } from '../PulsarBaseLoader'\nimport { PCExporter } from '../../../../model/exporters/Exporter'\nimport { PCPulsarExporterMemoryLoader } from './PulsarExporterMemoryLoader'\nimport { PCPulsarFile } from '../../generators/PulsarFileGenerator'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarExporterJSONLoader extends PCPulsarBaseLoader {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n blob: string | Object\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(blob: string | Object) {\n super()\n this.blob = blob\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Initialization of the exporter\n\n async initialize(): Promise<PCExporter> {\n let processedFiles = new Map<string, PCPulsarFile>()\n\n let processedBlob: Object\n if (typeof this.blob === 'object') {\n processedBlob = this.blob\n } else if (typeof this.blob === 'string') {\n processedBlob = JSON.parse(this.blob)\n } else {\n throw new Error('Unsupported blob type, supported: Object or JSON representation')\n }\n\n // Process each file of blob\n if (processedBlob instanceof Array) {\n for (let item of processedBlob) {\n // Validate that item has all requested blob properties\n this.validateBlobEntry(item)\n\n // Create item from the blob\n let correctItem = item as PCPulsarFile\n processedFiles.set(correctItem.key, correctItem)\n }\n\n let unpackager = new PCPulsarExporterMemoryLoader(processedFiles)\n let exporter = await unpackager.constructExporterFromSourceFiles()\n return exporter\n } else {\n throw new Error('Blob must contain array of file descriptors')\n }\n }\n\n validateBlobEntry(entry: PCPulsarFile) {\n if (!(entry instanceof Object)) {\n throw new Error('File descriptor must be provided and must be object')\n }\n\n if (typeof entry.directory !== 'string') {\n throw new Error('File descriptor must contain directory attribute')\n }\n if (typeof entry.content !== 'string') {\n throw new Error('File descriptor must contain content attribute')\n }\n if (typeof entry.extension !== 'string') {\n throw new Error('File descriptor must contain extension attribute')\n }\n if (typeof entry.filename !== 'string') {\n throw new Error('File descriptor must contain filename attribute')\n }\n if (typeof entry.key !== 'string') {\n throw new Error('File descriptor must contain key attribute')\n }\n if (typeof entry.name !== 'string') {\n throw new Error('File descriptor must contain name attribute')\n }\n }\n}\n","//\n// PulsarExporterMemoryLoader.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCPulsarBaseLoader } from '../PulsarBaseLoader'\nimport { PCExporter } from '../../../../model/exporters/Exporter'\n\nimport { PCExporterSource } from '../../../../model/sources/ExporterSource'\nimport { PCExporterMapBlueprint } from '../../../../model/maps/ExporterMapBlueprint'\nimport { PCPulsarFileMap } from '../../generators/PulsarFileGenerator'\nimport { PCPulsarExporterConfigurationFileValidator } from '../../validators/PulsarExporterConfigFileValidator'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarExporterMemoryLoader extends PCPulsarBaseLoader {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n sourceFiles: PCPulsarFileMap\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(sourceFiles: PCPulsarFileMap) {\n super()\n this.sourceFiles = sourceFiles\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Initialization of the exporter\n\n async constructExporterFromSourceFiles(): Promise<PCExporter> {\n // Retrieve and validate configuration file\n let configurationFile = this.sourceFiles.get('exporter.json')\n if (!configurationFile) {\n throw new Error('exporter.json not found it root directory of the exporter package')\n }\n\n try {\n // Parse and validate configuration file\n let validator = new PCPulsarExporterConfigurationFileValidator()\n let parsedConfiguration = validator.validateExporterConfigFileContent(configurationFile.content)\n\n // Create exporter based on the configuration\n let exporter = new PCExporter(parsedConfiguration)\n\n // Load all sources including their configuration\n this.loadSourcesFromSourceDirectory(exporter)\n this.enhanceSourcesWithConfiguration(exporter)\n\n // Create output definitions\n this.loadOutputMapping(exporter)\n\n // Exporter fully prepared and validated, enjoy :)\n return exporter\n } catch (error) {\n throw error\n }\n }\n\n private loadSourcesFromSourceDirectory(exporter: PCExporter) {\n let sources = new Array<PCExporterSource>()\n\n for (let sourceDefinition of this.sourceFiles.values()) {\n // Only sources inside the source directory\n if (sourceDefinition.directory.startsWith(exporter.sourceDirectory)) {\n let source = new PCExporterSource(\n sourceDefinition.filename,\n sourceDefinition.directory,\n sourceDefinition.content\n )\n sources.push(source)\n }\n }\n\n exporter.linkSources(sources)\n }\n\n private enhanceSourcesWithConfiguration(exporter: PCExporter) {\n // Load the output configuration file, if any\n if (exporter.sourceConfigFilePath == null) {\n return\n }\n\n let configPath = exporter.sourceConfigFilePath\n let configFile = this.sourceFiles.get(configPath)\n\n // Configuration file must be present when defined, otherwise it is ignored\n if (!configFile) {\n throw `Could not find source configuration file at ${configPath}`\n }\n\n // Configuration file must contain source definitions\n let validator = new PCPulsarExporterConfigurationFileValidator()\n let parsedConfiguration = validator.validateSourceConfigFileContent(configFile.content, exporter)\n\n // Update each source that are already pre-validated\n for (const [sourceId, configuration] of Object.entries(parsedConfiguration)) {\n let source = exporter.sourceById(sourceId)\n source.loadBlueprintConfiguration(configuration)\n }\n }\n\n private loadOutputMapping(exporter: PCExporter) {\n // Load the output configuration file, if any\n if (exporter.outputConfigFilePath == null) {\n throw `Output configuration file is not defined inside exporter.json file`\n }\n\n let configPath = exporter.outputConfigFilePath\n let configFile = this.sourceFiles.get(configPath)\n\n // Configuration file must be present when defined, otherwise it is ignored\n if (!configFile) {\n throw `Could not find output configuration file at ${configPath}`\n }\n\n // Configuration file must contain source definitions\n let parsedConfiguration = JSON.parse(configFile.content)\n let outputDefinition = parsedConfiguration['blueprints']\n\n // Create output mapping object from each output entry\n for (let configuration of outputDefinition) {\n let map = new PCExporterMapBlueprint(configuration)\n exporter.linkOutputs([map])\n }\n }\n}\n","// PulsarExporterGitHubLoader.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCPulsarBaseLoader } from '../PulsarBaseLoader'\nimport { PCExporter } from '../../../../model/exporters/Exporter'\nimport { PCPulsarExporterMemoryLoader } from '../memory/PulsarExporterMemoryLoader'\nimport axios from 'axios'\nimport parseGithub from 'parse-github-url'\nimport JSZip from 'jszip'\nimport { PCPulsarFile, PCPulsarFileMap } from '../../generators/PulsarFileGenerator'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarExporterGitHubLoader extends PCPulsarBaseLoader {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n repositoryURL: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(githubURL: string) {\n super()\n this.repositoryURL = githubURL\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Initialization of the exporter\n\n async initialize(): Promise<PCExporter> {\n let url = parseGithub(this.repositoryURL)\n if (url) {\n let owner = url.owner\n let name = url.name\n\n // TODO: We should get the link to the archive dynamically using the API\n let rawZIP\n try {\n let zipballURL = `https://github.com/${owner}/${name}/archive/main.zip`\n rawZIP = await this.downloadZIPFromURL(zipballURL)\n } catch {\n try {\n let zipballURL = `https://github.com/${owner}/${name}/archive/master.zip`\n rawZIP = await this.downloadZIPFromURL(zipballURL)\n } catch {\n throw new Error('Unable to obtain releases from GitHub repository')\n }\n }\n if (!rawZIP) {\n throw new Error('Unable to obtain releases from GitHub repository')\n }\n let processedFiles = await this.processZIP(rawZIP)\n let unpackager = new PCPulsarExporterMemoryLoader(processedFiles)\n let exporter = await unpackager.constructExporterFromSourceFiles()\n return exporter\n } else {\n throw new Error('Unable to obtain releases from GitHub repository')\n }\n }\n\n async downloadZIPFromURL(url: string): Promise<JSZip> {\n const response = await axios.get(url, {\n responseType: 'arraybuffer'\n })\n return JSZip.loadAsync(response.data)\n }\n\n async processZIP(zip: JSZip): Promise<PCPulsarFileMap> {\n let processedFiles = new Map<string, PCPulsarFile>()\n let values = Object.values(zip.files)\n\n // Fetch each file from zip (only if not directory)\n for (let file of values) {\n if (file.dir) {\n continue\n }\n\n // Obtain directory and filename of the unzipped file\n let parsedFile = await this.parseUnzippedFile(file)\n if (parsedFile) {\n processedFiles.set(parsedFile.key, parsedFile)\n }\n }\n\n return processedFiles\n }\n\n async parseUnzippedFile(file: JSZip.JSZipObject): Promise<PCPulsarFile | null> {\n // Only retrieve files that are .pr or .json\n // Modify filename by removing the first directory\n let components = file.name.split('/')\n components.shift()\n\n // Extract filename, extension and paths\n let filename = components[components.length - 1]\n let fullpath = components.join('/')\n\n // Extract directory\n components.pop()\n let directory = components.join('/')\n\n // Get extension and check whether it is correct format\n let nameParts = filename.split('.')\n let extension: string\n let name: string\n if (nameParts.length >= 2) {\n extension = nameParts[nameParts.length - 1]\n nameParts.pop()\n name = nameParts.join('.')\n }\n\n // Only pulsar and json extension are of interest to us\n if (extension !== 'pr' && extension !== 'json') {\n return null\n }\n\n // Extract content\n let content = await file.async('string')\n\n return {\n key: fullpath,\n filename: filename,\n name: name,\n extension: extension,\n directory: directory,\n content: content\n }\n }\n}\n","// PulsarExporterZIPLoader.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCPulsarBaseLoader } from '../PulsarBaseLoader'\nimport { PCExporter } from '../../../../model/exporters/Exporter'\nimport { PCPulsarExporterMemoryLoader } from '../memory/PulsarExporterMemoryLoader'\nimport axios from 'axios'\nimport JSZip from 'jszip'\nimport { PCPulsarFile, PCPulsarFileMap } from '../../generators/PulsarFileGenerator'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarExporterZIPLoader extends PCPulsarBaseLoader {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n zipSourceURL: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Setup\n\n constructor(sourceZIPURL: string) {\n super()\n this.zipSourceURL = sourceZIPURL\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Initialization of the exporter\n\n async initialize(): Promise<PCExporter> {\n let rawZIP = await this.downloadZIPFromURL(this.zipSourceURL)\n let processedFiles = await this.processZIP(rawZIP)\n\n let unpackager = new PCPulsarExporterMemoryLoader(processedFiles)\n let exporter = await unpackager.constructExporterFromSourceFiles()\n return exporter\n }\n\n async downloadZIPFromURL(url: string): Promise<JSZip> {\n const response = await axios.get(url, {\n responseType: 'arraybuffer'\n })\n return JSZip.loadAsync(response.data)\n }\n\n async processZIP(zip: JSZip): Promise<PCPulsarFileMap> {\n let processedFiles = new Map<string, PCPulsarFile>()\n let values = Object.values(zip.files)\n\n // Fetch each file from zip (only if not directory)\n for (let file of values) {\n if (file.dir) {\n continue\n }\n\n // Obtain directory and filename of the unzipped file\n let parsedFile = await this.parseUnzippedFile(file)\n if (parsedFile) {\n processedFiles.set(parsedFile.key, parsedFile)\n }\n }\n\n return processedFiles\n }\n\n async parseUnzippedFile(file: JSZip.JSZipObject): Promise<PCPulsarFile | null> {\n // Only retrieve files that are .pr or .json\n let components = file.name.split('/')\n\n // Extract filename, extension and paths\n let filename = components[components.length - 1]\n let fullpath = components.join('/')\n\n // Extract directory\n components.pop()\n let directory = components.join('/')\n\n // Get extension and check whether it is correct format\n let nameParts = filename.split('.')\n let extension: string\n let name: string\n if (nameParts.length >= 2) {\n extension = nameParts[nameParts.length - 1]\n nameParts.pop()\n name = nameParts.join('.')\n }\n\n // Only pr and json extension are of interest to us\n if (extension !== 'pr' && extension !== 'json') {\n return null\n }\n\n // Extract content\n let content = await file.async('string')\n\n return {\n key: fullpath,\n filename: filename,\n name: name,\n extension: extension,\n directory: directory,\n content: content\n }\n }\n}\n","//\n// PCPulsarExporterConfigurationFileValidator.ts\n// Supernova\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Jiri Trecak. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCExporter, PCExporterModel } from '../../../model/exporters/Exporter'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Class\n\nexport class PCPulsarExporterConfigurationFileValidator {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Exporter Config Validation\n\n validateExporterConfigFileContent(content: string): PCExporterModel {\n // Validate correct json structure\n let parsedConfiguration = this.validateParseJSONContent(content) as PCExporterModel\n\n // Validate keys of exporter file\n // Required\n if (!parsedConfiguration.id || !(typeof parsedConfiguration.id === 'string')) {\n throw new Error(\"Invalid exporter.json configuration, missing or invalid 'id'\")\n }\n if (!parsedConfiguration.name || !(typeof parsedConfiguration.name === 'string')) {\n throw new Error(\"Invalid exporter.json configuration, missing or invalid 'name'\")\n }\n if (!parsedConfiguration.description || !(typeof parsedConfiguration.description === 'string')) {\n throw new Error(\"Invalid exporter.json configuration, missing or invalid 'description'\")\n }\n if (!parsedConfiguration.source_dir || !(typeof parsedConfiguration.source_dir === 'string')) {\n throw new Error(\"Invalid exporter.json configuration, missing or invalid 'source_dir'\")\n }\n if (!parsedConfiguration.version || !(typeof parsedConfiguration.version === 'string')) {\n throw new Error(\"Invalid exporter.json configuration, missing or invalid 'version'\")\n }\n if (!parsedConfiguration.tags || !(parsedConfiguration.tags instanceof Array)) {\n throw new Error(\"Invalid exporter.json configuration, missing or invalid 'tags'\")\n }\n if (parsedConfiguration.tags.length === 0) {\n throw new Error(\"Invalid exporter.json configuration, 'tags' must not be empty\")\n }\n\n // Optional\n if (parsedConfiguration.author && !(typeof parsedConfiguration.author === 'string')) {\n throw new Error(\"Invalid exporter.json configuration, invalid 'author'\")\n }\n if (parsedConfiguration.organization && !(typeof parsedConfiguration.organization === 'string')) {\n throw new Error(\"Invalid exporter.json configuration, invalid 'organization'\")\n }\n if (parsedConfiguration.homepage && !(typeof parsedConfiguration.homepage === 'string')) {\n throw new Error(\"Invalid exporter.json configuration, invalid 'homepage'\")\n }\n\n return parsedConfiguration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Output Config Validation\n\n validateOutputConfigFileContent(content: string, exporter: PCExporter): Object {\n // Validate correct json structure\n let parsedConfiguration = this.validateParseJSONContent(content)\n\n let outputDefinition = parsedConfiguration['blueprints']\n if (!outputDefinition) {\n throw Error(`Output configuration file must define 'blueprints' key`)\n }\n\n if (!(outputDefinition instanceof Array)) {\n throw Error(`Output configuration file 'blueprints' key must be an array`)\n }\n\n // Create output mapping object from each output entry\n for (let configuration of outputDefinition) {\n if (!(configuration instanceof Object)) {\n throw Error(`Output configuration source entry must be a key/value object`)\n }\n let invoke = configuration['invoke']\n let writeTo = configuration['write_to']\n let writeUsing = configuration['write_using']\n\n if (!invoke) {\n throw Error(`Output configuration source entry must define 'invoke' key`)\n }\n if (!writeTo && !writeUsing) {\n throw Error(`Output configuration source entry must define either 'write_to' or 'write_using' key`)\n }\n if (writeTo && writeUsing) {\n throw Error(\n `Output configuration source entry must define one of 'write_to' or 'write_using' keys, but not both`\n )\n }\n if (writeUsing && !exporter.sources.get(writeUsing)) {\n throw Error(`Output configuration source entry references unknown source '${writeUsing}'`)\n }\n }\n\n return parsedConfiguration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - File Config Validation\n\n validateSourceConfigFileContent(content: string, exporter: PCExporter): Object {\n // Validate correct json structure\n let parsedConfiguration = this.validateParseJSONContent(content)\n\n // Validate each source. If defined, source is required and must be valid configuration object\n // Note: configuration keys are optional, if user defines something else, it is ignored\n for (const [sourceId, configuration] of Object.entries(parsedConfiguration)) {\n let source = exporter.sourceById(sourceId)\n if (!source) {\n throw Error(`Source configuration file defines source id ${sourceId} but there is no such file`)\n }\n if (!(configuration instanceof Object)) {\n throw Error(`Source configuration for source id ${sourceId} must be key/value object`)\n }\n }\n\n return parsedConfiguration\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Support\n\n validateParseJSONContent(content: string): Object {\n try {\n let file = JSON.parse(content)\n return file\n } catch (error) {\n throw Error('Incorrectly formatted JSON definition')\n }\n }\n}\n","//\n// PCLogger.ts\n// Pulsar\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PCLoggerDefaultMessage } from './LoggerDefaultMessages'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport enum PCLogType {\n success,\n info,\n warning,\n error,\n user\n}\n\nexport interface PCLog {\n id: string\n time: Date\n type: PCLogType\n message: string\n}\n\nexport class PCLogger {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n logs: Array<PCLog>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {\n this.logs = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Log manipulation\n\n emptyLogs() {\n this.logs = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Log creation\n\n store(log: PCLog): PCLog {\n this.logs.push(log)\n return log\n }\n\n logSuccess(message: string, id: string): PCLog {\n let log: PCLog = {\n id: id,\n message: message,\n type: PCLogType.success,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logInfo(message: string, id: string): PCLog {\n let log: PCLog = {\n id: id,\n message: message,\n type: PCLogType.info,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logWarning(message: string, id: string): PCLog {\n let log: PCLog = {\n id: id,\n message: message,\n type: PCLogType.warning,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logError(message: string, id: string): PCLog {\n let log: PCLog = {\n id: id,\n message: message,\n type: PCLogType.error,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logUser(message: string, id: string): PCLog {\n let log: PCLog = {\n id: id,\n message: message,\n type: PCLogType.user,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logType(type: PCLogType, message: string, id: string): PCLog {\n let log: PCLog = {\n id: id,\n message: message,\n type: type,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n // Note not because only core is allowed to use system messages\n logSystem(systemMessage: PCLoggerDefaultMessage, id: string): PCLog {\n return this.logType(systemMessage.type, systemMessage.message, id)\n }\n}\n","//\n// PLBlueprint.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { SyntaxTree } from '../parser/syntax/SyntaxTree'\nimport { PLBlueprintConfiguration } from './BlueprintConfiguration'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLBlueprint Definition\n\nexport class PLBlueprint {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n id: string\n declaration: string\n syntax: SyntaxTree\n configuration: PLBlueprintConfiguration\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(declaration: string, syntax: SyntaxTree, configuration: PLBlueprintConfiguration, id: string) {\n this.id = id\n this.declaration = declaration\n this.syntax = syntax\n this.configuration = configuration\n }\n}\n","//\n// PLBlueprintConfiguration.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLBlueprint Definition\n\nexport class PLBlueprintConfiguration {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Characters that wrap every dynamic declaration\n public readonly openingWrapperIdentifier = '{'\n public readonly closingWrapperIdentifier = '}'\n\n // Characters that identify variables for dynamic substitutions\n public readonly openingSubstitutionIdentifier = '{'\n public readonly closingSubstitutionIdentifier = '}'\n\n // Characters that identify evaluable definitions\n public readonly openingFlowIdentifier = '['\n public readonly closingFlowIdentifier = ']'\n\n // Character that identifies evaluable block end\n public readonly flowEnd = '/'\n\n // Characters that identify comments\n public readonly openingCommentIdentifier = '*'\n public readonly closingCommentIdentifier = '*'\n\n // Characters that identify editor placeholder\n public readonly openingEditorPlaceholderIdentifier = '#'\n public readonly closingEditorPlaceholderIdentifier = '#'\n\n // string describing opening of code synchronization block\n public readonly openingCodeSyncBlock = '// <'\n public readonly closingCodeSyncBlock = '// >'\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructors\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n static default(): PLBlueprintConfiguration {\n return new PLBlueprintConfiguration()\n }\n}\n","//\n// PLBlueprintFactory.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { LexicalParser } from './../parser/Tokenization/Lexical/LexicalParser'\nimport { PLBlueprintConfiguration } from './BlueprintConfiguration'\nimport { PLBlueprint } from './Blueprint'\nimport { ConcreteParser } from '../parser/Tokenization/Concrete/ConcreteParser'\nimport { SyntaxParser } from '../parser/syntax/SyntaxParser'\nimport { PLExecutionContext } from '../interpreter/ExecutionContext'\nimport { PLLoggerDefaultMessages } from './../interpreter/loggers/LoggerDefaultMessages'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLBlueprint Factory Definition\n\nexport class PLBlueprintFactory {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n public static blueprint(\n declaration: string,\n id: string,\n executionContext?: PLExecutionContext,\n configuration?: PLBlueprintConfiguration\n ): PLBlueprint {\n // Fallback to default configuration if none provided\n let blueprintConfiguration = configuration ?? PLBlueprintConfiguration.default()\n let blueprintContext = executionContext ?? new PLExecutionContext()\n\n try {\n // Prepare symbol table\n blueprintContext.debugger.symbolTable.setExecutedSource(id)\n\n // Log start\n blueprintContext.logger.logSystem(PLLoggerDefaultMessages.compilerStart, id)\n\n // Convert pure string to token array, constructing basic lexical token description of the blueprint\n let lexicalParser = new LexicalParser(declaration, blueprintConfiguration, blueprintContext.debugger)\n let lexicalTokens = lexicalParser.parse()\n\n // console.log(`Obtained lexical buffer ${lexicalTokens.debugDescription()}`)\n\n // Simplify the array of basic tokens to their concrete, validating structure\n let concreteParser = new ConcreteParser(lexicalTokens, blueprintConfiguration, blueprintContext.debugger)\n let concreteTokens = concreteParser.parse()\n\n // console.log(`Obtained concrete buffer ${concreteTokens.debugDescription()}`)\n\n // Construct tree of directives, validating syntax\n let syntaxParser = new SyntaxParser(concreteTokens, blueprintContext)\n let syntaxTree = syntaxParser.parse()\n\n // console.log(`Obtained syntax tree ${syntaxTree.debugDescription()}`)\n\n // Construct blueprint\n let blueprint = new PLBlueprint(declaration, syntaxTree, configuration, id)\n\n // Log end and retrieve\n blueprintContext.logger.logSystem(PLLoggerDefaultMessages.compilerBuildSuccessful, id)\n return blueprint\n } catch (error) {\n // Log failure and retrieve\n blueprintContext.logger.logSystem(PLLoggerDefaultMessages.compilerBuildFailure, id)\n blueprintContext.logger.logError(error.message, id)\n throw error\n }\n }\n}\n","//\n// PLKeywordsFlows.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLBlueprint Definition\n\nexport class PLKeywordsFlows {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Code\n public static readonly codeMerge = 'code'\n\n // Debug\n public static readonly log = 'log'\n\n // Emit\n public static readonly emit = 'emit'\n\n // Functions\n public static readonly import = 'import'\n public static readonly return = 'return'\n\n // Conditions\n public static readonly if = 'if'\n public static readonly else = 'else'\n public static readonly elseIf = 'elseif'\n\n // Inject\n public static readonly inject = 'inject'\n\n // Loops\n public static readonly for = 'for'\n public static readonly map = 'map'\n public static readonly traverse = 'traverse'\n\n // Switch\n public static readonly case = 'case'\n public static readonly default = 'default'\n public static readonly switch = 'switch'\n\n // Properties\n public static readonly global = 'global'\n public static readonly let = 'let'\n public static readonly set = 'set'\n public static readonly var = 'var'\n}\n","//\n// PLKeywordsFunctions.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLBlueprint Definition\n\nexport class PLKeywordsFunctions {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Blueprints\n public static readonly blueprintsCall = 'blueprints.call'\n\n // Boolean logic\n public static readonly booleanAnd = 'boolean.and'\n public static readonly booleanOr = 'boolean.or'\n public static readonly booleanNot = 'boolean.not'\n public static readonly booleanTernaryValue = 'boolean.ternaryValue'\n\n // Compare\n public static readonly compareEquals = 'compare.equals'\n public static readonly compareEmpty = 'compare.empty'\n public static readonly compareNull = 'compare.null'\n public static readonly compareNonNull = 'compare.nonnull'\n public static readonly compareGreaterThan = 'compare.greaterThan'\n public static readonly compareGreaterThanEquals = 'compare.greaterThanEquals'\n public static readonly compareLessThan = 'compare.lessThan'\n public static readonly compareLessThanEquals = 'compare.lessThanEquals'\n\n // Init\n public static readonly initNewArray = 'init.array'\n public static readonly initNewDictionary = 'init.dictionary'\n public static readonly initNewDate = 'init.date'\n public static readonly initNewNull = 'init.null'\n public static readonly initNewNumber = 'init.number'\n public static readonly initNewString = 'init.string'\n\n // Random\n public static readonly randomNumber = 'random.number'\n public static readonly randomNumberArray = 'random.numericArray'\n public static readonly randomString = 'random.string'\n public static readonly randomStringArray = 'random.stringArray'\n\n // Support\n public static readonly supportArraysToZippedMap = 'support.arraysToZippedMap'\n public static readonly varDefined = 'support.varDefined'\n public static readonly varMutable = 'support.varMutable'\n public static readonly varGlobal = 'support.varGlobal'\n\n // Network\n public static readonly networkGetAnonymous = 'network.get.anonymous'\n public static readonly networkGetBasicAuth = 'network.get.basicAuth'\n public static readonly networkGetBearerAuth = 'network.get.bearerAuth'\n}\n","//\n// PLKeywordsTransformers.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLBlueprint Definition\n\nexport class PLKeywordsTransformers {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Numeric\n public static readonly absolute = 'absolute'\n public static readonly addedBy = 'addedBy'\n public static readonly ceiled = 'ceiled'\n public static readonly dividedBy = 'dividedBy'\n public static readonly floored = 'floored'\n public static readonly multipliedBy = 'multipliedBy'\n public static readonly negative = 'negative'\n public static readonly positive = 'positive'\n public static readonly rounded = 'rounded'\n public static readonly subtractedBy = 'subtractedBy'\n\n // String\n public static readonly camelcased = 'camelcased'\n public static readonly capizalited = 'capitalized'\n public static readonly contains = 'contains'\n public static readonly default = 'default'\n public static readonly equals = 'equals'\n public static readonly equalsTernary = 'equalsTernary'\n public static readonly extended = 'extended'\n public static readonly lowercased = 'lowercased'\n public static readonly prefixed = 'prefixed'\n public static readonly replacing = 'replacing'\n public static readonly slashDoubleQuotes = 'slashDoubleQuotes'\n public static readonly slashNewlines = 'slashNewlines'\n public static readonly slashSingleQuotes = 'slashSingleQuotes'\n public static readonly snakecased = 'snakecased'\n public static readonly split = 'split'\n public static readonly splitExpr = 'splitExpr'\n public static readonly substring = 'substring'\n public static readonly suffixed = 'suffixed'\n public static readonly trimming = 'trimming'\n public static readonly trimmingSpaces = 'trimmingSpaces'\n public static readonly uppercased = 'uppercased'\n\n // Shared\n public static readonly count = 'count'\n public static readonly formatDate = 'formatDate'\n public static readonly isArray = 'isArray'\n public static readonly isBool = 'isBool'\n public static readonly isDictionary = 'isDictionary'\n public static readonly isNull = 'isNull'\n public static readonly isNumber = 'isNumber'\n public static readonly isString = 'isString'\n public static readonly toString = 'toString'\n\n // Array\n public static readonly join = 'join'\n public static readonly append = 'append'\n public static readonly at = 'at'\n public static readonly concat = 'concat'\n public static readonly enumerated = 'enumerated'\n public static readonly first = 'first'\n public static readonly from = 'from'\n public static readonly random = 'random'\n public static readonly range = 'range'\n public static readonly reversed = 'reversed'\n public static readonly shuffled = 'shuffled'\n public static readonly sorted = 'sorted'\n public static readonly until = 'until'\n\n // Map\n public static readonly add = 'add'\n public static readonly keys = 'keys'\n public static readonly value = 'value'\n public static readonly alwaysRootValue = 'alwaysRootValue'\n public static readonly values = 'values'\n}\n","//\n// PLDebugger.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLError } from '../parser/errors/LanguageError'\nimport { PLErrorSourceType } from '../parser/errors/LanguageErrorAnalysis'\nimport { SyntaxNode } from '../parser/syntax/nodes/SyntaxNode'\nimport { ConcreteToken } from '../parser/Tokenization/Concrete/ConcreteToken'\nimport { LexicalToken } from '../parser/Tokenization/Lexical/LexicalToken'\nimport { PLDebuggerErrorBuilder } from './DebuggerErrorBuilder'\nimport { PLSymbolTable } from '../parser/symbols/SymbolTable'\nimport { PLParserConcreteError, PLParserLexicalError, PLParserSyntaxError } from './DebuggerErrors'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLDebugger Definition\n\nexport class PLDebugger {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n symbolTable: PLSymbolTable\n errorBuilder: PLDebuggerErrorBuilder\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {\n this.symbolTable = new PLSymbolTable('')\n this.errorBuilder = new PLDebuggerErrorBuilder(this.symbolTable)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Error reporting\n\n reportError(error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError): PLError {\n return this.errorBuilder.error(error, null, [])\n }\n\n reportAnalysisError(error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError): PLError {\n return this.errorBuilder.error(error, PLErrorSourceType.analyzer, [])\n }\n\n reportRuntimeError(error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError): PLError {\n return this.errorBuilder.error(error, PLErrorSourceType.analyzer, [])\n }\n\n reportAnalysisErrorFromLexicalToken(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n token: LexicalToken\n ): PLError {\n return this.errorBuilder.error(error, PLErrorSourceType.analyzer, [token.debugSymbol])\n }\n\n reportAnalysisErrorFromLexicalTokens(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n tokens: Array<LexicalToken>\n ): PLError {\n let symbols = this.nonEmptyDebugSymbolsFromLexicalTokens(tokens)\n return this.errorBuilder.error(error, PLErrorSourceType.analyzer, symbols)\n }\n\n reportAnalysisErrorFromConcreteToken(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n token: ConcreteToken\n ): PLError {\n return this.errorBuilder.error(error, PLErrorSourceType.analyzer, [token.debugSymbol])\n }\n\n reportAnalysisErrorFromConcreteTokens(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n tokens: Array<ConcreteToken>\n ): PLError {\n let symbols = this.nonEmptyDebugSymbolsFromConcreteTokens(tokens)\n return this.errorBuilder.error(error, PLErrorSourceType.analyzer, symbols)\n }\n\n reportAnalysisErrorFromSyntaxNode(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n syntaxNode: SyntaxNode\n ): PLError {\n return this.errorBuilder.error(error, PLErrorSourceType.analyzer, [syntaxNode.debugSymbol])\n }\n\n reportAnalysisErrorFromSyntaxNodes(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n syntaxNode: Array<SyntaxNode>\n ): PLError {\n let symbols = this.nonEmptyDebugSymbolsFromSyntaxNodes(syntaxNode)\n return this.errorBuilder.error(error, PLErrorSourceType.analyzer, symbols)\n }\n\n reportRuntimeErrorFromSyntaxNode(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n syntaxNode: SyntaxNode\n ): PLError {\n return this.errorBuilder.error(error, PLErrorSourceType.runtime, [syntaxNode.debugSymbol])\n }\n\n reportRuntimeErrorFromSyntaxNodes(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n syntaxNode: Array<SyntaxNode>\n ): PLError {\n let symbols = this.nonEmptyDebugSymbolsFromSyntaxNodes(syntaxNode)\n return this.errorBuilder.error(error, PLErrorSourceType.runtime, symbols)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n nonEmptyDebugSymbolsFromLexicalTokens(tokens: Array<LexicalToken>): Array<string> {\n return tokens.filter(t => t.debugSymbol !== null).map(t => t.debugSymbol)\n }\n\n nonEmptyDebugSymbolsFromConcreteTokens(tokens: Array<ConcreteToken>): Array<string> {\n return tokens.filter(t => t.debugSymbol !== null).map(t => t.debugSymbol)\n }\n\n nonEmptyDebugSymbolsFromSyntaxNodes(syntaxNodes: Array<SyntaxNode>): Array<string> {\n return syntaxNodes.filter(t => t.debugSymbol !== null).map(t => t.debugSymbol)\n }\n}\n","//\n// DebuggerErrorBuilder.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLError } from '../parser/errors/LanguageError'\nimport {\n PLErrorAnalysis,\n PLErrorRange,\n PLErrorSeverityType,\n PLErrorSourceType\n} from '../parser/errors/LanguageErrorAnalysis'\nimport { Symbol } from '../parser/symbols/Symbol'\nimport { PLSymbolTable } from '../parser/symbols/SymbolTable'\nimport { PLDebuggerErrors, PLParserConcreteError, PLParserLexicalError, PLParserSyntaxError } from './DebuggerErrors'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLDebuggerErrorBuilder Definition\n\nexport class PLDebuggerErrorBuilder {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n symbolTable: PLSymbolTable\n errors: PLDebuggerErrors\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(symbolTable: PLSymbolTable) {\n this.symbolTable = symbolTable\n this.errors = new PLDebuggerErrors()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Error reporting\n\n error(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n source: PLErrorSourceType | null,\n symbols: Array<string>\n ): PLError {\n return this.errorOfType(PLErrorSeverityType.error, error, source, symbols)\n }\n\n warning(\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n source: PLErrorSourceType | null,\n symbols: Array<string>\n ): PLError {\n return this.errorOfType(PLErrorSeverityType.warning, error, source, symbols)\n }\n\n private errorOfType(\n type: PLErrorSeverityType,\n error: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError,\n source: PLErrorSourceType | null,\n symbolIds: Array<string>\n ): PLError {\n let symbols = symbolIds.map(s => {\n let symbol = this.symbolTable.symbolById(s)\n if (!symbol) {\n throw 'Unknown symbol in symbolication table requested. This is an engine error, not syntax error.'\n }\n return symbol\n })\n let analysis = new PLErrorAnalysis(type, source, this.symbolsToRange(symbols))\n let errorMessage = this.errors.errorTypeToMessage(error)\n return new PLError(errorMessage, analysis)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n symbolsToRange(symbols: Array<Symbol>): PLErrorRange | null {\n // Range can't be created from no symbols provided\n if (symbols.length === 0) {\n return null\n }\n\n // Will be immediately overriden by first symbol\n let startLine = -1\n let startChar = -1\n let endLine = -1\n let endChar = -1\n\n // Form proper range from minimum to maximum over multiple lines\n symbols.forEach(token => {\n if (startLine > token.startLine || startLine === -1) {\n startLine = token.startLine\n startChar = token.startChar\n }\n if (endLine < token.endLine || endLine === -1) {\n endLine = token.endLine\n token.endChar\n }\n\n if (token.startLine === startLine && startChar > token.startChar) {\n startChar = token.startChar\n }\n if (token.endLine === endLine && endChar < token.endChar) {\n endChar = token.endChar\n }\n })\n\n // Return the range\n return {\n startLine: startLine,\n endLine: endLine,\n startChar: startChar,\n endChar: endChar\n }\n }\n}\n","//\n// DebuggerErrors.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Error Definitions\n\nexport enum PLParserLexicalError {}\n\nexport enum PLParserConcreteError {\n unclosedCommentTag = 'unclosedCommentTag',\n unclosedFlowTag = 'unclosedFlowTag',\n enclosingFlowTagPrecedingFlowDefinition = 'enclosingFlowTagPrecedingFlowDefinition',\n missingOpeningSubstitutionTag = 'missingOpeningSubstitutionTag',\n missingOpeningCommentTag = 'missingOpeningCommentTag',\n missingOpeningFlowTag = 'missingOpeningFlowTag',\n editorPlaceholderFound = 'editorPlaceholderFound',\n unclosedSubstitutionTag = 'unclosedSubstitutionTag',\n invalidSubstitutionStructure = 'invalidSubstitutionStructure',\n invalidFlowStructure = 'invalidFlowStructure',\n textTokenRequired = 'textTokenRequired'\n}\n\nexport enum PLParserSyntaxError {\n missingEnclosingFlowTag = 'missingEnclosingFlowTag'\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLDebuggerErrorBuilder Definition\n\nexport class PLDebuggerErrors {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n messageTable: Object\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {\n this.messageTable = this.generateMessageTable()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Error Construction\n\n errorTypeToMessage(type: PLParserLexicalError | PLParserConcreteError | PLParserSyntaxError): string {\n let errorMessage = this.messageTable[type.toString()]\n if (errorMessage) {\n return errorMessage\n }\n // If there is no error, retrieve defined tag\n return type.toString()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Table construction\n\n generateMessageTable(): Object {\n return {\n // Lexical errors\n\n // Concrete errors\n missingOpeningSubstitutionTag: 'Substitution closure }} found, but opening tag {{ is missing before it',\n missingOpeningCommentTag: 'Comment closure *} found, but opening tag {* is missing before it',\n missingOpeningFlowTag: 'Flow closuse ]} found, but opening tag {[ is missing before it',\n editorPlaceholderFound: 'Editor placeholder must be replaced with real value before running the blueprint',\n flowTextNotAllowedAfterDefinition: 'Flow definition must not have any other definition following it',\n unclosedFlowTag: 'Found opening flow tag {[, but its closure ]} is missing',\n enclosingFlowTagPrecedingFlowDefinition:\n 'Enclosing flow tag ]} can not precede its opening tag. Correct flow definition is {[ ]} or {[ /]}',\n unclosedSubstitutionTag: 'Found opening substitution tag {{, but tag }} to close it is missing',\n invalidSubstitutionStructure:\n 'Substitution tag missing its definition. Substitution must be defined in format of {{ [definition] }}',\n unclosedCommentTag: 'Found opening comment tag {*, but tag *} to close it is missing',\n invalidFlowStructure: 'Flow tag missing its definition. Flow must be defined in format of {[ [definition] ]}',\n textTokenRequired: 'Text definition required in-between tags',\n\n // Syntax errors\n missingEnclosingFlowTag: 'Each opened flow must be closed with {[/]}'\n }\n }\n}\n","// Blueprints and creation\nexport { PLBlueprint } from './blueprints/Blueprint'\nexport { PLBlueprintFactory } from './blueprints/BlueprintFactory'\nexport { PLBlueprintConfiguration } from './blueprints/BlueprintConfiguration'\n\n// Language core functionality\nexport { PLExecutionContext } from './interpreter/ExecutionContext'\n\n// Language interpreter\nexport { PLInterpreter } from './interpreter/Interpreter'\nexport { PLInterpreterContext } from './interpreter/InterpreterContext'\n\n// Loaders\nexport { PLMemoryBlueprintLoader } from './interpreter/loaders/MemoryBlueprintLoader'\n\n// Emitters\nexport { PLEmittedContent } from './interpreter/emitters/EmittedContent'\nexport { PLBlueprintEmitter } from './interpreter/emitters/BlueprintEmitter'\nexport { PLMemoryBlueprintEmitter } from './interpreter/emitters/MemoryBlueprintEmitter'\n\n// DSM Extension\nexport { DSMExecutionContext } from './extensions/dsm/DSMExecutionContext'\nexport { DSMBridge, DSMBridgeConfiguration } from './extensions/dsm/DSMBridge'\n\n// Tooling\nexport { PLHighlightEngineToken } from './tools/highlight/HighlightEngine'\nexport { PLBlueprintHighlightEngine } from './tools/highlight/BlueprintHighlightEngine'\nexport { PLHighlightEngineStyle, PLHighlightEngineStyleFont } from './tools/highlight/HighlightEngine'\nexport { PLBlueprintAutocompleteEngine } from './tools/autocomplete/BlueprintAutocompleteEngine'\nexport { PLAutocompleteBlueprintSnippets } from './tools/autocomplete/BlueprintSnippets'\n","//\n// DSMAuthenticator.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport axios from 'axios'\n\nexport interface DSMBridgeConfiguration {\n apiUrl: string\n apiVersion?: string\n accessToken: string\n designSystemId: string\n dsVersionId: string\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMBridge {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n authToken: string\n dsmVersion: string\n dsmId: string\n dsmDataRequestURL: string\n dsmMetadataRequestURL: string\n dsmVersionRequestURL: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(conf: DSMBridgeConfiguration) {\n this.authToken = conf.accessToken\n this.dsmId = conf.designSystemId\n this.dsmVersion = conf.dsVersionId\n\n const { apiVersion, apiUrl } = conf\n\n if (apiVersion === '0.1') {\n // Should probably be taken from configuration later down the road\n // Data request URL - data from specific design system (tokens, components..)\n this.dsmDataRequestURL = `${apiUrl}/dsm/versions/${this.dsmVersion}`\n\n // Metadata url - information about specific design system (metadata)\n this.dsmMetadataRequestURL = `${apiUrl}/dsm/design-systems/${this.dsmId}`\n\n // Version url - information about specific versions (metadata)\n this.dsmVersionRequestURL = `${apiUrl}/dsm/versions`\n } else if (apiVersion === '0.2') {\n // Data request URL - data from specific design system (tokens, components..)\n this.dsmDataRequestURL = `${apiUrl}/design-systems/${this.dsmId}/versions/${this.dsmVersion}`\n // Metadata url - information about specific design system (metadata)\n this.dsmMetadataRequestURL = `${apiUrl}/design-systems/${this.dsmId}`\n // Version url - information about specific versions (metadata)\n this.dsmVersionRequestURL = `${apiUrl}/design-systems/${this.dsmId}/versions`\n } else {\n throw new Error(`Can't build API urls: unknown API version (${apiVersion})`)\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Tokens\n\n async getToken(): Promise<string> {\n // TODO: Make sure it can refresh automatically when needed\n return this.authToken\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Authenticated data fetching\n\n async getDSMDataFromEndpoint(endpoint: string, filter: ((result: any) => any) | null): Promise<any> {\n let url = `${this.dsmDataRequestURL}/${endpoint}`\n return this.getDataForAuthenticatedEndpoint(url, filter)\n }\n\n async getDSMMetadataFromEndpoint(endpoint: string, filter: ((result: any) => any) | null): Promise<any> {\n let url = `${this.dsmMetadataRequestURL}/${endpoint}`\n return this.getDataForAuthenticatedEndpoint(url, filter)\n }\n\n async getDSMVersionDataFromEndpoint(endpoint: string, filter: ((result: any) => any) | null): Promise<any> {\n let url = `${this.dsmVersionRequestURL}/${endpoint}`\n return this.getDataForAuthenticatedEndpoint(url, filter)\n }\n\n private async getDataForAuthenticatedEndpoint(\n requestURL: string,\n filter: ((result: any) => any) | null\n ): Promise<any> {\n // Fetch token\n let refreshedToken = await this.getToken()\n\n // Authorized config\n const config = {\n headers: { Authorization: `Bearer ${refreshedToken}` }\n }\n\n // Make authorized dsm request\n return new Promise((resolve, reject) => {\n // Fetch the data\n axios\n .get(requestURL, config)\n .then(result => {\n // Filter the data from the API, if needed (if we only need a certain part of the retrieved tree)\n let data = result.data.result\n if (filter) {\n data = filter(data)\n }\n\n // Map the data\n resolve(data)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n\n /** This function is not meant for production! Only use in tests */\n static async getAccessToken(username: string, password: string): Promise<string> {\n // Create payload\n const data = {\n email: username,\n password: password\n }\n\n const requestURL = `https://dev.api2.supernova.io/api/user-dev/login`\n\n // Retrieve access token for the request\n return new Promise((resolve, reject) => {\n // Fetch the data\n axios\n .post(requestURL, data)\n .then(result => {\n // console.log(`resolved access token with data ${JSON.stringify(result.data)}`)\n resolve(result.data.result.access_token)\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n}\n","//\n// DSMExecutionContext.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMBridge } from './DSMBridge'\nimport { PLExecutionContext } from './../../interpreter/ExecutionContext'\nimport { PLFlow } from './../../interpreter/flows/Flow'\nimport { PLTransformer } from './../../interpreter/transformers/Transformer'\nimport { PLFunction } from './../../interpreter/functions/Function'\nimport { PLLogger } from './../../interpreter/loggers/Logger'\nimport { PLBlueprintLoader } from './../../interpreter/loaders/BlueprintLoader'\nimport { PLBlueprintEmitter } from './../../interpreter/emitters/BlueprintEmitter'\n\n// Functions\nimport { DSMFunctionAllTokens } from './functions/tokens/DSMFunctionAllTokens'\nimport { DSMFunctionAllFontAssets } from './functions/assets/DSMFunctionAllFontAssets'\nimport { DSMFunctionAllComponents } from './functions/components/DSMFunctionAllComponents'\nimport { DSMFunctionAllFontTokens } from './functions/tokens/DSMFunctionAllFontTokens'\nimport { DSMFunctionTokenById } from './functions/tokens/DSMFunctionTokenById'\nimport { DSMFunctionAllShadowTokens } from './functions/tokens/DSMFunctionAllShadowTokens'\nimport { DSMFunctionAllRadiusTokens } from './functions/tokens/DSMFunctionAllRadiusTokens'\nimport { DSMFunctionAllMeasureTokens } from './functions/tokens/DSMFunctionAllMeasureTokens'\nimport { DSMFunctionAllImageTokens } from './functions/tokens/DSMFunctionAllImageTokens'\nimport { DSMFunctionAllGradientTokens } from './functions/tokens/DSMFunctionAllGradientTokens'\nimport { DSMFunctionAllColorTokens } from './functions/tokens/DSMFunctionAllColorTokens'\nimport { DSMFunctionAllComponentGroups } from './functions/groups/DSMFunctionAllComponentGroups'\nimport { DSMFunctionAllTokenGroups } from './functions/groups/DSMFunctionAllTokenGroups'\nimport { DSMFunctionVersionById } from './functions/dsms/DSMFunctionVersionById'\nimport { DSMFunctionMetadata } from './functions/dsms/DSMFunctionMetadata'\nimport { DSMFunctionAllVersions } from './functions/dsms/DSMFunctionAllVersions'\nimport { DSMFunctionComponentById } from './functions/components/DSMFunctionComponentById'\nimport { DSMFunctionAssetById } from './functions/assets/DSMFunctionAssetById'\nimport { DSMFunctionAllBitmapAssets } from './functions/assets/DSMFunctionAllBitmapAssets'\nimport { DSMFunctionAllAssets } from './functions/assets/DSMFunctionAllAssets'\nimport { DSMFunctionAllThemes } from './functions/DSMFunctionAllThemes'\nimport { DSMFunctionResolveTokens } from './resolver/DSMFunctionResolveTokens'\nimport { DSMFunctionResolveTheme } from './resolver/DSMFunctionResolveTheme'\nimport { DSMFunctionSandboxDataByComponentId } from './functions/sandbox/DSMFunctionSandboxDataByComponentId'\nimport { DSMFunctionAllTypographyTokens } from './functions/tokens/DSMFunctionAllTypographyTokens'\nimport { DSMFunctionFontWeight } from './functions/fonts/DSMFunctionFontWeight'\nimport { DSMFunctionFontIsItalic } from './functions/fonts/DSMFunctionFontIsItalic'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLExecutionContext Definition\n\nexport class DSMExecutionContext extends PLExecutionContext {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n bridge: DSMBridge\n sandboxData: Object\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(\n blueprintLoader: PLBlueprintLoader = new PLBlueprintLoader(),\n blueprintEmitter: PLBlueprintEmitter = new PLBlueprintEmitter(),\n logger: PLLogger = new PLLogger(),\n bridge: DSMBridge,\n sandboxData: Object\n ) {\n super(blueprintLoader, blueprintEmitter, logger)\n this.bridge = bridge\n this.sandboxData = sandboxData\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Custom Language Feature Loading\n\n provideCustomFunctions(): Array<PLFunction> {\n // Provide custom DSM functions\n return [\n // Assets\n new DSMFunctionAllAssets(),\n new DSMFunctionAllBitmapAssets(),\n new DSMFunctionAllFontAssets(),\n new DSMFunctionAssetById(),\n\n // Components\n new DSMFunctionAllComponents(),\n new DSMFunctionComponentById(),\n\n // DSM metadata\n new DSMFunctionAllVersions(),\n new DSMFunctionMetadata(),\n new DSMFunctionVersionById(),\n\n // Groups\n new DSMFunctionAllTokenGroups(),\n new DSMFunctionAllComponentGroups(),\n\n // Tokens\n new DSMFunctionAllTokens(),\n new DSMFunctionAllColorTokens(),\n new DSMFunctionAllFontTokens(),\n new DSMFunctionAllGradientTokens(),\n new DSMFunctionAllImageTokens(),\n new DSMFunctionAllMeasureTokens(),\n new DSMFunctionAllRadiusTokens(),\n new DSMFunctionAllShadowTokens(),\n new DSMFunctionAllTypographyTokens(),\n new DSMFunctionTokenById(),\n\n // Themes\n new DSMFunctionAllThemes(),\n\n // Resolution\n new DSMFunctionResolveTokens(),\n new DSMFunctionResolveTheme(),\n\n // Sandbox\n new DSMFunctionSandboxDataByComponentId(),\n\n // Fonts\n new DSMFunctionFontWeight(),\n new DSMFunctionFontIsItalic()\n ]\n }\n\n provideCustomTransformers(): Array<PLTransformer> {\n // Provide custom DSM transformers\n return []\n }\n\n provideCustomFlows(): Array<PLFlow> {\n // Provide custom DSM flows\n return []\n }\n}\n","//\n// DSMKeywordsFunctions.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Keywords\n\nexport class DSMKeywordsFunctions {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // Assets\n public static readonly allAssets = 'dsm.allAssets'\n public static readonly assetById = 'dsm.assetById'\n public static readonly allFontAssets = 'dsm.allFontAsset'\n public static readonly allBitmapAssets = 'dsm.allBitmapAssets'\n\n // Tokens\n public static readonly allTokens = 'dsm.allTokens'\n public static readonly allThemes = 'dsm.allThemes'\n public static readonly resolveTokens = 'dsm.resolveTokens'\n public static readonly resolveTheme = 'dsm.resolveTheme'\n public static readonly tokenById = 'dsm.tokenById'\n public static readonly allImageTokens = 'dsm.allImageTokens'\n public static readonly allMeasureTokens = 'dsm.allMeasureTokens'\n public static readonly allRadiusTokens = 'dsm.allRadiusTokens'\n public static readonly allColorTokens = 'dsm.allColorTokens'\n public static readonly allFontTokens = 'dsm.allFontTokens'\n public static readonly allGradientTokens = 'dsm.allGradientTokens'\n public static readonly allShadowTokens = 'dsm.allShadowTokens'\n public static readonly allBorderTokens = 'dsm.allBorderTokens'\n public static readonly allTypographyTokens = 'dsm.allTypographyTokens'\n\n // Components\n public static readonly allComponents = 'dsm.allComponents'\n public static readonly componentById = 'dsm.componentById'\n\n // Groups\n public static readonly allComponentGroups = 'dsm.allComponentGroups'\n public static readonly allTokenGroups = 'dsm.allTokenGroups'\n\n // Themes: TODO when implemented\n\n // Documentation: TODO when implemented\n\n // DSM structure and potential management\n public static readonly allVersions = 'dsm.allVersions'\n public static readonly versionById = 'dsm.versionById'\n public static readonly metadata = 'dsm.metadata'\n\n // Sandbox\n public static readonly sandboxDataByComponentId = 'sandbox.componentDataById'\n\n // Fonts\n public static readonly fontsIsItalic = 'dsm.fonts.isItalic'\n public static readonly fontsWeight = 'dsm.fonts.weight'\n}\n","//\n// DSMFunctionAllTokens.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllThemes extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allThemes\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'themes'\n\n // Access dsm data\n const filter = data => {\n return data.themes\n }\n const result = await executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n return result\n }\n}\n","//\n// DSMFunctionAllAssets.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllAssets extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allAssets\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'assets'\n\n // Access dsm data\n const filter = data => {\n return data.assets\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllBitmapAssets.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllBitmapAssets extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allBitmapAssets\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'assets?type=image'\n\n // Access dsm data\n const filter = data => {\n return data.assets\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllFontAssets.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllFontAssets extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allFontAssets\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'assets?type=font'\n\n // Access dsm data\n const filter = data => {\n return data.assets\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAssetById.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAssetById extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.assetById\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Parse asset id\n let assetId = await this.expectString(0, args, context, executionContext)\n\n // Access point\n const endpoint = `assets/${assetId}`\n\n // Access dsm data\n const filter = data => {\n return data.asset\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllComponents.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllComponents extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allComponents\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'components'\n\n // Access dsm data\n const filter = data => {\n return data.components\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionComponentById.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionComponentById extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.componentById\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Parse token id\n let componentId = await this.expectString(0, args, context, executionContext)\n\n // Access point\n const endpoint = `components/${componentId}`\n\n // Access dsm data\n const filter = data => {\n return data.component\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllVersions.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllVersions extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allVersions\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'versions'\n\n // Access dsm data\n const filter = data => {\n return data.designSystemVersions\n }\n return executionContext.bridge.getDSMMetadataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionMetadata.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionMetadata extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.metadata\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = '' // Base metadata call has no endpoint, just the base url\n\n // Access dsm data. Note that in this case, there is no\n const filter = data => {\n return data.designSystem\n }\n return executionContext.bridge.getDSMMetadataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionVersionById.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionVersionById extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.versionById\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Parse token id\n let versionId = await this.expectString(0, args, context, executionContext)\n\n // Access point\n const endpoint = `${versionId}`\n\n // Access version data\n const filter = data => {\n return data.designSystemVersion\n }\n return executionContext.bridge.getDSMVersionDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionVersionById.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionFontIsItalic extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.fontsIsItalic\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Get font definition\n let definition = await this.expectAny(0, args, context, executionContext)\n\n let subfamily = ''\n if (definition instanceof Object) {\n subfamily = definition['subfamily']\n } else if (definition instanceof Map) {\n subfamily = definition.get('subfamily')\n } else {\n throw 'Font weight can only be obtained from proper font definition'\n }\n\n // Parses only standard subfamilies. Some fonts are not supported (Avenir).\n subfamily = subfamily.toLowerCase()\n if (subfamily.includes('italic')) return true\n\n return false\n }\n}\n","//\n// DSMFunctionVersionById.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionFontWeight extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.fontsWeight\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Get font definition\n let definition = await this.expectAny(0, args, context, executionContext)\n\n let subfamily = ''\n if (definition instanceof Object) {\n subfamily = definition['subfamily']\n } else if (definition instanceof Map) {\n subfamily = definition.get('subfamily')\n } else {\n throw 'Font weight can only be obtained from proper font definition'\n }\n\n // Parses only standard subfamilies. Some fonts are not supported (Avenir).\n subfamily = subfamily.toLowerCase()\n if (subfamily.includes('thin')) return 100\n if (subfamily.includes('extralight')) return 200\n if (subfamily.includes('light')) return 300\n if (subfamily.includes('medium')) return 500\n if (subfamily.includes('semibold')) return 600\n if (subfamily.includes('bold')) return 700\n if (subfamily.includes('extrabold')) return 800\n if (subfamily.includes('black')) return 900\n\n return 400\n }\n}\n","//\n// DSMFunctionAllComponentGroups.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllComponentGroups extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allComponentGroups\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'component-groups'\n\n // Access dsm data\n const filter = data => {\n return data.groups\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllTokenGroups.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllTokenGroups extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allTokenGroups\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'token-groups'\n\n // Access dsm data\n const filter = data => {\n return data.groups\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionComponentById.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\nimport { PLDoc, DocArgument, DocDataTypePredefinedType } from '../../../../tools/documentation/Doc'\nimport { DSMFunctionComponentById } from '../components/DSMFunctionComponentById'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionSandboxDataByComponentId extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.sandboxDataByComponentId\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('componentId', 'ID of currently exported component', DocDataTypePredefinedType.string),\n PLDoc.arg('value', 'Value of newly added object', DocDataTypePredefinedType.any)\n ]\n\n return PLDoc.functionDoc(\n this,\n `Provides data for all properties of one specific component inside component sandbox.\\n\\n\n Note that inside code editor, sandbox data will be filled with simulated values. Inside sandbox, the data will be either default provided by developers, or overrides set in the sandbox itself.\\n\\n\n Data are presented as a map with keys being the ids of all exposed code properties.`,\n DocDataTypePredefinedType.dict,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Retrieve sandbox data if any were provided\n if (executionContext.sandboxData) {\n return executionContext.sandboxData\n }\n\n // Otherwise, download component data and create temporary values from the provided properties\n let componentDetail = new DSMFunctionComponentById()\n let result = await componentDetail.provideValueUsingArguments(args, context, executionContext)\n return this.prepareTemporarySandboxDataFromResult(result)\n }\n\n prepareTemporarySandboxDataFromResult(result: any): Object {\n let temporaryData = {}\n let codeProperties = (result.exportProperties?.codeInfo?.properties ?? []) as Array<any>\n for (let property of codeProperties) {\n let id = property.id as string\n let type = property.type as string\n let value: any = null\n switch (type) {\n case 'Plain':\n value = this.randomConstant()\n break\n case 'String':\n value = this.randomString()\n break\n case 'Number':\n value = Math.floor(Math.random() * 100 - 50) + 50\n break\n case 'Boolean':\n value = this.randomBoolean()\n break\n case 'DesignProperty':\n value = {\n type: 'Color',\n value: 'FFFFFF'\n }\n break\n }\n temporaryData[id] = value\n }\n\n return temporaryData\n }\n\n randomString(): string {\n let randomData = [\n 'Oskar',\n 'Jiri',\n 'Artem',\n 'Ydus',\n 'Andy',\n 'Seva',\n 'Ivan',\n 'Augusto',\n 'Tomas',\n 'Ray',\n 'Matej',\n 'Jan',\n 'Filip'\n ]\n\n return randomData[Math.floor(Math.random() * randomData.length)]\n }\n\n randomConstant(): string {\n let randomData = [\n 'TextAlign.left',\n 'TextAlign.right',\n 'TextAlign.top',\n 'TextAlign.bottom',\n 'TextAlign.topRight',\n 'TextAlign.bottomRight'\n ]\n\n return randomData[Math.floor(Math.random() * randomData.length)]\n }\n\n randomBoolean(): boolean {\n let randomData = [true, false]\n\n return randomData[Math.floor(Math.random() * randomData.length)]\n }\n}\n","//\n// DSMFunctionAllColorTokens.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllColorTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allColorTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'tokens?types[]=Color'\n\n // Access dsm data\n const filter = data => {\n return data.tokens\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllFontTokens.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllFontTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allFontTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'tokens?types[]=Font'\n\n // Access dsm data\n const filter = data => {\n return data.tokens\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllGradientTokens.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllGradientTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allGradientTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'tokens?types[]=Gradient'\n\n // Access dsm data\n const filter = data => {\n return data.tokens\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllImageTokens.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllImageTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allImageTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'tokens?types[]=Image'\n\n // Access dsm data\n const filter = data => {\n return data.tokens\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllMeasureTokens.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllMeasureTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allMeasureTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'tokens?types[]=Measure'\n\n // Access dsm data\n const filter = data => {\n return data.tokens\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllRadiusTokens.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllRadiusTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allRadiusTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'tokens?types[]=Radius'\n\n // Access dsm data\n const filter = data => {\n return data.tokens\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllShadowTokens.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllShadowTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allShadowTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'tokens?types[]=Shadow'\n\n // Access dsm data\n const filter = data => {\n return data.tokens\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllTokens.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'tokens'\n\n // Access dsm data\n const filter = data => {\n return data.tokens\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionAllTypographies.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionAllTypographyTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.allTypographyTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Access point\n const endpoint = 'tokens?types[]=Typography'\n\n // Access dsm data\n const filter = data => {\n return data.tokens\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionTokenById.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../../configuration/DSMKeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionTokenById extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.tokenById\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n // Parse token id\n let tokenId = await this.expectString(0, args, context, executionContext)\n\n // Access point\n const endpoint = `tokens/${tokenId}`\n\n // Access dsm data, and retrieve token. Note that token comes in tokens[], so we extract it\n const filter = data => {\n return data.tokens[0]\n }\n return executionContext.bridge.getDSMDataFromEndpoint(endpoint, filter)\n }\n}\n","//\n// DSMFunctionResolveTheme.ts\n// Pulsar Language\n//\n// Created by Ivan Terpugov.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../configuration/DSMKeywordsFunctions'\nimport { resolveTheme } from './DSMResolver'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionResolveTheme extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.resolveTheme\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n let theme = await this.expectAny(0, args, context, executionContext)\n let tokens = await this.expectArray(1, args, context, executionContext)\n return resolveTheme(theme, tokens)\n }\n}\n","//\n// DSMFunctionResolveTokens.ts\n// Pulsar Language\n//\n// Created by Ivan Terpugov.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DSMExecutionContext } from '../DSMExecutionContext'\nimport { PLInterpreterContext } from '../../../interpreter/InterpreterContext'\nimport { PLFunctionArgument } from '../../../interpreter/functions/FunctionArgument'\nimport { PLFunction } from '../../../interpreter/functions/Function'\nimport { DSMKeywordsFunctions } from '../configuration/DSMKeywordsFunctions'\nimport { resolveTokens } from './DSMResolver'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class DSMFunctionResolveTokens extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return DSMKeywordsFunctions.resolveTokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: DSMExecutionContext\n ): Promise<any | null> {\n let tokens = await this.expectArray(0, args, context, executionContext)\n return resolveTokens(tokens)\n }\n}\n","//\n// DSMResolver.ts\n// Pulsar Language\n//\n// Created by Ivan Terpugov.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\nimport { isNil } from 'lodash'\nimport {\n RawBorderValue,\n RawGradientValue,\n RawRadiusValue,\n RawShadowValue,\n ResolvedBorderValue,\n ResolvedGradientValue,\n ResolvedRadiusValue,\n ResolvedShadowValue,\n ResolvedTypographyValue,\n ResolvedToken,\n Theme,\n Token,\n TokenType,\n RawTypographyValue\n} from './types'\n\nexport function resolveToken(token: Token, tokens: Token[]): ResolvedToken {\n if (isNil(token)) {\n throw 'Trying to resolve null token, probably resolving optional part of some more complex token'\n }\n const { aliasTo } = token.data\n if (isNil(aliasTo)) {\n return {\n source: token,\n type: token.type,\n meta: token.meta,\n // valueSource: token.id,\n value: token.data.value\n }\n } else {\n for (const t of tokens) {\n if (t.persistentId === aliasTo) {\n const resolved = resolveToken(t, tokens)\n return {\n source: token,\n meta: token.meta,\n type: token.type,\n value: resolved.value,\n aliasTo: t\n // valueSource: resolved.valueSource,\n }\n }\n }\n }\n throw new Error('Unable to resolve token ' + JSON.stringify(token))\n}\n\nexport function resolveGradientValue(value: RawGradientValue, tokens: Token[]): ResolvedGradientValue {\n const resolvedStops = value.stops.map(stop => {\n return {\n position: stop.position,\n color: resolveToken({ data: stop.color }, tokens)\n }\n })\n\n return {\n ...value,\n stops: resolvedStops\n }\n}\n\nexport function resolveBorderValue(value: RawBorderValue, tokens: Token[]): ResolvedBorderValue {\n const color = resolveToken({ data: value.color }, tokens)\n const width = resolveToken({ data: value.width }, tokens)\n return {\n ...value,\n color,\n width\n }\n}\n\nexport function resolveRadiusValue(value: RawRadiusValue, tokens: Token[]): ResolvedRadiusValue {\n const radius = value.radius && resolveToken({ data: value.radius }, tokens)\n const topLeft = value.topLeft && resolveToken({ data: value.topLeft }, tokens)\n const topRight = value.topRight && resolveToken({ data: value.topRight }, tokens)\n const bottomRight = value.bottomRight && resolveToken({ data: value.bottomRight }, tokens)\n const bottomLeft = value.bottomLeft && resolveToken({ data: value.bottomLeft }, tokens)\n\n return {\n ...value,\n radius,\n topLeft,\n topRight,\n bottomLeft,\n bottomRight\n }\n}\n\nexport function resolveShadowValue(value: RawShadowValue, tokens: Token[]): ResolvedShadowValue {\n const color = resolveToken({ data: value.color }, tokens)\n const x = resolveToken({ data: value.x }, tokens)\n const y = resolveToken({ data: value.y }, tokens)\n const radius = resolveToken({ data: value.radius }, tokens)\n const spread = resolveToken({ data: value.spread }, tokens)\n return {\n ...value,\n color,\n x,\n y,\n radius,\n spread\n }\n}\n\nexport function resolveTypographyValue(value: RawTypographyValue, tokens: Token[]): ResolvedTypographyValue {\n const font = resolveToken({ data: value.font }, tokens)\n const fontSize = resolveToken({ data: value.fontSize }, tokens)\n const textCase = value.textCase\n const textDecoration = value.textDecoration\n const letterSpacing = resolveToken({ data: value.letterSpacing }, tokens)\n const lineHeight = value.lineHeight ? resolveToken({ data: value.lineHeight }, tokens) : null\n const paragraphIndent = resolveToken({ data: value.paragraphIndent }, tokens)\n const paragraphSpacing = resolveToken({ data: value.paragraphSpacing }, tokens)\n return {\n ...value,\n font,\n fontSize,\n textCase,\n textDecoration,\n letterSpacing,\n lineHeight,\n paragraphIndent,\n paragraphSpacing\n }\n}\n\nexport function resolveTokenValue(type: TokenType, value: any, tokens: Token[]): any {\n switch (type) {\n case TokenType.Color:\n case TokenType.Font:\n case TokenType.Image:\n case TokenType.Measure:\n case TokenType.Opacity:\n case TokenType.Text:\n return value\n case TokenType.Border:\n return resolveBorderValue(value, tokens)\n case TokenType.Gradient:\n return resolveGradientValue(value, tokens)\n case TokenType.Radius:\n return resolveRadiusValue(value, tokens)\n case TokenType.Shadow:\n return resolveShadowValue(value, tokens)\n case TokenType.Typography:\n return resolveTypographyValue(value, tokens)\n }\n shouldBeUnreachable(type)\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars\nexport function shouldBeUnreachable(param: never) {\n throw new Error('This function should be unreachable, param=' + param)\n}\n\nexport function resolveTokens(tokens: Token[]): ResolvedToken[] {\n return tokens.map(token => {\n const resolved = resolveToken(token, tokens)\n resolved.value = resolveTokenValue(token.type, resolved.value, tokens)\n return resolved\n })\n}\n\nexport function resolveTheme(\n theme: Theme,\n tokens: ResolvedToken[]\n): { overridenTokens: ResolvedToken[]; allTokens: ResolvedToken[] } {\n const overridenTokenIds = new Set<string>()\n const newTokens: Token[] = []\n\n for (const override of theme.overrides) {\n const original = tokens.find(t => t.source.persistentId === override.tokenPersistentId)\n if (!original) {\n throw new Error(`Unable to find original token for theme override ${override.tokenPersistentId}`)\n }\n const reconstructed: Token = {\n data: override.data,\n meta: original.meta,\n type: original.type,\n persistentId: original.source.persistentId,\n id: original.source.id\n }\n overridenTokenIds.add(reconstructed.persistentId)\n newTokens.push(reconstructed)\n }\n\n for (const token of tokens) {\n const hasOverride = overridenTokenIds.has(token.source.persistentId)\n if (!hasOverride) {\n newTokens.push(token.source)\n }\n }\n\n const newResolvedTokens = resolveTokens(newTokens)\n const overridenTokens = newResolvedTokens.filter(token => overridenTokenIds.has(token.source.persistentId))\n\n return {\n overridenTokens,\n allTokens: newResolvedTokens\n }\n}\n","//\n// types.ts\n// Pulsar Language\n//\n// Created by Ivan Terpugov.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\nexport enum TokenType {\n Color = 'Color',\n Border = 'Border',\n Font = 'Font',\n Gradient = 'Gradient',\n Shadow = 'Shadow',\n Radius = 'Radius',\n Measure = 'Measure',\n Image = 'Image',\n Text = 'Text',\n Opacity = 'Opacity',\n Typography = 'Typography'\n}\n\nexport enum TextCase {\n Original = 'Original',\n Upper = 'Upper',\n Lower = 'Lower',\n Camel = 'Camel'\n}\n\nexport enum TextDecoration {\n None = 'None',\n Underline = 'Underline',\n Strikethrough = 'Strikethrough'\n}\n\nexport type ColorValue = string\n\nexport type MeasureValue = {\n unit: string\n measure: number\n}\n\nexport type FontValue = {\n family: string\n subfamily: string\n}\n\nexport type Token<V = any> = {\n meta?: ItemMeta\n id?: string\n persistentId?: string\n type?: TokenType\n data: TokenData<V>\n}\n\nexport type ResolvedToken<V = any> = {\n type: TokenType\n meta?: ItemMeta\n value: V\n\n aliasTo?: Token\n source: Token\n // valueSource: string,\n}\n\nexport type ThemeOverride = {\n tokenPersistentId: string\n type: TokenType\n data: TokenData\n}\nexport type Theme = {\n id: string\n persistentId: string\n meta: ItemMeta\n overrides: ThemeOverride[]\n}\n\ntype TokenData<V = any> = {\n aliasTo?: string\n value?: V\n}\n\ntype ItemMeta = {\n meta?: {\n name: string\n description: string\n }\n}\n\nexport type GradientStop<COLOR> = {\n position: number\n color: COLOR\n}\n\nexport type GradientValue<COLOR> = {\n type: string\n from: any\n to: any\n stops: GradientStop<COLOR>[]\n}\n\nexport type BorderValue<COLOR, MEASURE> = {\n isEnabled: boolean\n position: string\n color: COLOR\n width: MEASURE\n}\n\nexport type RadiusValue<MEASURE> = {\n radius?: MEASURE\n topLeft?: MEASURE\n topRight?: MEASURE\n bottomRight?: MEASURE\n bottomLeft?: MEASURE\n}\n\nexport type ShadowValue<COLOR, MEASURE> = {\n isEnabled: boolean\n color: COLOR\n x: MEASURE\n y: MEASURE\n radius: MEASURE\n spread: MEASURE\n opacity: number\n}\n\nexport type TypographyValue<FONT, MEASURE> = {\n font: FONT\n fontSize: MEASURE\n textCase: TextCase\n textDecoration: TextDecoration\n letterSpacing: MEASURE\n lineHeight: MEASURE\n paragraphIndent: MEASURE\n paragraphSpacing: MEASURE\n}\n\n// Raw values with raw token data references\nexport type RawGradientValue = GradientValue<TokenData>\nexport type RawBorderValue = BorderValue<TokenData, TokenData>\nexport type RawRadiusValue = RadiusValue<TokenData>\nexport type RawShadowValue = ShadowValue<TokenData, TokenData>\nexport type RawTypographyValue = TypographyValue<TokenData, TokenData>\n\n// Resolved values\nexport type ResolvedGradientValue = GradientValue<ResolvedToken<ColorValue>>\nexport type ResolvedBorderValue = BorderValue<ResolvedToken<ColorValue>, ResolvedToken<MeasureValue>>\nexport type ResolvedShadowValue = ShadowValue<ResolvedToken<ColorValue>, ResolvedToken<MeasureValue>>\nexport type ResolvedRadiusValue = RadiusValue<ResolvedToken<MeasureValue>>\nexport type ResolvedTypographyValue = TypographyValue<ResolvedToken<FontValue>, ResolvedToken<MeasureValue>>\n","export * from './exports'\n","import { PLFunctionNetworkGetAnonymous } from './functions/specific/network/FunctionNetworkGetAnonymous'\n//\n// PLExecutionContext.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLBlueprintEmitter } from './emitters/BlueprintEmitter'\nimport { PLBlueprintLoader } from './loaders/BlueprintLoader'\nimport { PLFlow } from './flows/Flow'\nimport { SyntaxNodeFlow } from './../parser/syntax/nodes/SyntaxNodeFlow'\nimport { PLFunction } from './functions/Function'\nimport { PLTransformer } from './transformers/Transformer'\nimport { StringUtils } from './../utils/StringUtils'\nimport { PLLogger } from './loggers/Logger'\nimport { PLVariableContext } from './variables/VariableContext'\n\n// Transformer imports\nimport { PLTransformerToString } from './transformers/specific/shared/TransformerToString'\nimport { PLTransformerIsString } from './transformers/specific/shared/TransformerIsString'\nimport { PLTransformerIsNumber } from './transformers/specific/shared/TransformerIsNumber'\nimport { PLTransformerIsNull } from './transformers/specific/shared/TransformerIsNull'\nimport { PLTransformerIsDictionary } from './transformers/specific/shared/TransformerIsDictionary'\nimport { PLTransformerIsBool } from './transformers/specific/shared/TransformerIsBool'\nimport { PLTransformerIsArray } from './transformers/specific/shared/TransformerIsArray'\nimport { PLTransformerFormatDate } from './transformers/specific/shared/TransformerFormatDate'\nimport { PLTransformerCount } from './transformers/specific/shared/TransformerCount'\nimport { PLTransformerSubtractedBy } from './transformers/specific/numeric/TransformerSubtractedBy'\nimport { PLTransformerPositive } from './transformers/specific/numeric/TransformerPositive'\nimport { PLTransformerNegative } from './transformers/specific/numeric/TransformerNegative'\nimport { PLTransformerDividedBy } from './transformers/specific/numeric/TransformerDividedBy'\nimport { PLTransformerCeiled } from './transformers/specific/numeric/TransformerCeiled'\nimport { PLTransformerAddedBy } from './transformers/specific/numeric/TransformerAddedBy'\nimport { PLTransformerAbsolute } from './transformers/specific/numeric/TransformerAbsolute'\nimport { PLTransformerValues } from './transformers/specific/map/TransformerValues'\nimport { PLTransformerKeys } from './transformers/specific/map/TransformerKeys'\nimport { PLTransformerFrom } from './transformers/specific/array/TransformerFrom'\nimport { PLTransformerUntil } from './transformers/specific/array/TransformerUntil'\nimport { PLTransformerSorted } from './transformers/specific/array/TransformerSorted'\nimport { PLTransformerShuffled } from './transformers/specific/array/TransformerShuffled'\nimport { PLTransformerReversed } from './transformers/specific/array/TransformerReversed'\nimport { PLTransformerRange } from './transformers/specific/array/TransformerRange'\nimport { PLTransformerRandom } from './transformers/specific/array/TransformerRandom'\nimport { PLTransformerAdd } from './transformers/specific/map/TransformerAdd'\nimport { PLTransformerEnumerated } from './transformers/specific/array/TransformerEnumerated'\nimport { PLTransformerConcat } from './transformers/specific/array/TransformerConcat'\nimport { PLTransformerAt } from './transformers/specific/array/TransformerAt'\nimport { PLTransformerAppend } from './transformers/specific/array/TransformerAppend'\nimport { PLTransformerUppercased } from './transformers/specific/string/TransformerUppercased'\nimport { PLTransformerTrimmingCharacter } from './transformers/specific/string/TransformerTrimmingCharacter'\nimport { PLTransformerSubstring } from './transformers/specific/string/TransformerSubstring'\nimport { PLTransformerSplit } from './transformers/specific/string/TransformerSplit'\nimport { PLTransformerSnakecased } from './transformers/specific/string/TransformerSnakecased'\nimport { PLTransformerSlashSingleQuotes } from './transformers/specific/string/TransformerSlashSingleQuotes'\nimport { PLTransformerSlashNewlines } from './transformers/specific/string/TransformerSlashNewlines'\nimport { PLTransformerSlashDoubleQuotes } from './transformers/specific/string/TransformerSlashDoubleQuotes'\nimport { PLTransformerReplacing } from './transformers/specific/string/TransformerReplacing'\nimport { PLTransformerLowercased } from './transformers/specific/string/TransformerLowercased'\nimport { PLTransformerEquals } from './transformers/specific/string/TransformerEquals'\nimport { PLTransformerDefault } from './transformers/specific/string/TransformerDefault'\nimport { PLTransformerCapitalized } from './transformers/specific/string/TransformerCapitalized'\nimport { PLTransformerCamelcased } from './transformers/specific/string/TransformerCamelcased'\nimport { PLTransformerFirst } from './transformers/specific/array/TransformerFirst'\nimport { PLTransformerSuffixed } from './transformers/specific/string/TransformerSuffixed'\nimport { PLTransformerPrefixed } from './transformers/specific/string/TransformerPrefixed'\nimport { PLTransformerExtended } from './transformers/specific/string/TransformerExtended'\nimport { PLTransformerValue } from './transformers/specific/map/TransformerValue'\nimport { PLTransformerSplitExpr } from './transformers/specific/string/TransformerSplitExpr'\nimport { PLTransformerFloored } from './transformers/specific/numeric/TransformerFloored'\nimport { PLTransformerMultipledBy } from './transformers/specific/numeric/TransformerMultipliedBy'\nimport { PLTransformerRounded } from './transformers/specific/numeric/TransformerRounded'\nimport { PLTransformerTrimmingSpaces } from './transformers/specific/string/TransformerTrimmingSpaces'\nimport { PLTransformerEqualsTernary } from './transformers/specific/string/TransformerEqualsTernary'\n\n// Function imports\nimport { PLFunctionVarMutable } from './functions/specific/support/FunctionVarMutable'\nimport { PLFunctionVarDefined } from './functions/specific/support/FunctionVarDefined'\nimport { PLFunctionArraysToZippedMap } from './functions/specific/support/FunctionArraysToZippedMap'\nimport { PLFunctionRandomStringArray } from './functions/specific/random/FunctionRandomStringArray'\nimport { PLFunctionRandomString } from './functions/specific/random/FunctionRandomString'\nimport { PLFunctionRandomNumericArray } from './functions/specific/random/FunctionRandomNumericArray'\nimport { PLFunctionNewString } from './functions/specific/init/FunctionNewString'\nimport { PLFunctionNewNumber } from './functions/specific/init/FunctionNewNumber'\nimport { PLFunctionNewNull } from './functions/specific/init/FunctionNewNull'\nimport { PLFunctionNewDictionary } from './functions/specific/init/FunctionNewDictionary'\nimport { PLFunctionNewDate } from './functions/specific/init/FunctionNewDate'\nimport { PLFunctionNewArray } from './functions/specific/init/FunctionNewArray'\nimport { PLFunctionLessThanEquals } from './functions/specific/compare/FunctionLessThanEquals'\nimport { PLFunctionLessThan } from './functions/specific/compare/FunctionLessThan'\nimport { PLFunctionGreaterThanEquals } from './functions/specific/compare/FunctionGreaterThanEquals'\nimport { PLFunctionGreaterThan } from './functions/specific/compare/FunctionGreaterThan'\nimport { PLFunctionEquals } from './functions/specific/compare/FunctionEquals'\nimport { PLFunctionEqualsNull } from './functions/specific/compare/FunctionEqualsNull'\nimport { PLFunctionEqualsNonNull } from './functions/specific/compare/FunctionEqualsNonNull'\nimport { PLFunctionTernaryValue } from './functions/specific/boolean/FunctionTernary'\nimport { PLFunctionOr } from './functions/specific/boolean/FunctionOr'\nimport { PLFunctionAnd } from './functions/specific/boolean/FunctionAnd'\nimport { PLFunctionCall } from './functions/specific/blueprints/FunctionCall'\nimport { PLFunctionRandomNumber } from './functions/specific/random/FunctionRandomNumber'\nimport { PLFunctionNot } from './functions/specific/boolean/FunctionNot'\n\n// Flow imports\nimport { PLFlowSet } from './flows/specific/var/FlowSet'\nimport { PLFlowLog } from './flows/specific/debug/FlowLog'\nimport { PLFlowReturn } from './flows/specific/function/FlowReturn'\nimport { PLFlowImport } from './flows/specific/function/FlowImport'\nimport { PLFlowCodeMerge } from './flows/specific/code/FlowCodeMerge'\nimport { PLFlowGlobal } from './flows/specific/var/FlowGlobal'\nimport { PLFlowLet } from './flows/specific/var/FlowLet'\nimport { PLFlowVar } from './flows/specific/var/FlowVar'\nimport { PLFlowEmit } from './flows/specific/emit/FlowEmit'\nimport { PLFlowInject } from './flows/specific/inject/FlowInject'\nimport { PLFlowIf } from './flows/specific/if/FlowIf'\nimport { PLFlowElseIf } from './flows/specific/if/FlowElseIf'\nimport { PLFlowElse } from './flows/specific/if/FlowElse'\nimport { PLFlowDefault } from './flows/specific/switch/FlowDefault'\nimport { PLFlowCase } from './flows/specific/switch/FlowCase'\nimport { PLFlowSwitch } from './flows/specific/switch/FlowSwitch'\nimport { PLFlowTraverse } from './flows/specific/loops/FlowTraverse'\nimport { PLFlowMap } from './flows/specific/loops/FlowMap'\nimport { PLFlowFor } from './flows/specific/loops/FlowFor'\nimport { PLTransformerJoin } from './transformers/specific/array/TransformerJoin'\nimport { PLFunctionCompareEmpty } from './functions/specific/compare/FunctionEqualsEmpty'\nimport { PLTransformerAlwaysRootValue } from './transformers/specific/map/TransformerAlwaysRootValue'\nimport { PLTransformerContains } from './transformers/specific/string/TransformerContains'\nimport { PLDebugger } from '../debugger/Debugger'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLExecutionContext Definition\n\nexport class PLExecutionContext {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n /// Contains all language functions, callable with @. By default, contains all functions defined in `defaultFunctions`\n functions: Map<string, PLFunction> = new Map<string, PLFunction>()\n\n /// Contains all transformers. By default, contains all transformers defined in `defaultTransformers`\n transformers: Map<string, PLTransformer> = new Map<string, PLTransformer>()\n\n /// Contains all flows. By default, contains all flows defined in `defaultFlows`\n flows: Map<string, PLFlow> = new Map<string, PLFlow>()\n\n /// Engine to load additional blueprints\n public blueprintLoader: PLBlueprintLoader\n\n /// Engine to emit blueprints from currently executed blueprint\n public blueprintEmitter: PLBlueprintEmitter\n\n /// Engine and store for variables - variable stack\n variableContext: PLVariableContext\n\n /// Engine to log information about processing\n public logger: PLLogger\n\n /// Engine that debugs information about static analysis and runs and can symbolicate errors\n public debugger: PLDebugger\n\n /// Currently executed scope\n public executedScope: Array<string>\n public executedBlueprint: string\n\n /// Default transformers loaded with every execution context. This contains basic language functionality\n defaultTransformers: Array<PLTransformer> = [\n // string\n new PLTransformerCamelcased(),\n new PLTransformerCapitalized(),\n new PLTransformerDefault(),\n new PLTransformerEquals(),\n new PLTransformerEqualsTernary(),\n new PLTransformerExtended(),\n new PLTransformerLowercased(),\n new PLTransformerPrefixed(),\n new PLTransformerReplacing(),\n new PLTransformerSlashDoubleQuotes(),\n new PLTransformerSlashNewlines(),\n new PLTransformerSlashSingleQuotes(),\n new PLTransformerSnakecased(),\n new PLTransformerSplit(),\n new PLTransformerSplitExpr(),\n new PLTransformerSubstring(),\n new PLTransformerSuffixed(),\n new PLTransformerTrimmingSpaces(),\n new PLTransformerTrimmingCharacter(),\n new PLTransformerUppercased(),\n new PLTransformerContains(),\n\n // array\n new PLTransformerAppend(),\n new PLTransformerJoin(),\n new PLTransformerAt(),\n new PLTransformerConcat(),\n new PLTransformerEnumerated(),\n new PLTransformerFirst(),\n new PLTransformerFrom(),\n new PLTransformerRandom(),\n new PLTransformerRange(),\n new PLTransformerReversed(),\n new PLTransformerShuffled(),\n new PLTransformerSorted(),\n new PLTransformerUntil(),\n\n // dictionary\n new PLTransformerAdd(),\n new PLTransformerKeys(),\n new PLTransformerValue(),\n new PLTransformerAlwaysRootValue(),\n new PLTransformerValues(),\n\n // numeric\n new PLTransformerAbsolute(),\n new PLTransformerAddedBy(),\n new PLTransformerCeiled(),\n new PLTransformerDividedBy(),\n new PLTransformerFloored(),\n new PLTransformerMultipledBy(),\n new PLTransformerNegative(),\n new PLTransformerPositive(),\n new PLTransformerRounded(),\n new PLTransformerSubtractedBy(),\n\n // shared\n new PLTransformerCount(),\n new PLTransformerFormatDate(),\n new PLTransformerIsArray(),\n new PLTransformerIsBool(),\n new PLTransformerIsDictionary(),\n new PLTransformerIsNull(),\n new PLTransformerIsNumber(),\n new PLTransformerIsString(),\n new PLTransformerToString()\n ]\n\n /// Default flows loaded with every execution context. This contains basic language functionality\n defaultFlows: Array<PLFlow> = [\n // Iterators\n new PLFlowFor(),\n new PLFlowMap(),\n new PLFlowTraverse(),\n\n // Conditional execution\n new PLFlowSwitch(),\n new PLFlowCase(),\n new PLFlowDefault(),\n new PLFlowIf(),\n new PLFlowElseIf(),\n new PLFlowElse(),\n\n // Blueprint manipulation\n new PLFlowInject(),\n new PLFlowEmit(),\n\n // Variable manipulation\n new PLFlowVar(),\n new PLFlowLet(),\n new PLFlowSet(),\n new PLFlowGlobal(),\n\n // Special\n new PLFlowCodeMerge(),\n new PLFlowImport(),\n new PLFlowReturn(),\n\n // Debug\n new PLFlowLog()\n ]\n\n /// Default functions loaded with every execution context. This contains basic language functionality\n defaultFunctions: Array<PLFunction> = [\n // Blueprints\n new PLFunctionCall(),\n\n // Boolean logic\n new PLFunctionAnd(),\n new PLFunctionOr(),\n new PLFunctionNot(),\n new PLFunctionTernaryValue(),\n\n // Compare\n new PLFunctionEqualsNull(),\n new PLFunctionEqualsNonNull(),\n new PLFunctionCompareEmpty(),\n new PLFunctionEquals(),\n new PLFunctionGreaterThan(),\n new PLFunctionGreaterThanEquals(),\n new PLFunctionLessThan(),\n new PLFunctionLessThanEquals(),\n\n // Init\n new PLFunctionNewArray(),\n new PLFunctionNewDate(),\n new PLFunctionNewDictionary(),\n new PLFunctionNewNull(),\n new PLFunctionNewNumber(),\n new PLFunctionNewString(),\n\n // Random\n new PLFunctionRandomNumber(),\n new PLFunctionRandomNumericArray(),\n new PLFunctionRandomString(),\n new PLFunctionRandomStringArray(),\n\n // Support\n new PLFunctionArraysToZippedMap(),\n new PLFunctionVarDefined(),\n new PLFunctionVarMutable(),\n\n // Network\n new PLFunctionNetworkGetAnonymous()\n ]\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(\n load: PLBlueprintLoader = new PLBlueprintLoader(),\n emit: PLBlueprintEmitter = new PLBlueprintEmitter(),\n log: PLLogger = new PLLogger(),\n debug: PLDebugger = new PLDebugger()\n ) {\n this.blueprintLoader = load\n this.blueprintEmitter = emit\n this.logger = log\n this.debugger = debug\n this.variableContext = new PLVariableContext()\n this.executedScope = []\n this.executedBlueprint = ''\n\n // Register all default functionality of the language\n try {\n this.registerDefaultTransformers()\n this.registerDefaultFlows()\n this.registerDefaultFunctions()\n } catch (error) {\n // TODO: Rewrite\n // fatalError(\"Internal error registering default language functionality: \\(error)\")\n throw Error(`Internal error registering default language functionality: ${error}`)\n }\n\n // Register all custom functionality of the language\n try {\n // Functions\n this.provideCustomFunctions().forEach(fn => {\n this.registerFunction(fn)\n })\n this.provideCustomTransformers().forEach(transformer => {\n this.registerTransformer(transformer)\n })\n this.provideCustomFlows().forEach(flow => {\n this.registerFlow(flow)\n })\n } catch (error) {\n // TODO: Rewrite\n // fatalError(\"Internal error registering custom language functionality: \\(error)\")\n throw Error(`Internal error registering default language functionality: ${error}`)\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Custom Language Feature Loading\n\n provideCustomFunctions(): Array<PLFunction> {\n // Overridable, always called on context creation\n return []\n }\n\n provideCustomTransformers(): Array<PLTransformer> {\n // Overridable, always called on context creation\n return []\n }\n\n provideCustomFlows(): Array<PLFlow> {\n // Overridable, always called on context creation\n return []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Default Language Feature Loading\n\n registerDefaultFunctions() {\n // TODO: Rewrite\n try {\n this.defaultFunctions.forEach(fn => {\n this.registerFunction(fn)\n })\n } catch (error) {\n throw error\n }\n }\n\n registerDefaultTransformers() {\n // TODO: Rewrite\n try {\n this.defaultTransformers.forEach(transformer => {\n this.registerTransformer(transformer)\n })\n } catch (error) {\n throw error\n }\n }\n\n registerDefaultFlows() {\n // TODO: Rewrite\n try {\n this.defaultFlows.forEach(flow => {\n this.registerFlow(flow)\n })\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function loader\n\n registerFunction(fn: PLFunction) {\n // Test that flow has correct name - only characters and spaces are allowed\n let keyword = fn.keyword()\n if (!StringUtils.isLettersCanIncludeDot(keyword) || !StringUtils.isFirstCharacterLetterLowercase(keyword)) {\n // TODO: Rewrite\n // throw PulsarLangErrors.ExecutionContextError.functionKeywordInvalid(keyword)\n throw Error('functionKeywordInvalid')\n }\n\n // Assign transformer to available pool\n this.functions.set(fn.keyword(), fn)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Transformer loader\n\n registerTransformer(transformer: PLTransformer) {\n // Test that flow has correct name - only characters are allowed\n let keyword = transformer.keyword()\n if (!StringUtils.isLetters(keyword) || !StringUtils.isFirstCharacterLetterLowercase(keyword)) {\n // TODO: Rewrite\n // throw PulsarLangErrors.ExecutionContextError.transformerKeywordInvalid(keyword)\n throw Error('transformerKeywordInvalid')\n }\n\n // Assign transformer to available pool\n this.transformers.set(transformer.keyword(), transformer)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Flow loader\n\n registerFlow(flow: PLFlow) {\n // Test that flow has correct name - only characters are allowed\n let keyword = flow.keyword()\n if (!StringUtils.isLetters(keyword) || !StringUtils.isFirstCharacterLetterLowercase(keyword)) {\n // TODO: Rewrite\n // throw PulsarLangErrors.ExecutionContextError.flowKeywordInvalid(keyword)\n throw Error('flowKeyworldInvalid')\n }\n\n // Assign flow to available pool\n this.flows.set(flow.keyword(), flow)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Retrieval\n\n flow(key: string): PLFlow | null {\n return this.flows.get(key) ?? null\n }\n\n valueTransformer(): PLTransformer {\n // Always exists as part of core functionality\n return this.transformers.get('value')\n }\n\n valueAlwaysRootTransformer(): PLTransformer {\n // Always exists as part of core functionality\n return this.transformers.get('alwaysRootValue')\n }\n\n transformer(key: string): PLTransformer | null {\n return this.transformers.get(key) ?? null\n }\n\n function(key: string): PLFunction | null {\n return this.functions.get(key) ?? null\n }\n\n availableFlows(): Map<string, PLFlow> {\n return this.flows\n }\n\n availableTransformers(): Map<string, PLTransformer> {\n return this.transformers\n }\n\n availableFunctions(): Map<string, PLFunction> {\n return this.functions\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Scoping\n\n setExecutedScopeForNode(node: SyntaxNodeFlow) {\n let flowIdentifier = node.flowStackIdentifier()\n this.executedScope = flowIdentifier\n }\n\n setExecutedScopeUsingScope(scope: Array<string>) {\n this.executedScope = scope\n }\n\n setExecutedBlueprint(id: string) {\n this.executedBlueprint = id\n }\n\n getFunctionReturnStack() {\n return this.variableContext.functionReturnStack\n }\n}\n","//\n// PLInterpreter.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from './InterpreterContext'\nimport { PLBlueprintConfiguration } from './../blueprints/BlueprintConfiguration'\nimport { PLBlueprint } from '../blueprints/Blueprint'\nimport { PLExecutionContext } from './ExecutionContext'\nimport { NodeType } from '../parser/syntax/nodes/SyntaxNode'\nimport { SyntaxNodeText } from '../parser/syntax/nodes/SyntaxNodeText'\nimport { SyntaxNodeSubstitution } from '../parser/syntax/nodes/SyntaxNodeSubstitution'\nimport { SyntaxNodeFlow } from './../parser/syntax/nodes/SyntaxNodeFlow'\nimport { FlowAdjustment, FlowIteratorBodyResult, FlowIteratorType } from './flows/FlowIterator'\nimport { SyntaxNodeGroup } from './../parser/syntax/nodes/SyntaxNodeGroup'\nimport { PLLoggerDefaultMessages } from './loggers/LoggerDefaultMessages'\nimport { PLFlowExecutionType } from './flows/Flow'\nimport { v4 as uuid } from 'uuid'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport class PLInterpreter {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n blueprintConfiguration: PLBlueprintConfiguration\n currentlyInterpretingScope: Array<string>\n currentlyInterpretingBlueprint: PLBlueprint\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(blueprintConfiguration: PLBlueprintConfiguration | null = null) {\n // Use default configurations if not provided\n this.blueprintConfiguration = blueprintConfiguration ?? new PLBlueprintConfiguration()\n this.currentlyInterpretingScope = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Interpreter\n\n async interpret(\n blueprint: PLBlueprint,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<string> {\n try {\n // Set executing blueprint\n this.currentlyInterpretingBlueprint = blueprint\n\n // Log start\n executionContext.logger.logSystem(PLLoggerDefaultMessages.interpreterStart, blueprint.id)\n\n // Create new execution scope, making this interpreter run uniquely iterpretable\n this.createNewExecutingScope(executionContext)\n\n // Interpret root node (root group node of syntax tree)\n let result = await this.interpretGroupNode(blueprint.syntax.rootNode, context, executionContext)\n\n // Log and retrieve\n executionContext.logger.logSystem(PLLoggerDefaultMessages.interpreterRenderingSuccessful, blueprint.id)\n return result\n } catch (error) {\n executionContext.logger.logSystem(PLLoggerDefaultMessages.interpreterRenderingFailure, blueprint.id)\n executionContext.logger.logError(error.message, blueprint.id)\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Group Nodes interpreting and content chaining\n\n async interpretGroupNode(\n groupNode: SyntaxNodeGroup,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<string> {\n // Signifies that previous chain link failed to produce content\n let canFollowthrough: boolean = false\n let contextEnhancementData: FlowAdjustment = new Map<string, any>()\n\n // Output buffer\n let buffer: string = ''\n try {\n // Iterate through all nodes inside it\n for (let node of groupNode.nodes) {\n // Render the node based on their types.\n if (node.nodeType === NodeType.text) {\n buffer += await this.interpretTextNode(node as SyntaxNodeText, context, executionContext)\n } else if (node.nodeType === NodeType.substitution) {\n buffer += await this.interpretSubstitutionNode(node as SyntaxNodeSubstitution, context, executionContext)\n } else if (node.nodeType === NodeType.flow) {\n // Validate that node can be root if it is the first in chain\n let flowNode = node as SyntaxNodeFlow\n if (!flowNode.previousChainFlow && !flowNode.flow.canFormChainRoot()) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.flowCantFormChainRoot(node.flow.keyword)\n throw Error('flowCantFormChainRoot')\n }\n\n // If node is part of chain, not first, it can only be used when follow-through is enabled\n if (flowNode.previousChainFlow !== null && !canFollowthrough) {\n continue\n }\n\n // Interpret the node. In cases of chains, this can return .followthrough flag, signifying that next flow can be used instead\n let modifiedContext = context.recreateContextWithAdjustments(contextEnhancementData)\n let result = await this.interpretFlowNode(flowNode, modifiedContext, context, executionContext)\n\n // Decide whether we can follow the chain\n if (result.result !== null) {\n buffer += result.result\n canFollowthrough = false\n contextEnhancementData = new Map<string, any>()\n } else {\n if (result.iterator.type === FlowIteratorType.followthrough) {\n contextEnhancementData = result.iterator.followingContextEnhancement ?? new Map<string, any>()\n canFollowthrough = true\n } else {\n // TODO: Rewrite\n // fatalError(\"Other than using .followThrough, all nodes must generate content\")\n throw Error('Other than using .followThrough, all nodes must generate content')\n }\n }\n } else if (node.nodeType === NodeType.group) {\n // TODO: Rewrite\n throw Error(\n \"Iterating through SyntaxNodeGroup is not possible as it can't be part of .nodes as it is exclusively used in flows or syntax tree root\"\n )\n } else {\n // TODO: Rewrite\n throw Error('Unsupported node type')\n }\n }\n\n return buffer\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Static nodes interpreting\n\n async interpretTextNode(\n node: SyntaxNodeText,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<string> {\n try {\n // Make sure scope is properly set before text node is interpreted\n this.setExecutingScope(executionContext, this.currentlyInterpretingBlueprint)\n\n // Render text immediately\n return await node.interpret(context, executionContext)\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Flow Nodes interpreting\n\n async interpretSubstitutionNode(\n node: SyntaxNodeSubstitution,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<string> {\n try {\n // Make sure scope is properly set before substitution runs\n this.setExecutingScope(executionContext, this.currentlyInterpretingBlueprint)\n\n // Render subtitution node immediately\n return await node.interpret(context, executionContext)\n } catch (error) {\n throw error\n }\n }\n\n async interpretFlowNode(\n node: SyntaxNodeFlow,\n context: PLInterpreterContext,\n rootContext: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<FlowIteratorBodyResult> {\n let flowInterpretingResult: FlowIteratorBodyResult\n\n try {\n // Check which type of execution flow should be followed when executing the flow node\n switch (node.flow.executionType()) {\n case PLFlowExecutionType.defaultBody: {\n // Default type executes the content (all subnodes) and then adds the content to the resulting buffer.\n // Custom processing is not used in this case, even if it would be defined\n flowInterpretingResult = await this.processFlowBody(node, context, executionContext)\n break\n }\n case PLFlowExecutionType.customBody: {\n // Custom processing with body processes the body (content) first, then pass the body as special attribute to custom handler\n // Process body\n let body = await this.processFlowBody(node, context, executionContext)\n\n // Run executor routine\n flowInterpretingResult = await this.processCustomExecutor(node, body, context, executionContext)\n break\n }\n case PLFlowExecutionType.customWithoutBody: {\n // Custom processing without body runs custom handler and omits content, even if it was defined\n // Create iterator, but don't generate content using it\n let iterator = await node.flow.createBodyIterator(\n context,\n executionContext,\n node.outputs,\n node.sources,\n node.keywords\n )\n let body: FlowIteratorBodyResult = {\n result: null,\n iterator: iterator,\n skippedBody: true\n }\n\n // Run executor routine\n flowInterpretingResult = await this.processCustomExecutor(node, body, context, executionContext)\n break\n }\n }\n\n // Adjust context if flow provides modifications to it and finish interpreting\n this.processContextAdjustmentIfNeeded(node, flowInterpretingResult, rootContext, executionContext)\n\n // Adjust variables if flow provides modifications to it and finish interpreting\n await this.processVariableAdjustmentIfNeeded(\n node,\n this.currentlyInterpretingScope,\n flowInterpretingResult,\n rootContext,\n executionContext\n )\n\n return flowInterpretingResult\n } catch (error) {\n throw error\n }\n }\n\n async processFlowBody(\n node: SyntaxNodeFlow,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<FlowIteratorBodyResult> {\n try {\n // Get iterator\n let iterator = await node.flow.createBodyIterator(\n context,\n executionContext,\n node.outputs,\n node.sources,\n node.keywords\n )\n let buffer = ''\n\n // Handle every type of iterator\n switch (iterator.type) {\n case FlowIteratorType.skip:\n // Ignore the flow, resulting in empty content\n return {\n result: buffer,\n iterator: iterator,\n skippedBody: false\n }\n case FlowIteratorType.singular:\n case FlowIteratorType.iterative:\n // Change scope by diving deeper\n this.modifyExecutingScopeWithIncoming(node, executionContext)\n\n // Use flow as iterator and modify inner context with as many iterations as defined\n for (let adjustments of iterator) {\n // Enter iterator scope\n this.modifyExecutingScopeWithIncomingIteratorOf(node, executionContext)\n\n // Execute body with iterator data\n let modifiedContext = context.recreateContextWithAdjustments(adjustments)\n buffer += await this.interpretGroupNode(node.flowGroup, modifiedContext, executionContext)\n\n // Leave iterator scope\n this.modifyExecutingScopeWithLeavingIteratorOf(node, executionContext)\n }\n\n // Change scope by going out of current scope\n this.modifyExecutingScopeWithLeaving(node, executionContext)\n\n return {\n result: buffer,\n iterator: iterator,\n skippedBody: false\n }\n case FlowIteratorType.followthrough:\n // Open chain so next time flow is encountered, we check against it\n return {\n result: null,\n iterator: iterator,\n skippedBody: true\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async processCustomExecutor(\n node: SyntaxNodeFlow,\n body: FlowIteratorBodyResult,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<FlowIteratorBodyResult> {\n try {\n // Create custom flow executor, which must be provided by implementation, and run it\n // This step is skipped for default body, like for iterators etc.\n let buffer = await node.flow.createFlowExecutor(\n context,\n body,\n executionContext,\n this.blueprintConfiguration,\n node.outputs,\n node.sources,\n node.keywords,\n node.lineOffset,\n node.firstLineDirective\n )\n return {\n result: buffer,\n iterator: body.iterator,\n skippedBody: body.skippedBody\n }\n } catch (error) {\n throw error\n }\n }\n\n processContextAdjustmentIfNeeded(\n node: SyntaxNodeFlow,\n body: FlowIteratorBodyResult,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): PLInterpreterContext {\n try {\n // Create custom flow executor, which must be provided by implementation\n let adjustment = node.flow.adjustInterpretingContext(\n context,\n body,\n executionContext,\n node.outputs,\n node.sources,\n node.keywords\n )\n if (adjustment === null) {\n return context\n }\n\n // Modify current execution context\n return context.modifyContextWithAdjustments(adjustment)\n } catch (error) {\n throw error\n }\n }\n\n async processVariableAdjustmentIfNeeded(\n node: SyntaxNodeFlow,\n scope: Array<string>,\n body: FlowIteratorBodyResult,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<PLExecutionContext> {\n try {\n await node.flow.adjustExecutingContext(\n context,\n body,\n executionContext,\n scope,\n node.outputs,\n node.sources,\n node.keywords\n )\n return executionContext\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Scope manipulation\n\n /// Resets scope and uniquely identifies it with first identifier signializing global scope\n createNewExecutingScope(_executingContext: PLExecutionContext): Array<string> {\n let globalScopeIdentifier = uuid()\n this.currentlyInterpretingScope = new Array<string>()\n this.currentlyInterpretingScope.push(globalScopeIdentifier)\n return this.currentlyInterpretingScope\n }\n\n setExecutingScope(executionContext: PLExecutionContext, blueprint: PLBlueprint) {\n // Set current executed scope\n executionContext.setExecutedScopeUsingScope(this.currentlyInterpretingScope)\n executionContext.setExecutedBlueprint(blueprint.id)\n }\n\n /// Modifies scope by extending it with node that will be executed next\n modifyExecutingScopeWithIncoming(node: SyntaxNodeFlow, executingContext: PLExecutionContext): Array<string> {\n let flowIdentifier = node.flowIdentifier\n this.currentlyInterpretingScope.push(flowIdentifier)\n\n this.setExecutingScope(executingContext, this.currentlyInterpretingBlueprint)\n return this.currentlyInterpretingScope\n }\n\n /// Modifies scope by removing node that was just executed (fully)\n modifyExecutingScopeWithLeaving(node: SyntaxNodeFlow, executingContext: PLExecutionContext): Array<string> {\n if (\n this.currentlyInterpretingScope.length === 0 ||\n this.currentlyInterpretingScope[this.currentlyInterpretingScope.length - 1] !== node.flowIdentifier\n ) {\n throw Error('Imbalanced scope calls detected, trying to remove incorrect node')\n }\n\n this.currentlyInterpretingScope.pop()\n\n this.setExecutingScope(executingContext, this.currentlyInterpretingBlueprint)\n return this.currentlyInterpretingScope\n }\n\n /// Modifies scope by extending it with iterator identifier\n modifyExecutingScopeWithIncomingIteratorOf(\n _node: SyntaxNodeFlow,\n executingContext: PLExecutionContext\n ): Array<string> {\n let iteratorIdentifier = uuid()\n this.currentlyInterpretingScope.push(iteratorIdentifier)\n\n this.setExecutingScope(executingContext, this.currentlyInterpretingBlueprint)\n return this.currentlyInterpretingScope\n }\n\n /// Modifies scope by removing iterator that was just executed (fully\n modifyExecutingScopeWithLeavingIteratorOf(node: SyntaxNodeFlow, executingContext: PLExecutionContext): Array<string> {\n this.currentlyInterpretingScope.pop()\n if (\n this.currentlyInterpretingScope.length === 0 ||\n this.currentlyInterpretingScope[this.currentlyInterpretingScope.length - 1] !== node.flowIdentifier\n ) {\n throw Error('Imbalanced scope calls detected, trying to remove incorrect node')\n }\n\n this.setExecutingScope(executingContext, this.currentlyInterpretingBlueprint)\n return this.currentlyInterpretingScope\n }\n}\n","//\n// PLInterpreterContext.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { FlowAdjustment } from './flows/FlowIterator'\nimport { cloneDeep } from 'lodash/fp'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLInterpreterContext Definition\n\nexport class PLInterpreterContext {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n data: Map<string, any>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(data: Map<string, any>, additions: Map<string, any> | null = null) {\n // Store data\n this.data = data\n\n // Enhance data by additions\n if (additions) {\n for (let [key, value] of additions) {\n this.data.set(key, value)\n }\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Value manipulation\n\n stringValueForKey(key: string, context: Map<string, any> | null): string | null {\n let searchedData = context ?? this.data\n let dataPiece = searchedData.get(key)\n if (dataPiece && typeof dataPiece === 'string') {\n return searchedData.get(key)\n }\n\n return null\n }\n\n stringValueForKeyComponents(components: Array<string>, context: Map<string, any> | null): string | null {\n let searchedData = context ?? this.data\n if (components.length === 0) {\n return null\n }\n\n let component = components[0]\n if (components.length === 1) {\n return this.stringValueForKey(component, context)\n } else {\n let subcontext = searchedData.get(component)\n if (subcontext && subcontext instanceof Map) {\n let reduced = components.slice(1)\n return this.stringValueForKeyComponents(reduced, subcontext)\n } else {\n return null\n }\n }\n }\n\n anyValueForKey(key: string, context: Map<string, any> | null): any | null {\n let searchedData = context ?? this.data\n let dataPiece = searchedData.get(key)\n if (dataPiece) {\n return dataPiece\n }\n\n return null\n }\n\n anyValueForKeyComponents(components: Array<string>, context: Map<string, any> | null): any | null {\n let searchedData = context ?? this.data\n if (components.length === 0) {\n return null\n }\n\n let component = components[0]\n if (components.length === 1) {\n return this.anyValueForKey(component, context)\n } else {\n let subcontext = searchedData.get(component)\n if (subcontext && subcontext instanceof Map) {\n let reduced = components.slice(1)\n return this.anyValueForKeyComponents(reduced, subcontext)\n } else {\n return null\n }\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Adjustments\n\n recreateContextWithAdjustments(adjustments: FlowAdjustment): PLInterpreterContext {\n // Create a copy of current data and modify it with adjustment values\n let modifiedData = cloneDeep(this.data)\n for (let [key, value] of adjustments) {\n modifiedData.set(key, value)\n }\n return new PLInterpreterContext(modifiedData, new Map<string, any>())\n }\n\n modifyContextWithAdjustments(adjustments: FlowAdjustment): PLInterpreterContext {\n // Change context innline\n for (let [key, value] of adjustments) {\n this.data.set(key, value)\n }\n\n return this\n }\n}\n","//\n// PLBlueprintEmitter.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLEmittedContent } from './EmittedContent'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport class PLBlueprintEmitter {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Rendering\n\n emit(_resolvedContent: PLEmittedContent) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.undefinedBlueprint(blueprintId)\n throw Error('Blueprint emitter must provide its own emitting routine')\n }\n}\n","//\n// PLEmittedContent.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport class PLEmittedContent {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n filename: string\n content: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(filename: string, content: string) {\n this.filename = filename\n this.content = content\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Equality\n\n equals(obj: PLEmittedContent): boolean {\n return this.filename === obj.filename && this.content === obj.content\n }\n}\n","//\n// PLMemoryBlueprintEmitter.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLBlueprintEmitter } from './BlueprintEmitter'\nimport { PLEmittedContent } from './EmittedContent'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport class PLMemoryBlueprintEmitter extends PLBlueprintEmitter {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n storage: Map<string, PLEmittedContent>\n isOverrideAllowed: boolean = false\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(allowOverrides: boolean = false) {\n super()\n this.isOverrideAllowed = allowOverrides\n this.storage = new Map<string, PLEmittedContent>()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Content manipulation\n\n emittedContentForFilename(filename: string): PLEmittedContent | null {\n // Retrieve emitted file if exists\n return this.storage[filename] ?? null\n }\n\n allEmittedContent(): Array<PLEmittedContent> {\n // Retrieve all emitted files\n return Array.from(this.storage.values())\n }\n\n clearEmittedFiles() {\n // Removed all emitted files\n this.storage = new Map<string, PLEmittedContent>()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Rendering\n\n emit(content: PLEmittedContent) {\n // Check if content exists and guard against overrides, if configured like that\n if (!this.isOverrideAllowed && this.storage.get(content.filename)) {\n // TODO: Rework\n // throw PulsarLangErrors.InterpreterError.emittedContentExists(content.filename)\n throw Error('emittedContentExists')\n }\n\n this.storage.set(content.filename, content)\n }\n}\n","//\n// Flow.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLBlueprintConfiguration } from './../../blueprints/BlueprintConfiguration'\nimport { PLInterpreterContext } from './../InterpreterContext'\nimport { PLExecutionContext } from '../ExecutionContext'\nimport { PLFlowSource } from './FlowSource'\nimport { FlowIterator, FlowIteratorBodyResult, FlowAdjustment } from './FlowIterator'\nimport { PLFlowOutput } from './FlowOutput'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport enum PLFlowExecutionType {\n defaultBody,\n customBody,\n customWithoutBody\n}\n\nexport enum PLFlowFormatType {\n keyword,\n source,\n output\n}\n\nexport enum PLFlowFormatRequirement {\n required,\n optional\n}\n\nexport interface PLFlowFormat {\n type: PLFlowFormatType\n requirement: PLFlowFormatRequirement\n definition: string\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n throw Error('Flow format must be registered')\n }\n\n keyword(): string {\n let format = this.flowFormat()\n if (format.length === 0) {\n throw Error('Flow must specify at least one keyword')\n }\n\n let firstFormat = format[0]\n if (firstFormat.type === PLFlowFormatType.keyword) {\n return firstFormat.definition\n } else {\n throw Error('Flow must start with keyword')\n }\n }\n\n /// By default, flows don't chain. If provided, will chain with specificed flows when .followthrough option is provided in adjustments.\n /// Flow is identified by its keyword which must be unique\n chainableFlows(): Array<string> | null {\n return null\n }\n\n /// By default, flow is root flow and can start flow chains (if provided by .chainableFlows). However, flows that can chain to others can't be root as well\n canFormChainRoot(): boolean {\n return true\n }\n\n /// By default, flow returns the iterator which handles how many times content (body) should be executed. This can be adjusted using execution type\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n return new Promise(function(_, reject) {\n reject('Flow context must be provided')\n })\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return new Promise(function(_, reject) {\n reject('unsupportedTransformSource, expected string')\n })\n }\n}\n","//\n// FlowIterator.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nexport interface FlowIteratorBodyResult {\n result: string | null\n iterator: FlowIterator\n skippedBody: boolean\n}\n\nexport enum FlowIteratorType {\n skip,\n singular,\n iterative,\n followthrough\n}\n\nexport type FlowAdjustment = Map<string, any>\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - FlowIterator Definition\n\nexport class FlowIterator implements IterableIterator<FlowAdjustment> {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n type: FlowIteratorType\n adjustments: Array<FlowAdjustment>\n followingContextEnhancement: FlowAdjustment | null\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(adjustments: Array<FlowAdjustment>, type: FlowIteratorType, contextEnhancement: FlowAdjustment | null) {\n this.type = type\n this.adjustments = adjustments\n this.followingContextEnhancement = contextEnhancement\n }\n\n public static followThroughExecution(followingContextEnhancement: FlowAdjustment | null): FlowIterator {\n return new FlowIterator([], FlowIteratorType.followthrough, followingContextEnhancement)\n }\n\n public static noExecution(): FlowIterator {\n return new FlowIterator([], FlowIteratorType.skip, null)\n }\n\n public static singleExecution(adjustment: FlowAdjustment): FlowIterator {\n return new FlowIterator([adjustment], FlowIteratorType.singular, null)\n }\n\n public static iterativeExecution(adjustments: Array<FlowAdjustment>): FlowIterator {\n return new FlowIterator(adjustments, FlowIteratorType.iterative, null)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Iterator\n\n private counter: number = 0\n\n public next(): IteratorResult<FlowAdjustment> {\n this.counter++\n return {\n done: this.adjustments.length < this.counter,\n value: this.adjustments[this.counter - 1]\n }\n }\n\n [Symbol.iterator](): IterableIterator<FlowAdjustment> {\n return this\n }\n}\n","//\n// FlowOutput.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { StringUtils } from '../../utils/StringUtils'\nimport { PLExecutionContext } from '../ExecutionContext'\nimport { PLFlowSource } from './FlowSource'\nimport { SyntaxNodeSubstitution } from '../../parser/syntax/nodes/SyntaxNodeSubstitution'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLFlowOutput {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n originalBackingProperty: string\n backingProperty: string\n containedQuotes: boolean\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(argument: string) {\n this.originalBackingProperty = argument\n this.containedQuotes = StringUtils.isSurroundedWithDoubleQuotes(argument)\n this.backingProperty = StringUtils.withoutDoubleQuotesSingleOccurance(argument)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Casting\n\n asString(): string {\n // Always successful\n return this.backingProperty\n }\n\n asNumber(): number | null {\n let asNumber = Number(this.backingProperty)\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n return asNumber.valueOf()\n } else {\n return null\n }\n }\n\n asBool(): boolean | null {\n if (this.backingProperty === 'true') {\n return true\n } else if (this.backingProperty === 'false') {\n return false\n } else {\n return null\n }\n }\n\n asSource(executionContext: PLExecutionContext): PLFlowSource {\n try {\n // TODO: Syntax argument should be able to specify its range\n let substitutionNode = new SyntaxNodeSubstitution(this.originalBackingProperty, executionContext, [])\n return new PLFlowSource(substitutionNode)\n } catch (error) {\n throw error\n }\n }\n}\n","//\n// FlowSource.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from './../InterpreterContext'\nimport { PLExecutionContext } from '../ExecutionContext'\nimport { StringUtils } from './../../utils/StringUtils'\nimport { SyntaxNodeSubstitution } from '../../parser/syntax/nodes/SyntaxNodeSubstitution'\nimport { PLTransformerArgument } from '../transformers/TransformerArgument'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLFlowSource {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n backingProperty: SyntaxNodeSubstitution\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(source: SyntaxNodeSubstitution) {\n this.backingProperty = source\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Casting\n\n async asValue(context: PLInterpreterContext, executionContext: PLExecutionContext): Promise<any | null> {\n try {\n let content = this.backingProperty.directive\n\n // Test for \"self\" which retrieves entire data context\n if (content === 'self') {\n return context.data\n // Try to parse as string\n } else if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, immediately return it\n return StringUtils.withoutDoubleQuotesSingleOccurance(content)\n } else {\n // Try to parse as int\n if (content === 'null' || content === undefined) {\n return null\n }\n\n if (content === 'true') {\n return true\n } else if (content === 'false') {\n return false\n } else {\n let asNumber = Number(content) ?? null\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n // If parsed as number, return it immediately\n return asNumber.valueOf()\n } else if (StringUtils.isStructuralArrayDefinition(content)) {\n // Inline array defined in blueprint ([item1, item2])\n let components = StringUtils.parsedArrayFromDefinition(content)\n if (!components) {\n throw Error(`Array definition not formatted correctly`)\n }\n // Parse each component of the array\n let componentValues = new Array<any>()\n for (let [index, component] of components.entries()) {\n let arg = new PLTransformerArgument(component, 'array.item', index)\n let value = arg.expectAnyNonNull(context, executionContext)\n componentValues.push(value)\n }\n return componentValues\n } else {\n // Try to parse as source or fail\n return await this.backingProperty.modifyInputValue(context, executionContext)\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n asString(): string {\n // Return source as plain string value\n return this.backingProperty.directive\n }\n\n directive(): string {\n return this.backingProperty.directive\n }\n}\n","//\n// FlowCodeMerge.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\nimport { dedent } from 'ts-dedent'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowCodeMerge extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.codeMerge\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customWithoutBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` mode\n // If not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n let spacer = ' '.repeat(lineOffset)\n\n // Compute offset of the text\n // Remove everything inside the flow and instead inject merging code tags\n resolve(dedent`\n ${spacer}// < Static code follows\n ${spacer}\n ${spacer}// >\n `)\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return\n }\n}\n","//\n// FlowLog.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowLog extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.log\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'source'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customWithoutBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n return FlowIterator.noExecution()\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n // Fetch the variable content\n let source = sources.get('source')\n if (!source) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidType(\"Log statement invalid or variable not defined yet\")\n throw Error('Log statement invalid or variable not defined yet')\n }\n\n let data = await source.asValue(dataContext, executionContext)\n\n // Describe the variable and return it as user log\n let description = this.convertToString(data)\n executionContext.logger.logUser(description, executionContext.executedBlueprint)\n\n // For debug, log to console as well\n console.log(description)\n }\n\n convertToString(variable: any | null): string {\n // Handle empty gracefuly\n if (variable === null) {\n return 'null'\n\n // Cast to proper type and retrieve description for complex types\n }\n if (variable instanceof Map) {\n return JSON.stringify(Array.from(variable.entries()))\n } else {\n return JSON.stringify(variable)\n }\n }\n}\n","//\n// FlowEmit.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLEmittedContent } from './../../../emitters/EmittedContent'\nimport { StringUtils } from './../../../../utils/StringUtils'\nimport { PLKeywordsFlows } from '../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowEmit extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.emit\n },\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: 'file'\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'blueprintName'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n dataContext: PLInterpreterContext,\n body: FlowIteratorBodyResult,\n executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(async function(resolve, _) {\n let blueprintNameSource = sources.get('blueprintName')\n if (!blueprintNameSource) {\n throw Error('Blueprint name must be provided')\n }\n\n // Evaluate value\n var blueprintName = ''\n let possibleName = blueprintNameSource.asString()\n if (possibleName && StringUtils.isSurroundedWithDoubleQuotes(possibleName)) {\n blueprintName = StringUtils.withoutDoubleQuotes(possibleName)\n } else {\n let computedBlueprintName = await blueprintNameSource.asValue(dataContext, executionContext)\n if (typeof computedBlueprintName !== 'string') {\n throw Error('Blueprint name must resolve to string')\n }\n blueprintName = computedBlueprintName\n }\n\n // Emit content of executed body to emitter\n let emittedContent = new PLEmittedContent(blueprintName, body.result ?? '')\n executionContext.blueprintEmitter.emit(emittedContent)\n\n // Flow doesn't produce any content on its own\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return\n }\n}\n","//\n// FlowImport.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { StringUtils } from './../../../../utils/StringUtils'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowImport extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.import\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'variableName'\n },\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: 'from'\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'blueprintName'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n executionContext: PLExecutionContext,\n flowIdentifier: Array<string>,\n outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n // Get name of variable to load the data into\n let variableNameOutput = outputs.get('variableName')\n if (!variableNameOutput) {\n throw Error('Variable name must be provided')\n }\n\n let variableName = variableNameOutput.asString()\n\n // Get name of blueprint to load. This can either be computed source (which comes first) or statically provided value\n let blueprintName = ''\n let blueprintNameSource = sources.get('blueprintName')\n if (!blueprintNameSource) {\n throw Error('Blueprint name argument must be provided')\n }\n\n // TODO: Move this to source\n blueprintName = blueprintNameSource.asString()\n if (StringUtils.isSurroundedWithDoubleQuotes(blueprintName)) {\n blueprintName = StringUtils.withoutDoubleQuotes(blueprintName)\n } else {\n let computedBlueprintName = await blueprintNameSource.asValue(dataContext, executionContext)\n if (typeof computedBlueprintName !== 'string') {\n throw Error('Blueprint name must resolve to string')\n }\n blueprintName = computedBlueprintName\n }\n\n // it is possible not to use flow executor, and save blueprintName instead of declaration,\n // but saving declaration gives us ability to define inline functions\n // (not only using 'import' flow)\n\n // Retrieve blueprint. TO FIX: PLBlueprintConfiguration.default()\n let blueprint = executionContext.blueprintLoader.loadBlueprint(\n blueprintName,\n executionContext,\n PLBlueprintConfiguration.default()\n )\n\n let payload = {\n type: 'function',\n declaration: blueprint.declaration\n }\n\n // Create immutable variable\n executionContext.variableContext.setVariable(variableName, false, false, flowIdentifier, payload)\n }\n}\n","//\n// FlowReturn.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowReturn extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.return\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'data'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n let dataSource = sources.get('data')\n if (!dataSource) {\n throw Error('Return data must be provided')\n }\n\n let data = await dataSource.asValue(dataContext, executionContext)\n if (!data || !(data instanceof Map)) {\n throw Error('Return data must resolve to dictionary')\n }\n\n const returnStack = executionContext.getFunctionReturnStack()\n\n if (returnStack.length === 0) {\n // throw Error(\"Using return flow without call to function\")\n console.warn('Using return flow without call to function')\n return\n }\n\n returnStack.pop()\n returnStack.push(data)\n }\n}\n","//\n// FlowElse.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowElse extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.else\n }\n ]\n }\n\n canFormChainRoot(): boolean {\n return false\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n // Else always executes\n return this.resolveAsTrue()\n }\n\n async resolveAsTrue(): Promise<FlowIterator> {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n async resolveAsFalse(): Promise<FlowIterator> {\n return FlowIterator.followThroughExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return\n }\n}\n","//\n// FlowElseIf.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowElseIf extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.elseIf\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'condition'\n }\n ]\n }\n\n chainableFlows(): Array<string> | null {\n return ['elseif', 'else']\n }\n\n canFormChainRoot(): boolean {\n return false\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n let source = sources.get('condition')\n if (!source) {\n throw Error('Condition must be provided')\n }\n\n let value = await source.asValue(_currentContext, _executionContext)\n if (!value) {\n return this.resolveAsFalse()\n }\n\n if (typeof value === 'boolean') {\n // Value is boolean and true -> true\n return (value as boolean) ? this.resolveAsTrue() : this.resolveAsFalse()\n } else if (typeof value === 'number') {\n // Value is int and >= 1 -> true\n // Note: any other numeric types -> false\n return (value as number) >= 1 ? this.resolveAsTrue() : this.resolveAsFalse()\n } else if (typeof value === 'string') {\n // Value is string and non-empty -> true\n return (value as string).length > 0 ? this.resolveAsTrue() : this.resolveAsFalse()\n }\n\n // TODO: Solve more complicated cases, such as &&, || etc.\n // Any other case -> false\n return this.resolveAsFalse()\n }\n\n async resolveAsTrue(): Promise<FlowIterator> {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n async resolveAsFalse(): Promise<FlowIterator> {\n return FlowIterator.followThroughExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return\n }\n}\n","//\n// FlowIf.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowIf extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.if\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'condition'\n }\n ]\n }\n\n chainableFlows(): Array<string> | null {\n return ['elseif', 'else']\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n let source = sources.get('condition')\n if (!source) {\n throw Error('Condition must be provided')\n }\n\n let value = await source.asValue(_currentContext, _executionContext)\n if (!value) {\n return this.resolveAsFalse()\n }\n\n if (typeof value === 'boolean') {\n // Value is boolean and true -> true\n return (value as boolean) ? this.resolveAsTrue() : this.resolveAsFalse()\n } else if (typeof value === 'number') {\n // Value is int and >= 1 -> true\n // Note: any other numeric types -> false\n return (value as number) >= 1 ? this.resolveAsTrue() : this.resolveAsFalse()\n } else if (typeof value === 'string') {\n // Value is string and non-empty -> true\n return (value as string).length > 0 ? this.resolveAsTrue() : this.resolveAsFalse()\n }\n\n // TODO: Solve more complicated cases, such as &&, || etc.\n // Any other case -> false\n return this.resolveAsFalse()\n }\n\n async resolveAsTrue(): Promise<FlowIterator> {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n async resolveAsFalse(): Promise<FlowIterator> {\n return FlowIterator.followThroughExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return\n }\n}\n","import { FlowUtils } from './../../../../utils/FlowUtils'\n//\n// FlowInject.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLBlueprint } from '../../../../blueprints/Blueprint'\nimport { PLInterpreter } from '../../../Interpreter'\nimport { StringUtils } from './../../../../utils/StringUtils'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\nimport { isPlainObject } from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowInject extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.inject\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'blueprintName'\n },\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: 'context'\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'context'\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.optional,\n definition: 'formatFirstLine'\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.optional,\n definition: 'userOffset'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customBody\n }\n\n cachedBlueprints: Map<string, PLBlueprint> = new Map<string, PLBlueprint>()\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n dataContext: PLInterpreterContext,\n body: FlowIteratorBodyResult,\n executionContext: PLExecutionContext,\n configuration: PLBlueprintConfiguration,\n outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n lineOffset: number,\n firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(async function(resolve, _) {\n let source = sources.get('context')\n if (!source) {\n throw Error('Context must be provided')\n }\n\n // Get name of blueprint to load. This can either be computed source (which comes first) or statically provided value\n let blueprintName = ''\n let blueprintNameSource = sources.get('blueprintName')\n if (!blueprintNameSource) {\n throw Error('Blueprint name argument must be provided')\n }\n\n if (StringUtils.isSurroundedWithDoubleQuotes(blueprintNameSource.asString())) {\n blueprintName = StringUtils.withoutDoubleQuotes(blueprintNameSource.asString())\n } else {\n let computedBlueprintName = await blueprintNameSource.asValue(dataContext, executionContext)\n if (!computedBlueprintName || typeof computedBlueprintName !== 'string') {\n throw Error('BLueprint name must resolve to string')\n }\n blueprintName = computedBlueprintName\n }\n\n let injectionContext = await source.asValue(dataContext, executionContext)\n if (!injectionContext || (!isPlainObject(injectionContext) && !(injectionContext instanceof Map))) {\n throw Error(`Context for injected blueprint must resolve to dictionary, blueprint '${blueprintName}'`)\n }\n if (isPlainObject(injectionContext)) {\n injectionContext = new Map(Object.entries(injectionContext))\n }\n\n // Optionally, get whether inline formatting should be applied to the first line.\n // By default, formatting gets applied if the flow definition is first (meaning it has only spaces and tabs before the definition on the same line)\n var shouldFormatFirstLine: boolean = firstLineDirective\n let canOverride = outputs.get('formatFirstLine')\n if (canOverride) {\n shouldFormatFirstLine = canOverride.asBool() ?? false\n }\n\n // Optionally, get by how much should the lines be offset\n var userOffset: number = 0\n let offsetLines = outputs.get('userOffset')\n if (offsetLines) {\n userOffset = offsetLines.asNumber() ?? 0\n }\n\n // Retrieve blueprint and interpret it, recreating context from provided source context\n let blueprint = executionContext.blueprintLoader.loadBlueprint(blueprintName, executionContext, configuration)\n let interpreter = new PLInterpreter()\n\n // Create injection context extended by its body which can be accessed from within the blueprint that is loaded\n let additions = new Map<string, any>()\n additions.set('#body', body.result ?? '')\n\n let interpreterContext = new PLInterpreterContext(injectionContext, additions)\n let result = await interpreter.interpret(blueprint, interpreterContext, executionContext)\n\n // Offset content by lineOffset\n resolve(FlowUtils.offsetLinesCanIgnoreFirstline(result, !shouldFormatFirstLine, userOffset, lineOffset, ' '))\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return\n }\n}\n","//\n// FlowFor.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowFor extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.for\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'key'\n },\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: 'in'\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'source'\n }\n ]\n }\n\n chainableFlows(): Array<string> | null {\n return ['else']\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n currentContext: PLInterpreterContext,\n executionContext: PLExecutionContext,\n outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n let output = outputs.get('key')\n let source = sources.get('source')\n if (!output || !source) {\n throw Error('Key and source arguments must be provided')\n }\n\n // Expect source to be an array\n let sourceData = await source.asValue(currentContext, executionContext)\n if (!sourceData || !(sourceData instanceof Array)) {\n throw Error(\"For source must be an array, but it's type is \" + typeof sourceData)\n }\n\n const sourceArray = sourceData as Array<any>\n\n // Skip execution and chain with else if there wasn't anything in source array\n if (sourceArray.length === 0) {\n return FlowIterator.followThroughExecution(new Map<string, any>())\n }\n\n // Do primary pass\n let contextAdjustments: Array<FlowAdjustment> = new Array<FlowAdjustment>()\n\n sourceArray.forEach((value, index) => {\n let adjustment = new Map<string, any>()\n let key = output.asString()\n adjustment.set(key, value)\n adjustment.set('#index', index)\n adjustment.set('#first', index === 0)\n adjustment.set('#last', index === sourceArray.length - 1)\n const even = index % 2 == 0\n adjustment.set('#even', even)\n adjustment.set('#odd', !even)\n contextAdjustments.push(adjustment)\n })\n // for (let value of (sourceData as Array<any>)) {\n // let adjustment = new Map<string, any>()\n // let key = output.asString()\n // adjustment.set(key, value)\n // contextAdjustments.push(adjustment)\n // }\n\n return FlowIterator.iterativeExecution(contextAdjustments)\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return\n }\n}\n","//\n// FlowMap.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowMap extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.map\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'source'\n },\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: 'to'\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'key'\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'value'\n }\n ]\n }\n\n chainableFlows(): Array<string> | null {\n return ['else']\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n currentContext: PLInterpreterContext,\n executionContext: PLExecutionContext,\n outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n let key = outputs.get('key')\n let value = outputs.get('value')\n let source = sources.get('source')\n if (!key || !value || !source) {\n throw Error('Key, value and source arguments must be provided')\n }\n\n // Expect source to be an array\n let sourceData = await source.asValue(currentContext, executionContext)\n if (!sourceData || !(sourceData instanceof Map)) {\n throw Error('Map source must be a dictionary')\n }\n\n // Skip execution and chain with else if there wasn't anything in source array\n if ((sourceData as Map<any, any>).size === 0) {\n return FlowIterator.followThroughExecution(new Map<string, any>())\n }\n\n // Do primary pass\n let contextAdjustments: Array<FlowAdjustment> = new Array<FlowAdjustment>()\n for (let [sKey, sValue] of sourceData as Map<any, any>) {\n let adjustment = new Map<string, any>()\n adjustment.set(key.asString(), sKey)\n adjustment.set(value.asString(), sValue)\n contextAdjustments.push(adjustment)\n }\n\n return FlowIterator.iterativeExecution(contextAdjustments)\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {}\n}\n","//\n// FlowTraverse.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowTraverse extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.traverse\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'key'\n },\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: 'into'\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'value'\n },\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: 'source'\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'source'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n currentContext: PLInterpreterContext,\n executionContext: PLExecutionContext,\n outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n let output = outputs.get('key')\n let source = sources.get('source')\n let value = outputs.get('value')\n if (!output || !source || !value) {\n throw Error('Key and source arguments must be provided')\n }\n\n // Expect source to be an array\n let sourceData = await source.asValue(currentContext, executionContext)\n if (!sourceData || !(sourceData instanceof Map)) {\n throw Error('For source must be a dictionary')\n }\n\n // Skip execution and chain with else if there wasn't anything in source array\n if ((sourceData as Map<any, any>).size === 0) {\n return FlowIterator.followThroughExecution(new Map<string, any>())\n }\n\n // Do primary pass\n let contextAdjustments: Array<FlowAdjustment> = new Array<FlowAdjustment>()\n for (let [key, value] of sourceData as Map<any, any>) {\n let adjustment = new Map<string, any>()\n adjustment.set(key, value)\n contextAdjustments.push(adjustment)\n }\n\n return FlowIterator.iterativeExecution(contextAdjustments)\n }\n\n traverseMakeContext(context: Map<any, any>, key: string, bindTo: string): Array<FlowAdjustment> {\n var contextAdjustments: Array<FlowAdjustment> = new Array<FlowAdjustment>()\n let adjustment = new Map<string, any>()\n adjustment.set(bindTo, context)\n\n let nestedArray = context.get(key)\n if (nestedArray instanceof Array) {\n for (let subcontext of nestedArray as Array<any>) {\n if (!(subcontext instanceof Map)) {\n throw Error('Nested array must only contain dictionaries')\n }\n contextAdjustments.concat(this.traverseMakeContext(subcontext, key, bindTo))\n }\n }\n\n return contextAdjustments\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {}\n}\n","//\n// FlowCase.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowCase extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.case\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'value'\n }\n ]\n }\n\n chainableFlows(): Array<string> | null {\n return ['case', 'default']\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n let userValue = outputs.get('value')\n if (!userValue) {\n throw Error('Case value must be provided')\n }\n\n // Get the value from context\n let switchValue = currentContext.data.get('@internal.switch')\n if (!switchValue) {\n throw Error('Internal error - switch chain data not provided')\n }\n\n // Test case for number as source is number\n if (typeof switchValue === 'number' && userValue.asNumber() === switchValue) {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n // Test case for string as source is string\n if (typeof switchValue === 'string' && userValue.asString() === switchValue) {\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n // Case not equal, follow to the next one\n let followingContextEnhancement = new Map<string, any>()\n followingContextEnhancement.set('@internal.switch', switchValue)\n return FlowIterator.followThroughExecution(followingContextEnhancement)\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {}\n}\n","//\n// FlowDefault.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowDefault extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.default\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n // Default will always execute\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return\n }\n}\n","//\n// FlowSwitch.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowSwitch extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.switch\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'source'\n }\n ]\n }\n\n chainableFlows(): Array<string> | null {\n return ['case']\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.defaultBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n currentContext: PLInterpreterContext,\n executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n let source = sources.get('source')\n if (!source) {\n throw Error('Property to switch must be provided')\n }\n\n // Expect source to be an array\n let sourceData = await source.asValue(currentContext, executionContext)\n if (!sourceData || (typeof sourceData !== 'string' && typeof sourceData !== 'number')) {\n throw Error('Switch only supports string and numeric values')\n }\n\n let switchData = new Map<string, any>()\n switchData.set('@internal.switch', sourceData)\n return FlowIterator.followThroughExecution(switchData)\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _flowIdentifier: Array<string>,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n return\n }\n}\n","//\n// FlowGlobal.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowGlobal extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.global\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'variableName'\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'context'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n // Execute body once so it can be used inside injected flow\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n executionContext: PLExecutionContext,\n flowIdentifier: Array<string>,\n outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n let source = sources.get('context')\n if (!source) {\n throw Error('Context must be provided')\n }\n\n let value = await source.asValue(dataContext, executionContext)\n let variableNameObject = outputs.get('variableName')\n if (!variableNameObject) {\n throw Error('Variable name must be provided')\n }\n let variableName = variableNameObject.asString()\n\n // Create mutable variable\n executionContext.variableContext.setVariable(variableName, true, false, flowIdentifier, value)\n }\n}\n","//\n// FlowLet.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowLet extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.let\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'variableName'\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'context'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n // Execute body once so it can be used inside injected flow\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n executionContext: PLExecutionContext,\n flowIdentifier: Array<string>,\n outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n let source = sources.get('context')\n if (!source) {\n throw Error('Context must be provided')\n }\n\n let value = await source.asValue(dataContext, executionContext)\n let variableNameObject = outputs.get('variableName')\n if (!variableNameObject) {\n throw Error('Variable name must be provided')\n }\n let variableName = variableNameObject.asString()\n\n // Create mutable variable\n executionContext.variableContext.setVariable(variableName, false, false, flowIdentifier, value)\n }\n}\n","//\n// FlowSet.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowSet extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.set\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'variableName'\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'context'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n // Execute body once so it can be used inside injected flow\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n executionContext: PLExecutionContext,\n flowIdentifier: Array<string>,\n outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n let source = sources.get('context')\n if (!source) {\n throw Error('Context must be provided')\n }\n\n let value = await source.asValue(dataContext, executionContext)\n let variableNameObject = outputs.get('variableName')\n if (!variableNameObject) {\n throw Error('Variable name must be provided')\n }\n let variableName = variableNameObject.asString()\n\n // Retrieve variable and if possible, write to it\n let variable = executionContext.variableContext.getVariable(variableName, flowIdentifier)\n variable.setPayload(value)\n return\n }\n}\n","//\n// FlowVar.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFlowOutput } from './../../FlowOutput'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { FlowIterator } from './../../FlowIterator'\nimport { PLFlow, PLFlowFormat, PLFlowFormatType, PLFlowFormatRequirement, PLFlowExecutionType } from './../../Flow'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLFlowSource } from '../../FlowSource'\nimport { PLBlueprintConfiguration } from './../../../../blueprints/BlueprintConfiguration'\nimport { FlowIteratorBodyResult, FlowAdjustment } from './../../FlowIterator'\nimport { PLKeywordsFlows } from './../../../../configuration/KeywordsFlows'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Flow Implementation\n\nexport class PLFlowVar extends PLFlow {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n flowFormat(): Array<PLFlowFormat> {\n return [\n {\n type: PLFlowFormatType.keyword,\n requirement: PLFlowFormatRequirement.required,\n definition: PLKeywordsFlows.var\n },\n {\n type: PLFlowFormatType.output,\n requirement: PLFlowFormatRequirement.required,\n definition: 'variableName'\n },\n {\n type: PLFlowFormatType.source,\n requirement: PLFlowFormatRequirement.required,\n definition: 'context'\n }\n ]\n }\n\n executionType(): PLFlowExecutionType {\n return PLFlowExecutionType.customBody\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Procedure\n\n /// Update current context and decide whether to write something once, multiple times or nothing at all, or in some cases follow to other flows in chain, such as when implementing `if`\n async createBodyIterator(\n _currentContext: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): Promise<FlowIterator> {\n // Execute body once so it can be used inside injected flow\n return FlowIterator.singleExecution(new Map<string, any>())\n }\n\n /// Flow overrides standard behavior and uses its own routine, however, this is ignored when executing in `defaultBody` modeIf not provided, standard flow applies\n async createFlowExecutor(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>,\n _lineOffset: number,\n _firstLineDirective: boolean\n ): Promise<string | null> {\n return new Promise(function(resolve, _) {\n resolve('')\n })\n }\n\n /// If provided, flow can define or redefine context variables. Context after execution of this flow is enhanced with this modification for the entire duration of interpreting\n adjustInterpretingContext(\n _dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n _executionContext: PLExecutionContext,\n _outputs: Map<string, PLFlowOutput>,\n _sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ): FlowAdjustment | null {\n return null\n }\n\n /// If provided, flow can define or redefine user-defined variables.\n async adjustExecutingContext(\n dataContext: PLInterpreterContext,\n _body: FlowIteratorBodyResult,\n executionContext: PLExecutionContext,\n flowIdentifier: Array<string>,\n outputs: Map<string, PLFlowOutput>,\n sources: Map<string, PLFlowSource>,\n _keywords: Map<string, boolean>\n ) {\n let source = sources.get('context')\n if (!source) {\n throw Error('Context must be provided')\n }\n\n let value = await source.asValue(dataContext, executionContext)\n let variableNameObject = outputs.get('variableName')\n if (!variableNameObject) {\n throw Error('Variable name must be provided')\n }\n let variableName = variableNameObject.asString()\n\n // Create mutable variable\n executionContext.variableContext.setVariable(variableName, false, true, flowIdentifier, value)\n }\n}\n","//\n// Function.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLDocumentable } from './../../tools/documentation/Documentable'\nimport { PLDoc } from '../../tools/documentation/Doc'\nimport { PLExecutionContext } from '../ExecutionContext'\nimport { PLInterpreterContext } from './../InterpreterContext'\nimport { PLFunctionArgument } from './FunctionArgument'\nimport { StringUtils } from './../../utils/StringUtils'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunction implements PLDocumentable {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n numberOfArguments(): number {\n // TODO: Rewrite\n /// Throw error as implementation must be provided by child class\n // fatalError(\"Function arguments must be registered\")\n throw Error('Function arguments must be registered')\n }\n\n isVariadic(): boolean {\n return false\n }\n\n keyword(): string {\n // TODO: Rewrite\n /// Throw error as implementation must be provided by child class\n // fatalError(\"Function keyword must be registered\")\n throw Error('Function keyword must be registered')\n }\n\n documentation(): PLDoc | null {\n return null\n }\n\n isPrivate(): boolean {\n return false\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n // There is no standard init required\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async provideValueUsingArgumentString(\n argumentString: string,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Create actual arguments\n let args = this.parseArgumentsFromArgumentString(argumentString)\n\n // Invoke functions\n return this.provideValueUsingArguments(args, context, executionContext)\n }\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any | null> {\n /// Throw error as implementation must be provided by child class\n // fatalError(\"Function must declare a function body\")\n return new Promise(function(_, reject) {\n reject('Function must declare its body')\n })\n }\n\n parseArgumentsFromArgumentString(argumentString: string): Array<PLFunctionArgument> {\n // Split arguments by , (safely handle characters inside quotes, inside brackets and trim excess characters)\n let pieces = StringUtils.splitIgnoringQuotedBracketedContent(argumentString, ',').map(value => {\n return StringUtils.trimmed(value)\n })\n\n // Check whether there is the expected number of arguments, otherwise error out\n let argumentsMismatch = this.isVariadic()\n ? pieces.length < this.numberOfArguments()\n : pieces.length !== this.numberOfArguments()\n\n if (argumentsMismatch) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.expectedDifferentNoArguments(this.keyword, this.numberOfArguments, pieces.length, variadic: this.isVariadic)\n throw Error(\n `expectedDifferentNoArguments: ${this.keyword()}, actual=${pieces.length}, expected=${this.numberOfArguments()}`\n )\n }\n\n // Generate argument for each piece found\n let args: Array<PLFunctionArgument> = []\n for (let [index, piece] of pieces.entries()) {\n args.push(new PLFunctionArgument(piece, this.keyword(), index))\n }\n\n return args\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Argument to value conversion\n\n enrichArgumentError(position: number, error: Error): Error {\n let message: string = error.message\n // TODO: Rewrite\n // return PulsarLangErrors.InterpreterError.invalidFunctionArgument(this.keyword, position.description, message)\n return Error(`Invalid argument ${position} of ${this.keyword()}: ${message}`)\n }\n\n async expectString(\n position: number,\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<string> {\n let argument = this.expectArgument(position, args)\n\n try {\n return await argument.expectString(context, ec)\n } catch (error) {\n throw this.enrichArgumentError(position, error)\n }\n }\n\n async expectInt(\n position: number,\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<number> {\n let argument = this.expectArgument(position, args)\n\n try {\n return await argument.expectInt(context, ec)\n } catch (error) {\n throw this.enrichArgumentError(position, error)\n }\n }\n\n async expectDouble(\n position: number,\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<number> {\n let argument = this.expectArgument(position, args)\n\n try {\n return await argument.expectDouble(context, ec)\n } catch (error) {\n throw this.enrichArgumentError(position, error)\n }\n }\n\n async expectNumeric(\n position: number,\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<number> {\n let argument = this.expectArgument(position, args)\n\n try {\n return await argument.expectNumeric(context, ec)\n } catch (error) {\n throw this.enrichArgumentError(position, error)\n }\n }\n\n async expectBool(\n position: number,\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<boolean> {\n let argument = this.expectArgument(position, args)\n try {\n return await argument.expectBool(context, ec)\n } catch (error) {\n throw this.enrichArgumentError(position, error)\n }\n }\n\n async expectArray(\n position: number,\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<Array<any>> {\n let argument = this.expectArgument(position, args)\n try {\n return await argument.expectArray(context, ec)\n } catch (error) {\n throw this.enrichArgumentError(position, error)\n }\n }\n\n async expectDictionary(\n position: number,\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<Map<any, any>> {\n let argument = this.expectArgument(position, args)\n try {\n return await argument.expectDictionary(context, ec)\n } catch (error) {\n throw this.enrichArgumentError(position, error)\n }\n }\n\n async expectAnyNonNull(\n position: number,\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<any> {\n let argument = this.expectArgument(position, args)\n try {\n return argument.expectAnyNonNull(context, ec)\n } catch (error) {\n throw this.enrichArgumentError(position, error)\n }\n }\n\n async expectAny(\n position: number,\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<any> {\n let argument = this.expectArgument(position, args)\n try {\n return argument.expectAny(context, ec)\n } catch (error) {\n throw this.enrichArgumentError(position, error)\n }\n }\n\n expectArgument(position: number, args: Array<PLFunctionArgument>): PLFunctionArgument {\n if (position > args.length) {\n // Note because this is already checked when parsing, this can only happen by improper usage of the parser\n // throw PulsarLangErrors.InterpreterError.invalidArgument(this.keyword, \"Invalid implementation of function \\(this.keyword), expecting argument #\\(position) but function only provides \\(this.numberOfArguments)\")\n // TODO: Rewrite\n throw Error(\n `Invalid implementation of function ${this.keyword()}, expecting argument #${position} but function only provides ${this.numberOfArguments()}`\n )\n }\n\n return args[position]\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Equality\n\n public equals(obj: PLFunction): boolean {\n return this.keyword() === obj.keyword()\n }\n}\n","//\n// FunctionArgument.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { StringUtils } from './../../utils/StringUtils'\nimport { PLInterpreterContext } from './../InterpreterContext'\nimport { PLExecutionContext } from '../ExecutionContext'\nimport { SyntaxNodeSubstitution } from '../../parser/syntax/nodes/SyntaxNodeSubstitution'\nimport { PLFlowSource } from '../flows/FlowSource'\nimport { isPlainObject } from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Argument Definition\n\nexport class PLFunctionArgument {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n backingProperty: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(argument: string, keyword: string, position: number) {\n if (argument.length === 0) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.functionArgumentEmpty(keyword, position)\n throw Error(`functionArgumentEmpty(#${position} - ${keyword})`)\n }\n\n this.backingProperty = argument\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Property retrieval\n\n async expectString(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<string> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, immediately return it\n return StringUtils.withoutDoubleQuotesSingleOccurance(content)\n } else {\n // No quotes, we interpet it as source expecting string value\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (result !== null && typeof result === 'string') {\n return result\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' should resolve to string\"\n throw Error(`Function argument ${content} should resolve to string`)\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectInt(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<number> {\n // TODO: Rewrite\n // Specifically, make sure it is really int\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, return invalid value as number is expected\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' expected to be number, not string\")\n // TODO: Rewrite\n throw Error(`Function argument ${content} expected to be number, not string`)\n } else {\n let asNumber = Number(content) ?? null\n\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n return asNumber.valueOf()\n } else {\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (typeof result === 'number') {\n return result\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' should resolve to number\")\n throw Error(`Function argument ${content} should resolve to number`)\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectDouble(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<number> {\n // TODO: Rewrite\n // Specifically, make sure it is really double\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, return invalid value as number is expected\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' expected to be number, not string\")\n // TODO: Rewrite\n throw Error(`Function argument ${content} expected to be number, not string`)\n } else {\n let asNumber = Number(content) ?? null\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n return asNumber.valueOf()\n } else {\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (typeof result === 'number') {\n return result\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' should resolve to number\")\n throw Error(`Function argument ${content} should resolve to number`)\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectNumeric(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<number> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // TODO: Rewrite\n // If string is quoted, return invalid value as number is expected\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' expected to be a number, not string\")\n throw Error(`Function argument ${content} expected to be a number, not string`)\n } else {\n let asNumber = Number(content) ?? null\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n return asNumber.valueOf()\n } else {\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (typeof result === 'number') {\n return result as number\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' should resolve to number or number\")\n throw Error(`Function argument ${content} should resolve to number, not string`)\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectBool(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<boolean> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, return invalid value as Bool is expected.\n // Check whether the string contains \"false\" or \"true\" and suggest removing quotes if so\n let noQuotesContent = StringUtils.withoutDoubleQuotesSingleOccurance(content)\n if (noQuotesContent === 'false' || noQuotesContent === 'true') {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"\\(noQuotesContent.capitalized) can't be surrounded with quotes\")\n throw Error(`${noQuotesContent} can't be surrounded with quotes`)\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' expected to be Bool, not string\")\n throw Error(`Function argument ${content} expected to be boolean, not string`)\n }\n } else {\n if (content === 'true') {\n // True constant\n return true\n } else if (content === 'false') {\n // False constant\n return false\n } else {\n // No quotes, we interpet it as source expecting Bool value. Due to how numbers are handled, we expect number and then check if it comes from bool source\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (typeof result === 'boolean') {\n return result as boolean\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' should resolve to Bool\")\n throw Error(`Function argument ${content} should resolve to boolean`)\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectArray(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<Array<any>> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' expected to be Bool, not string\")\n throw Error(`Transformer argument ${content} expected to be array, not string`)\n } else {\n // No quotes, we interpet it as source expecting Bool value. Due to how numbers are handled, we expect number and then check if it comes from bool source\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (result instanceof Array) {\n return result as Array<any>\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to Bool\")\n throw Error(`Transformer argument ${content} should resolve to array`)\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectDictionary(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<Map<any, any>> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' expected to be Bool, not string\")\n throw Error(`Transformer argument ${content} expected to be dictionary, not string`)\n } else {\n // No quotes, we interpet it as source expecting Bool value. Due to how numbers are handled, we expect number and then check if it comes from bool source\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (result instanceof Map) {\n return result as Map<any, any>\n }\n if (isPlainObject(result)) {\n return new Map(Object.entries(result))\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to Bool\")\n throw Error(`Transformer argument ${content} should resolve to dictionary`)\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectAnyNonNull(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<any> {\n try {\n let content = this.backingProperty\n\n // Try to parse as string\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, immediately return it\n return StringUtils.withoutDoubleQuotesSingleOccurance(content)\n } else {\n // Try to parse as int\n let asNumber = Number(content) ?? null\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n // If parsed as number, return it immediately\n return asNumber.valueOf()\n } else {\n // Try to parse as bool\n if (content === 'false') {\n return false\n } else if (content === 'true') {\n return true\n } else {\n // Try to parse as source or fail\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (result !== null) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Function argument '\\(content)' should resolve to value, not null\")\n throw Error(`Function argument ${content} should resolve to value, not null`)\n }\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectAny(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<any> {\n try {\n let content = this.backingProperty\n\n // Try to parse as string\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, immediately return it\n return StringUtils.withoutDoubleQuotesSingleOccurance(content)\n } else {\n // Try to parse as int\n let asNumber = Number(content) ?? null\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n // If parsed as number, return it immediately\n return asNumber.valueOf()\n } else {\n // Try to parse as bool\n if (content === 'false') {\n return false\n } else if (content === 'true') {\n return true\n } else {\n // Try to parse as source or fail\n let result = await this.resolveAsSource(interpreterContext, ec)\n return result\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience resolution\n\n async resolveAsSource(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<any | null> {\n try {\n // TODO: Syntax argument should be able to specify its range\n let substitutionNode = new SyntaxNodeSubstitution(this.backingProperty, ec, [])\n let flowSource = new PLFlowSource(substitutionNode)\n return await flowSource.asValue(interpreterContext, ec)\n } catch (error) {\n throw error\n }\n }\n}\n","//\n// FunctionCall.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreter } from '../../../Interpreter'\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunction } from '../../Function'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionCall extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsFunctions.blueprintsCall\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n const fname = await this.expectString(0, args, context, executionContext)\n const fargs = await this.expectDictionary(1, args, context, executionContext)\n // if (StringUtils.isSurroundedWithDoubleQuotes(fname)) {\n // const blueprintId = StringUtils.withoutDoubleQuotes(fname)\n let blueprint = executionContext.blueprintLoader.loadBlueprint(fname, executionContext, null)\n let interpreter = new PLInterpreter()\n let interpreterContext = new PLInterpreterContext(fargs)\n\n executionContext.getFunctionReturnStack().push(new Map<string, any>())\n\n let output = await interpreter.interpret(blueprint, interpreterContext, executionContext)\n\n let returnedData = executionContext.getFunctionReturnStack().pop() ?? null\n if (!returnedData) {\n throw Error('No data to return')\n }\n returnedData.set('output', output)\n // } else {\n // throw new Error(`Function name must be quoted string`);\n // }\n\n return returnedData\n }\n}\n","//\n// FunctionAnd.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionAnd extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.booleanAnd\n }\n\n isVariadic(): boolean {\n return true\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Iterate all arguments and fail immediately when false encountered, simulating behavior of &&\n for (let arg of args) {\n let booleanValue = await arg.expectBool(context, executionContext)\n if (!booleanValue) {\n return false\n }\n }\n\n return true\n }\n}\n","//\n// FunctionNot.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionNot extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.booleanNot\n }\n\n isVariadic(): boolean {\n return true\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Reverse the argument\n let arg = await this.expectBool(0, args, context, executionContext)\n return !arg\n }\n}\n","//\n// FunctionOr.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionOr extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.booleanOr\n }\n\n isVariadic(): boolean {\n return true\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Iterate all arguments and return immediately when true encountered, simulating behavior of ||\n for (let arg of args) {\n let booleanValue = await arg.expectBool(context, executionContext)\n if (booleanValue) {\n return true\n }\n }\n\n return false\n }\n}\n","//\n// FunctionTernaryValue.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionTernaryValue extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 3\n }\n\n keyword(): string {\n return PLKeywordsFunctions.booleanTernaryValue\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let condition = await this.expectBool(0, args, context, executionContext)\n\n // Return first or second argument based on coonddition result\n return await this.expectAnyNonNull(condition ? 1 : 2, args, context, executionContext)\n }\n}\n","//\n// FunctionEquals.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionEquals extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsFunctions.compareEquals\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let compare1 = await this.expectAny(0, args, context, executionContext)\n let compare2 = await this.expectAny(1, args, context, executionContext)\n\n // Check for type and value equality\n return compare1 === compare2\n }\n}\n","//\n// FunctionEqualsNull.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from '../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionCompareEmpty extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.compareEmpty\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let x = await this.expectAny(0, args, context, executionContext)\n\n // Check for type and value equality\n if (Array.isArray(x)) {\n return x.length === 0\n }\n return !x\n }\n}\n","//\n// FunctionEqualsNonNull.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionEqualsNonNull extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.compareNonNull\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let compare1 = await this.expectAny(0, args, context, executionContext)\n\n // Check for type and value equality\n return !!compare1\n }\n}\n","//\n// FunctionEqualsNull.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionEqualsNull extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.compareNull\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let compare1 = await this.expectAny(0, args, context, executionContext)\n\n // Check for type and value equality\n return !compare1\n }\n}\n","//\n// FunctionGreaterThan.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionGreaterThan extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsFunctions.compareGreaterThan\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let compare1 = await this.expectNumeric(0, args, context, executionContext)\n let compare2 = await this.expectNumeric(1, args, context, executionContext)\n\n // Check for type and value equality\n return compare1 > compare2\n }\n}\n","//\n// FunctionGreaterThanEquals.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionGreaterThanEquals extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsFunctions.compareGreaterThanEquals\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let compare1 = await this.expectNumeric(0, args, context, executionContext)\n let compare2 = await this.expectNumeric(1, args, context, executionContext)\n\n // Check for type and value equality\n return compare1 >= compare2\n }\n}\n","//\n// FunctionLessThan.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionLessThan extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsFunctions.compareLessThan\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let compare1 = await this.expectNumeric(0, args, context, executionContext)\n let compare2 = await this.expectNumeric(1, args, context, executionContext)\n\n // Check for type and value equality\n return compare1 < compare2\n }\n}\n","//\n// FunctionLessThanEquals.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionLessThanEquals extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsFunctions.compareLessThanEquals\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let compare1 = await this.expectNumeric(0, args, context, executionContext)\n let compare2 = await this.expectNumeric(1, args, context, executionContext)\n\n // Check for type and value equality\n return compare1 <= compare2\n }\n}\n","//\n// FunctionNewArray.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionNewArray extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsFunctions.initNewArray\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any | null> {\n return new Array<any>()\n }\n}\n","//\n// FunctionNewDate.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\nimport moment from 'moment'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionNewDate extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsFunctions.initNewDate\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any | null> {\n let current = moment().unix()\n return current\n }\n}\n","//\n// FunctionNewDictionary.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionNewDictionary extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsFunctions.initNewDictionary\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any | null> {\n return new Map<any, any>()\n }\n}\n","//\n// FunctionNewNull.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionNewNull extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsFunctions.initNewNull\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any | null> {\n return null\n }\n}\n","//\n// FunctionNewNumber.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionNewNumber extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsFunctions.initNewNumber\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any | null> {\n return 0\n }\n}\n","//\n// FunctionNewString.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionNewString extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsFunctions.initNewString\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n _args: Array<PLFunctionArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any | null> {\n return ''\n }\n}\n","//\n// FunctionNetworkGetAnonymous.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from '../../../../configuration/KeywordsFunctions'\nimport axios from 'axios'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionNetworkGetAnonymous extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.networkGetAnonymous\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let url = await this.expectString(0, args, context, executionContext)\n\n // Create new response promise for the network request\n return new Promise((respond, reject) => {\n // Retrieve data from the URL, expecting json format\n axios\n .get(url)\n .then(value => {\n if (value.data instanceof Object) {\n // For object, map to dictionary\n let data = new Map(Object.entries(value.data))\n respond(data)\n } else {\n respond(value.data)\n }\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n}\n","//\n// FunctionRandomNumber.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionRandomNumber extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsFunctions.randomNumber\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let lowLimit = await this.expectInt(0, args, context, executionContext)\n let highLimit = await this.expectInt(1, args, context, executionContext)\n\n // Proper range\n if (lowLimit >= highLimit) {\n // TODO: Rewrite\n throw Error(\"Low range can't be smaller than high range\")\n }\n\n // Return true is variable exists in current executed scope, otherwise false\n let randomNumber = Math.floor(Math.random() * highLimit - lowLimit) + lowLimit\n return randomNumber\n }\n}\n","//\n// FunctionRandomNumericArray.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionRandomNumericArray extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 3\n }\n\n keyword(): string {\n return PLKeywordsFunctions.randomNumberArray\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let arraySize = await this.expectInt(0, args, context, executionContext)\n let lowLimit = await this.expectInt(1, args, context, executionContext)\n let highLimit = await this.expectInt(2, args, context, executionContext)\n\n // Proper range\n if (lowLimit >= highLimit) {\n // TODO: Rewrite\n throw Error(\"Low range can't be smaller than high range\")\n }\n\n // Non-empty array\n if (arraySize <= 0) {\n // TODO: Rewrite\n throw Error('Random array must be created non-empty')\n }\n\n // Return true is variable exists in current executed scope, otherwise false\n let array = Array<number>()\n for (let i = 0; i < arraySize; i++) {\n let randomNumber = Math.floor(Math.random() * highLimit - lowLimit) + lowLimit\n array.push(randomNumber)\n }\n\n return array\n }\n}\n","//\n// FunctionRandomString.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionRandomString extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.randomString\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let stringLength = await await this.expectInt(0, args, context, executionContext)\n\n // Non-empty array\n if (stringLength <= 0) {\n // TODO: Rewrite\n throw Error('Random strinng must be created non-empty')\n }\n\n // TODO: Random numbers\n return ' '.repeat(stringLength)\n }\n}\n","//\n// FunctionRandomStringArray.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionRandomStringArray extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsFunctions.randomStringArray\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let arraySize = await await this.expectInt(0, args, context, executionContext)\n let stringLength = await await this.expectInt(1, args, context, executionContext)\n\n // Non-empty array\n if (arraySize <= 0) {\n // TODO: Rewrite\n throw Error('Random array must be created non-empty')\n }\n\n // Return true is variable exists in current executed scope, otherwise false\n let array = Array<string>()\n // TODO: Random strings\n for (let i = 0; i < arraySize; i++) {\n array.push(' '.repeat(stringLength))\n }\n\n return array\n }\n}\n","//\n// FunctionArraysToZippedMap.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionArraysToZippedMap extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsFunctions.supportArraysToZippedMap\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let keyArray = await await this.expectArray(0, args, context, executionContext)\n let valueArray = await await this.expectArray(1, args, context, executionContext)\n\n if (keyArray.length !== valueArray.length) {\n // TODO: Rework\n throw new Error('Key and value arrays must be the same size')\n }\n\n // Return dictionary with mapped keys and values\n let objectMap = new Map<any, any>()\n for (let [index, key] of keyArray.entries()) {\n let value = valueArray[index]\n objectMap.set(key, value)\n }\n\n return objectMap\n }\n}\n","//\n// FunctionVarDefined.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionVarDefined extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.varDefined\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let identifier = await await this.expectString(0, args, context, executionContext)\n\n // Return true is variable exists in current executed scope, otherwise false\n let possibleVariable = executionContext.variableContext.getVariableFailable(\n identifier,\n executionContext.executedScope\n )\n if (possibleVariable) {\n return true\n }\n return false\n }\n}\n","//\n// FunctionVarMutable.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLFunctionArgument } from '../../FunctionArgument'\nimport { PLFunction } from '../../Function'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLKeywordsFunctions } from './../../../../configuration/KeywordsFunctions'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLFunctionVarMutable extends PLFunction {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Configuration\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsFunctions.varMutable\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Function procedure\n\n async provideValueUsingArguments(\n args: Array<PLFunctionArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any | null> {\n // Parse arguments\n let identifier = await this.expectString(0, args, context, executionContext)\n\n // Return true is variable exists in current executed scope, otherwise false\n let possibleVariable = executionContext.variableContext.getVariableFailable(\n identifier,\n executionContext.executedScope\n )\n if (possibleVariable && possibleVariable.isMutable) {\n return true\n }\n return false\n }\n}\n","//\n// PLBlueprintLoader.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLBlueprint } from '../../blueprints/Blueprint'\nimport { PLExecutionContext } from '../ExecutionContext'\nimport { PLBlueprintConfiguration } from './../../blueprints/BlueprintConfiguration'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport class PLBlueprintLoader {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n cachedBlueprints: Map<string, PLBlueprint>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {\n this.cachedBlueprints = new Map<string, PLBlueprint>()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Cache\n\n cache(blueprint: PLBlueprint, id: string | null = null) {\n this.cachedBlueprints[id ?? blueprint.id] = blueprint\n }\n\n public cachedBlueprint(id: string): PLBlueprint | null {\n return this.cachedBlueprints[id] ?? null\n }\n\n public removeCachedBlueprint(id: string): boolean {\n return this.cachedBlueprints.delete(id)\n }\n\n public removeCachedBlueprints() {\n this.cachedBlueprints = new Map<string, PLBlueprint>()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Rendering\n\n loadBlueprint(\n _blueprintId: string,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration\n ): PLBlueprint {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.undefinedBlueprint(blueprintId)\n throw Error('Blueprint loader must provide its own loading routine')\n }\n}\n","//\n// PLMemoryBlueprintLoader.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLBlueprintFactory } from './../../blueprints/BlueprintFactory'\nimport { PLBlueprintConfiguration } from './../../blueprints/BlueprintConfiguration'\nimport { PLBlueprintLoader } from './BlueprintLoader'\nimport { PLExecutionContext } from '../ExecutionContext'\nimport { PLBlueprint } from '../../blueprints/Blueprint'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport class PLMemoryBlueprintLoader extends PLBlueprintLoader {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(blueprints: Map<string, PLBlueprint>) {\n super()\n\n // Cache all initial blueprints\n for (let [key, blueprint] of blueprints) {\n this.cache(blueprint, key)\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Blueprint manipulation\n\n load(blueprint: PLBlueprint, key: string) {\n // Add or replace blueprint\n this.cache(blueprint, key)\n }\n\n loadFromDefinition(\n definition: string,\n key: string,\n executionContext: PLExecutionContext | null = null,\n configuration: PLBlueprintConfiguration | null = null\n ) {\n try {\n // Add or replace blueprint after parsing it\n let blueprint = PLBlueprintFactory.blueprint(definition, key, executionContext, configuration)\n this.cache(blueprint, key)\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Rendering\n\n loadBlueprint(\n blueprintId: string,\n _executionContext: PLExecutionContext,\n _configuration: PLBlueprintConfiguration\n ): PLBlueprint {\n let blueprint = this.cachedBlueprint(blueprintId)\n if (blueprint === null) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.undefinedBlueprint(blueprintId)\n throw Error('undefinedBlueprint:' + blueprintId)\n }\n\n return blueprint\n }\n}\n","//\n// PLLogger.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLLoggerDefaultMessage } from './LoggerDefaultMessages'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport enum PLLogType {\n success,\n info,\n warning,\n error,\n user\n}\n\nexport interface PLLog {\n id: string\n time: Date\n type: PLLogType\n message: string\n}\n\nexport class PLLogger {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n logs: Array<PLLog>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {\n this.logs = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Log manipulation\n\n emptyLogs() {\n this.logs = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Log creation\n\n store(log: PLLog): PLLog {\n this.logs.push(log)\n return log\n }\n\n logSuccess(message: string, id: string): PLLog {\n let log: PLLog = {\n id: id,\n message: message,\n type: PLLogType.success,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logInfo(message: string, id: string): PLLog {\n let log: PLLog = {\n id: id,\n message: message,\n type: PLLogType.info,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logWarning(message: string, id: string): PLLog {\n let log: PLLog = {\n id: id,\n message: message,\n type: PLLogType.warning,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logError(message: string, id: string): PLLog {\n let log: PLLog = {\n id: id,\n message: message,\n type: PLLogType.error,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logUser(message: string, id: string): PLLog {\n let log: PLLog = {\n id: id,\n message: message,\n type: PLLogType.user,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n logType(type: PLLogType, message: string, id: string): PLLog {\n let log: PLLog = {\n id: id,\n message: message,\n type: type,\n time: new Date()\n }\n\n return this.store(log)\n }\n\n // Note not public because only core is allowed to use system messages\n logSystem(systemMessage: PLLoggerDefaultMessage, id: string): PLLog {\n return this.logType(systemMessage.type, systemMessage.message, id)\n }\n}\n","//\n// PLLoggerDefaultMessages.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLLogType } from './Logger'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Interpreter Definition\n\nexport interface PLLoggerDefaultMessage {\n message: string\n type: PLLogType\n}\n\nexport class PLLoggerDefaultMessages {\n static compilerStart: PLLoggerDefaultMessage = {\n message: 'Build started',\n type: PLLogType.info\n }\n static compilerBuildSuccessful: PLLoggerDefaultMessage = {\n message: 'Build successful',\n type: PLLogType.info\n }\n static compilerBuildFailure: PLLoggerDefaultMessage = {\n message: 'Build failed',\n type: PLLogType.info\n }\n static interpreterStart: PLLoggerDefaultMessage = {\n message: 'Rendering started',\n type: PLLogType.info\n }\n static interpreterRenderingSuccessful: PLLoggerDefaultMessage = {\n message: 'Rendering successful',\n type: PLLogType.info\n }\n static interpreterRenderingFailure: PLLoggerDefaultMessage = {\n message: 'Rendering failed',\n type: PLLogType.info\n }\n}\n","import { StringUtils } from './../../utils/StringUtils'\nimport { PLInterpreterContext } from './../InterpreterContext'\n\n//\n// Transformer.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLDocumentable } from './../../tools/documentation/Documentable'\nimport { PLDoc } from '../../tools/documentation/Doc'\nimport { PLExecutionContext } from '../ExecutionContext'\nimport { PLTransformerArgument } from './TransformerArgument'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformer implements PLDocumentable {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n numberOfArguments(): number {\n // TODO: Rewrite\n /// Throw error as implementation must be provided by child class\n // fatalError(\"Transformer arguments must be registered\")\n throw Error('Transformer arguments must be registered')\n }\n\n keyword(): string {\n // TODO: Rewrite\n /// Throw error as implementation must be provided by child class\n // fatalError(\"Transformer keyword must be registered\")\n throw Error('Transformer keyword must be registered')\n }\n\n documentation(): PLDoc | null {\n return null\n }\n\n isPrivate(): boolean {\n return false\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformValueUsingArgumentString(\n value: any,\n argumentString: string,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext,\n isRoot: boolean\n ): Promise<any | null> {\n // If argument string is `self`, use data from the context\n if (argumentString === 'self') {\n if (isRoot) {\n return context.data\n } else {\n // TODO: Rewrite\n throw Error('Self is only allowed at the beginning of transformer chain')\n }\n }\n try {\n if (this.numberOfArguments() === 0) {\n return this.transformValueUsingArguments(value, [], context, executionContext, isRoot)\n }\n\n // Split arguments by , (safely handle characters inside quotes, inside brackets and trim excess characters)\n let pieces = StringUtils.splitIgnoringQuotedBracketedContent(argumentString, ',').map(piece => {\n return StringUtils.trimmed(piece)\n })\n\n // Check whether there is the expected number of arguments, otherwise error out\n if (pieces.length !== this.numberOfArguments()) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.expectedDifferentNoArguments(this.keyword, this.numberOfArguments, pieces.length, variadic: false)\n throw Error('Expected different number of arguments')\n }\n\n // Generate argument for each piece found\n let args: Array<PLTransformerArgument> = []\n for (let [index, piece] of pieces.entries()) {\n args.push(new PLTransformerArgument(piece, this.keyword(), index))\n }\n\n return this.transformValueUsingArguments(value, args, context, executionContext, isRoot)\n } catch (error) {\n throw error\n }\n }\n\n async transformValueUsingArguments(\n value: any,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext,\n isRoot: boolean\n ): Promise<any | null> {\n try {\n // Select mutation implementation based on the data type of the mutator\n if (typeof value === 'string') {\n return await this.transformStringValue(value as string, args, context, executionContext)\n } else if (typeof value === 'number') {\n return await this.transformNumericValue(value as number, args, context, executionContext)\n } else if (typeof value === 'boolean') {\n return await this.transformBooleanValue(value as boolean, args, context, executionContext)\n } else if (value instanceof Array) {\n return await this.transformArrayValue(value as any, args, context, executionContext)\n } else if (value instanceof Map) {\n return await this.transformMapValue(value as any, args, context, executionContext, isRoot)\n } else if (value instanceof Object) {\n return await this.transformMapValue(new Map(Object.entries(value)), args, context, executionContext, isRoot)\n } else if (value === null) {\n return await this.transformNullValue(args, context, executionContext)\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.unsupportedTransformSource(this.keyword, string(describing: value.self))\n throw Error('Unsupported transform source')\n }\n } catch (error) {\n // Forward error without modification\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Type-specific mutators\n\n async transformStringValue(\n _value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Not implemented in subclass means mutator is not supported for specific data type\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.unsupportedTransformSource(this.keyword, \"string\")\n return new Promise(function(_, reject) {\n reject('unsupportedTransformSource, expected string')\n })\n }\n\n async transformBooleanValue(\n _value: boolean,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Not implemented in subclass means mutator is not supported for specific data type\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.unsupportedTransformSource(this.keyword, \"Boolean\")\n return new Promise(function(_, reject) {\n reject('unsupportedTransformSource, expected boolean')\n })\n }\n\n async transformNumericValue(\n _value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Not implemented in subclass means mutator is not supported for specific data type\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.unsupportedTransformSource(this.keyword, \"Number\")\n return new Promise(function(_, reject) {\n reject('unsupportedTransformSource, expected number')\n })\n }\n\n async transformMapValue(\n _value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _isRoot: boolean\n ): Promise<any | null> {\n // Not implemented in subclass means mutator is not supported for specific data type\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.unsupportedTransformSource(this.keyword, \"Dictionary\")\n return new Promise(function(_, reject) {\n reject('unsupportedTransformSource, expected dictionary')\n })\n }\n\n async transformArrayValue(\n _value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Not implemented in subclass means mutator is not supported for specific data type\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.unsupportedTransformSource(this.keyword, \"Array\")\n return new Promise(function(_, reject) {\n reject('unsupportedTransformSource, expected array')\n })\n }\n\n async transformNullValue(\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Fallback to support nullability\n // return new Promise(function(_, reject ) {\n // WTF ???????\n // reject('Unable to use transformer on source of type null')\n // })\n return null\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Argument to value conversion\n\n async expectString(\n position: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<string> {\n try {\n let argument = this.expectArgument(position, args)\n return await argument.expectString(context, ec)\n } catch (error) {\n throw error\n }\n }\n\n async expectInt(\n position: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<number> {\n try {\n let argument = this.expectArgument(position, args)\n return await argument.expectInt(context, ec)\n } catch (error) {\n throw error\n }\n }\n\n async expectDouble(\n position: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<number> {\n try {\n let argument = this.expectArgument(position, args)\n return await argument.expectDouble(context, ec)\n } catch (error) {\n throw error\n }\n }\n\n async expectBool(\n position: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<boolean> {\n try {\n let argument = this.expectArgument(position, args)\n return await argument.expectBool(context, ec)\n } catch (error) {\n throw error\n }\n }\n\n async expectAnyNonNull(\n position: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<any> {\n try {\n let argument = this.expectArgument(position, args)\n return await argument.expectAnyNonNull(context, ec)\n } catch (error) {\n throw error\n }\n }\n\n async expectAny(\n position: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<any> {\n try {\n let argument = this.expectArgument(position, args)\n return await argument.expectAny(context, ec)\n } catch (error) {\n throw error\n }\n }\n\n async expectArray(\n position: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<Array<any>> {\n try {\n let argument = this.expectArgument(position, args)\n return await argument.expectArray(context, ec)\n } catch (error) {\n throw error\n }\n }\n\n async expectDictionary(\n position: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n ec: PLExecutionContext\n ): Promise<Map<any, any>> {\n try {\n let argument = this.expectArgument(position, args)\n return await argument.expectDictionary(context, ec)\n } catch (error) {\n throw error\n }\n }\n\n expectArgument(position: number, args: Array<PLTransformerArgument>): PLTransformerArgument {\n if (position >= args.length) {\n // Note because this is already checked when parsing, this can only happen by improper usage of the parser\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidArgument(this.keyword, \"Invalid implementation of transformer \\(this.keyword), expecting argument #\\(position) but transformer only provides \\(this.numberOfArguments)\")\n throw Error(\n `Invalid implementation of transformer ${this.keyword()}, expecting argument ${position} but transformer only provides ${\n args.length\n }`\n )\n }\n\n return args[position]\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Equality\n\n public equals(obj: PLTransformer): boolean {\n return this.keyword() === obj.keyword()\n }\n}\n","//\n// TransformerArgument.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { StringUtils } from './../../utils/StringUtils'\nimport { PLInterpreterContext } from './../InterpreterContext'\nimport { PLExecutionContext } from '../ExecutionContext'\nimport { SyntaxNodeSubstitution } from '../../parser/syntax/nodes/SyntaxNodeSubstitution'\nimport { PLFlowSource } from '../flows/FlowSource'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Argument Definition\n\nexport class PLTransformerArgument {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n backingProperty: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(argument: string, keyword: string, position: number) {\n if (argument.length === 0) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.transformerArgumentEmpty(keyword, position)\n throw Error(`transformerArgumentEmpty(#${position} - ${keyword})`)\n }\n\n this.backingProperty = argument\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Property retrieval\n\n async expectString(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<string> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, immediately return it\n return StringUtils.withoutDoubleQuotesSingleOccurance(content)\n } else {\n // No quotes, we interpet it as source expecting string value\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (result !== null && typeof result === 'string') {\n return result\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to string\"\n throw Error(`Transformer argument ${content} should resolve to string`)\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectInt(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<number> {\n // TODO: Rewrite\n // Specifically, make sure it is really int\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, return invalid value as number is expected\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' expected to be number, not string\")\n // TODO: Rewrite\n throw Error(`Transformer argument ${content} expected to be number, not string`)\n } else {\n let asNumber = Number(content) ?? null\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n return asNumber.valueOf()\n } else {\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (typeof result === 'number') {\n return result\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to number\")\n throw Error(`Transformer argument ${content} should resolve to number`)\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectDouble(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<number> {\n // TODO: Rewrite\n // Specifically, make sure it is really double\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, return invalid value as number is expected\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' expected to be number, not string\")\n // TODO: Rewrite\n throw Error(`Transformer argument ${content} expected to be number, not string`)\n } else {\n let asNumber = Number(content) ?? null\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n return asNumber.valueOf()\n } else {\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (typeof result === 'number') {\n return result\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to number\")\n throw Error(`Transformer argument ${content} should resolve to number`)\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectNumeric(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<number> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // TODO: Rewrite\n // If string is quoted, return invalid value as number is expected\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' expected to be a number, not string\")\n throw Error(`Transformer argument ${content} expected to be a number, not string`)\n } else {\n let asNumber = Number(content) ?? null\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n return asNumber.valueOf()\n } else {\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (typeof result === 'number') {\n return result as number\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to number or number\")\n throw Error(`Transformer argument ${content} should resolve to number, not string`)\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectBool(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<boolean> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, return invalid value as Bool is expected.\n // Check whether the string contains \"false\" or \"true\" and suggest removing quotes if so\n let noQuotesContent = StringUtils.withoutDoubleQuotesSingleOccurance(content)\n if (noQuotesContent === 'false' || noQuotesContent === 'true') {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"\\(noQuotesContent.capitalized) can't be surrounded with quotes\")\n throw Error(`${noQuotesContent} can't be surrounded with quotes`)\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' expected to be Bool, not string\")\n throw Error(`Transformer argument ${content} expected to be boolean, not string`)\n }\n } else {\n if (content === 'true') {\n // True constant\n return true\n } else if (content === 'false') {\n // False constant\n return false\n } else {\n // No quotes, we interpet it as source expecting Bool value. Due to how numbers are handled, we expect number and then check if it comes from bool source\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (typeof result === 'boolean') {\n return result as boolean\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to Bool\")\n throw Error(`Transformer argument ${content} should resolve to boolean`)\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectArray(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<Array<any>> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' expected to be Bool, not string\")\n throw Error(`Transformer argument ${content} expected to be array, not string`)\n } else if (StringUtils.isStructuralArrayDefinition(content)) {\n // Inline array defined in blueprint ([item1, item2])\n let components = StringUtils.parsedArrayFromDefinition(content)\n if (!components) {\n throw Error(`Array definition not formatted correctly`)\n }\n // Parse each component of the array\n let componentValues = new Array<any>()\n for (let [index, component] of components.entries()) {\n let arg = new PLTransformerArgument(component, 'array.item', index)\n let value = await arg.expectAnyNonNull(interpreterContext, ec)\n componentValues.push(value)\n }\n return componentValues\n } else {\n // No quotes, we interpet it as source expecting Bool value. Due to how numbers are handled, we expect number and then check if it comes from bool source\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (result instanceof Array) {\n return result as Array<any>\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to Bool\")\n throw Error(`Transformer argument ${content} should resolve to array`)\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectDictionary(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<Map<any, any>> {\n try {\n let content = this.backingProperty\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' expected to be Bool, not string\")\n throw Error(`Transformer argument ${content} expected to be dictionary, not string`)\n } else if (StringUtils.isStructuralDictionaryDefinition(content)) {\n // Inline array defined in blueprint ([item1, item2])\n let components = StringUtils.parsedDictionaryFromDefinition(content)\n if (!components) {\n throw Error(`Dictionary definition not formatted correctly`)\n }\n // Parse each component of the array\n let componentValues = new Map<any, any>()\n let index = 0\n for (let [key, value] of components) {\n let keyArg = new PLTransformerArgument(key, 'dict.key', index)\n let valueArg = new PLTransformerArgument(value, 'dict.value', index)\n let parsedKey = await keyArg.expectString(interpreterContext, ec)\n let parsedValue = await valueArg.expectAnyNonNull(interpreterContext, ec)\n if (componentValues.get(parsedKey)) {\n throw Error(`Can't redefine key ${parsedKey} in inline dictionary`)\n } else {\n componentValues.set(parsedKey, parsedValue)\n }\n index++\n }\n return componentValues\n } else {\n // No quotes, we interpet it as source expecting Bool value. Due to how numbers are handled, we expect number and then check if it comes from bool source\n let result = await this.resolveAsSource(interpreterContext, ec)\n if (result instanceof Map) {\n return result as Map<any, any>\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to Bool\")\n throw Error(`Transformer argument ${content} should resolve to dictionary`)\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n async expectAnyNonNull(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<any> {\n const result = await this.expectAny(interpreterContext, ec)\n if (result === null) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.invalidValue(\"Transformer argument '\\(content)' should resolve to value, not null\")\n throw Error(`Transformer argument ${this.backingProperty} should resolve to value, not null`)\n }\n return result\n }\n\n async expectAny(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<any> {\n try {\n let content = this.backingProperty\n\n // Try to parse as string\n if (StringUtils.isSurroundedWithDoubleQuotes(content)) {\n // If string is quoted, immediately return it\n return StringUtils.withoutDoubleQuotesSingleOccurance(content)\n } else {\n // Try to parse as int\n let asNumber = Number(content) ?? null\n if (asNumber !== null && !Number.isNaN(asNumber)) {\n // If parsed as number, return it immediately\n return asNumber.valueOf()\n } else {\n // Try to parse as bool\n if (content === 'false') {\n return false\n } else if (content === 'true') {\n return true\n } else {\n // Try to parse as source or fail\n let result = await this.resolveAsSource(interpreterContext, ec)\n return result\n }\n }\n }\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience resolution\n\n async resolveAsSource(interpreterContext: PLInterpreterContext, ec: PLExecutionContext): Promise<any | null> {\n try {\n // TODO: Syntax argument should be able to specify its range\n let substitutionNode = new SyntaxNodeSubstitution(this.backingProperty, ec, [])\n let flowSource = new PLFlowSource(substitutionNode)\n return await flowSource.asValue(interpreterContext, ec)\n } catch (error) {\n throw error\n }\n }\n}\n","//\n// TransformerAppend.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport { cloneDeep } from 'lodash/fp'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerAppend extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.append\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('value', 'Newly added value', DocDataTypePredefinedType.any)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns new array by extending source array with provided value.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Add new value into cloned array, so we are not modifying the source array when people reuse it\n let newElement = await this.expectAnyNonNull(0, args, context, executionContext)\n var value = value\n var clonedValue = cloneDeep(value)\n clonedValue.push(newElement)\n return clonedValue\n }\n}\n","//\n// TransformerAt.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerAt extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.at\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('index', 'Index of seeked element', DocDataTypePredefinedType.any)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns the Nth element of the array. Throws error when index is out of bounds',\n DocDataTypePredefinedType.any,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let index = await this.expectInt(0, args, context, executionContext)\n\n // Make sure index is present\n if (index < 0 || index >= value.length) {\n // TODO: Rewrite\n throw Error('Index out of bounds')\n }\n\n // Return item at specified index\n return value[index]\n }\n}\n","//\n// TransformerConcat.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerConcat extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.concat\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('value', 'Array to extend with', DocDataTypePredefinedType.array)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns source array extended by content of value array.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let newElements = await this.expectArray(0, args, context, executionContext)\n\n // Append the array. No need to clone as concat creates new array\n return value.concat(newElements)\n }\n}\n","//\n// TransformerEnumerated.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerEnumerated extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.enumerated\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('value', 'Newly added value', DocDataTypePredefinedType.any)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns dictionary with index-based keys and values of source array. This is very useful for loops to obtain index alongside data for each cycle. Enumeration index starts with 0.',\n DocDataTypePredefinedType.dict,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<Map<any, any>> {\n // Return dictionary formed with indices and values of the original array\n // 0: Value0, 1: Value1 ...\n let map = new Map<number, any>()\n let index = 0\n for (let piece of value) {\n map.set(index++, piece)\n }\n\n return map\n }\n}\n","//\n// TransformerFirst.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerFirst extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.first\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Return the first element in the source array.',\n DocDataTypePredefinedType.any,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return first item of the array\n if (value.length === 0) {\n return null\n }\n\n return value[0]\n }\n}\n","//\n// TransformerFrom.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerFrom extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.from\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('index', 'Size of offset from beginning', DocDataTypePredefinedType.int)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns array starting from the Nth element. If index is beyond bounds, will return empty array.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let fromRange = await this.expectInt(0, args, context, executionContext)\n if (fromRange >= value.length) {\n return new Array<any>()\n }\n\n // Form range and return subarray\n return value.slice(fromRange, value.length)\n }\n}\n","//\n// TransformerAppend.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLKeywordsTransformers } from '../../../../configuration/KeywordsTranformers'\nimport { DocArgument, DocDataTypePredefinedType, PLDoc } from '../../../../tools/documentation/Doc'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { PLTransformer } from '../../Transformer'\nimport { PLTransformerArgument } from '../../TransformerArgument'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerJoin extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.join\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('separator', 'Separator to join', DocDataTypePredefinedType.string)]\n\n return PLDoc.transfomerDoc(this, 'Returns joined elements', DocDataTypePredefinedType.string, args, null)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n let separator = await this.expectString(0, args, context, executionContext)\n return value.join(separator)\n }\n}\n","//\n// TransformerRandom.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerRandom extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.random\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns random element from the source array. Returns null if empty.',\n DocDataTypePredefinedType.any,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return null when there are no elements in the array\n if (value.length === 0) {\n return null\n }\n\n // Return random element of the array\n return value[Math.floor(Math.random() * value.length)]\n }\n}\n","//\n// TransformerRange.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerRange extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsTransformers.range\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('from', 'First index of the searched range', DocDataTypePredefinedType.int),\n PLDoc.arg('count', 'Number of elements to retrieve', DocDataTypePredefinedType.int)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns N elements of the array, starting at index M. Indexing starts from 0. If the array is not sufficiently long, will be trimmed from the end. Returns empty array if from is out of bounds.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let from = await this.expectInt(0, args, context, executionContext)\n let size = await this.expectInt(1, args, context, executionContext)\n\n // Make sure it is possible to form that range\n if (from >= value.length) {\n return new Array<any>()\n }\n\n // Make sure range starts with positive number\n if (from < 0) {\n throw Error('Range has to start with positive number')\n }\n\n // Form range and return the subarray\n let startIndex = from\n let endIndex = size <= value.length ? size : value.length\n return value.slice(startIndex, endIndex + 1)\n }\n}\n","import { cloneDeep } from 'lodash/fp'\n//\n// TransformerReversed.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerReversed extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.reversed\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns reversed array, where the first element becomes the last and vice versa.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Clone array\n let clonedArray = cloneDeep(value)\n\n // Reverse and return\n clonedArray.reverse()\n return clonedArray\n }\n}\n","import { cloneDeep } from 'lodash/fp'\n//\n// TransformerShuffled.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerShuffled extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.shuffled\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(this, 'Returns shuffled source array.', DocDataTypePredefinedType.array, args, null)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Clone array\n let clonedArray = cloneDeep(value)\n\n // Reverse and return\n this.shuffle(clonedArray)\n return clonedArray\n }\n\n shuffle(array: Array<any>) {\n // Note: this forms uniform distribution using Knuth-Fisher-Yates algorithm\n // See this article for some fun around shuffle: https://blog.codinghorror.com/the-danger-of-naivete/\n let counter = array.length\n\n // While there are elements in the array\n while (counter > 0) {\n // Pick a random index\n let index = Math.floor(Math.random() * counter)\n\n // Decrease counter by 1\n counter--\n\n // And swap the last element with it\n let temp = array[counter]\n array[counter] = array[index]\n array[index] = temp\n }\n\n return array\n }\n}\n","import { cloneDeep } from 'lodash/fp'\n//\n// TransformerSorted.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSorted extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.sorted\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns sorted array. Elements will be sorted in descending order.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Clone the array\n let clonedArray = cloneDeep(value)\n\n // Shuffle and return\n clonedArray.sort()\n return clonedArray\n }\n}\n","//\n// TransformerUntil.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerUntil extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.until\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('index', 'Number of first N elements', DocDataTypePredefinedType.int)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns first N elements of the array. If the array is not sufficiently long, will return the entire array.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformArrayValue(\n value: Array<any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let endRange = await this.expectInt(0, args, context, executionContext)\n\n // Make sure range starts with positive number\n if (endRange < 0) {\n throw Error('Range has to start with positive number')\n }\n\n // Form range and return\n let endIndex = endRange < value.length ? endRange : value.length\n return value.slice(0, endIndex + 1)\n }\n}\n","import { cloneDeep } from 'lodash/fp'\n//\n// TransformerAdd.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerAdd extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsTransformers.add\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('key', 'Key of newly added object', DocDataTypePredefinedType.string),\n PLDoc.arg('value', 'Value of newly added object', DocDataTypePredefinedType.any)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n 'Extends source dictionary with provided value, accessible by provided key.',\n DocDataTypePredefinedType.bool,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformMapValue(\n value: Map<any, any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let userKey = await this.expectString(0, args, context, executionContext)\n let extensionValue = await this.expectAny(1, args, context, executionContext)\n\n // Clone the map, extend it and return\n let clonedMap = cloneDeep(value)\n clonedMap.set(userKey, extensionValue)\n return clonedMap\n }\n}\n","//\n// TransformerValue.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { DocArgument, PLDoc } from '../../../../tools/documentation/Doc'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { PLTransformerValue } from './TransformerValue'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerAlwaysRootValue extends PLTransformerValue {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.alwaysRootValue\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('key', 'Key of searched object', DocDataTypePredefinedType.any)]\n\n return PLDoc.transfomerDoc(this, 'Only for internal language use', DocDataTypePredefinedType.bool, args, null)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformMapValue(\n value: Map<any, any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext,\n //isRoot: boolean\n ): Promise<any | null> {\n return super.transformMapValue(value, args, context, executionContext, true)\n }\n}\n","//\n// TransformerKeys.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerKeys extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.keys\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Transforms dictionary into an array containing all its keys.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformMapValue(\n value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return dictionary keys, omitting values\n let dataArray = new Array<any>()\n for (let [key, _] of value) {\n dataArray.push(key)\n }\n\n return dataArray\n }\n}\n","//\n// TransformerValue.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { StringUtils } from './../../../../utils/StringUtils'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerValue extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.value\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('key', 'Key of searched object', DocDataTypePredefinedType.any)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns object from source dictionary by provided key.',\n DocDataTypePredefinedType.bool,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformMapValue(\n value: Map<any, any>,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext,\n isRoot: boolean\n ): Promise<any | null> {\n if (args.length === 0) {\n return null\n }\n\n let arg = args[0].backingProperty\n\n // Clear argument of surrounding double quotes, although this shouldn't get to it\n if (StringUtils.isSurroundedWithDoubleQuotes(arg)) {\n arg = StringUtils.withoutDoubleQuotes(arg)\n }\n\n // If this is root transformer, lookup variable first. If found, retrieve its value. Lookup can only happen for root-level transformer\n let variable = executionContext.variableContext.getVariableFailable(arg, executionContext.executedScope)\n if (variable !== null && isRoot) {\n let payload = variable.payload\n if (value.has(payload)) {\n return value.get(payload)\n } else {\n return payload\n }\n }\n\n // With no defined variable, lookup initial context\n // If key exists in the directionary, return the value directly\n if (value.has(arg)) {\n return value.get(arg)\n }\n\n // If key doesn't exist, check for the computed value within primary context\n let keyValue = context.data.get(arg)\n if (keyValue && typeof keyValue === 'string') {\n if (value.has(keyValue)) {\n return value.get(keyValue)\n }\n }\n\n return null\n }\n}\n","//\n// TransformerValues.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerValues extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.values\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Transforms source dictionary into an array containing its values.',\n DocDataTypePredefinedType.bool,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformMapValue(\n value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return dictionary values, omitting keys\n let dataArray = new Array<any>()\n for (let [_, piece] of value) {\n dataArray.push(piece)\n }\n\n return dataArray\n }\n}\n","//\n// TransformerAbsolute.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerAbsolute extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.absolute\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(this, 'Returns absolute source value.', DocDataTypePredefinedType.int, args, null)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return absolute representation of the number\n return Math.abs(value)\n }\n}\n","//\n// TransformerAddedBy.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerAddedBy extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.addedBy\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('value', 'Number to add', DocDataTypePredefinedType.number)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns number by adding value to source.',\n DocDataTypePredefinedType.number,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let userValue = await this.expectDouble(0, args, context, executionContext)\n\n // Return number by adding the original value to the user provided value\n return value + userValue\n }\n}\n","//\n// TransformerCeiled.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerCeiled extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.ceiled\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns the next highest integer value by rounding up source if neccessary.',\n DocDataTypePredefinedType.int,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return ceiled number\n return Math.ceil(value)\n }\n}\n","//\n// TransformerDividedBy.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerDividedBy extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.dividedBy\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('value', 'Number to divide by', DocDataTypePredefinedType.number)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns number by dividing value by value.',\n DocDataTypePredefinedType.number,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let userValue = await this.expectDouble(0, args, context, executionContext)\n\n // Division by zero handled gracefully\n if (userValue === 0) {\n return 0\n }\n\n // Return number by dividing the original value to the user provided value\n return value / userValue\n }\n}\n","//\n// TransformerFloored.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerFloored extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.floored\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns the next highest integer value by rounding down source if neccessary.',\n DocDataTypePredefinedType.number,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return Math.floor(value)\n }\n}\n","//\n// TransformerMultipliedBy.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerMultipledBy extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.multipliedBy\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('value', 'Number to multiply by', DocDataTypePredefinedType.number)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns number by multiplying source and value.',\n DocDataTypePredefinedType.number,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let userValue = await this.expectDouble(0, args, context, executionContext)\n\n // Return number by adding the original value to the user provided value\n return value * userValue\n }\n}\n","//\n// TransformerNegative.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerNegative extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.negative\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns value that is either the same as source if it was <0, or source multiplied by -1 if it was >0',\n DocDataTypePredefinedType.number,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return negative representation of the number. If number is already negative, do nothing\n if (value > 0) {\n return value * -1\n }\n\n return value\n }\n}\n","//\n// TransformerPositive.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerPositive extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.positive\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns value that is either the same as source if it was >0, or source multiplied by -1 if it was <0.',\n DocDataTypePredefinedType.number,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return positive representation of the number. If number is already negative, do nothing\n if (value < 0) {\n return value * -1\n }\n\n return value\n }\n}\n","//\n// TransformerRounded.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerRounded extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.rounded\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('fractions', 'Number of fractions to round to', DocDataTypePredefinedType.number)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns source rounded to specified number of fractions. Note that fractions must be a integer.',\n DocDataTypePredefinedType.number,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let fractionalPlaces = await await this.expectInt(0, args, context, executionContext)\n\n // Return rounded value to N fraction places provided by the user\n return this.rounded(value, fractionalPlaces)\n }\n\n rounded(value, toPlaces: number): number {\n let divisor = Math.pow(10.0, toPlaces)\n return Math.round(value * divisor) / divisor\n }\n}\n","//\n// TransformerSubtractedBy.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSubtractedBy extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.subtractedBy\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('value', 'Number to subtract', DocDataTypePredefinedType.number)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns number by subtracting value from source.',\n DocDataTypePredefinedType.number,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let userValue = await this.expectDouble(0, args, context, executionContext)\n\n // Return number by subtracting the original value with user provided value\n return value - userValue\n }\n}\n","//\n// TransformerCount.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerCount extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.count\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'For arrays and dictionaries, this returns number of elements. For strings, the length of the string is returned instead.',\n DocDataTypePredefinedType.number,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return value.length\n }\n\n async transformMapValue(\n value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return value.size\n }\n\n async transformArrayValue(\n value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return value.length\n }\n}\n","//\n// TransformerFormatDate.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport moment from 'moment'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerFormatDate extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.formatDate\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('format', 'Standard ISO8601 output format', DocDataTypePredefinedType.string)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n \"Returns formatted string which was created from source date. If the source is string, it must be of ISO8601 format (either yyyy-MM-dd'T'HH:mm:ssZ or yyyy-MM-dd'T'HH:mm:ss.SSSZ is accepted), otherwise an error is thrown. If the source is number, it is considered as a standard time interval since 1970 (Unix epoch time).\",\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformNumericValue(\n value: number,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let format = await this.expectString(0, args, context, executionContext)\n\n // Format date using the provided format\n let date = moment.unix(value).toDate()\n return this.format(format, date)\n }\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let format = await this.expectString(0, args, context, executionContext)\n\n // Try formatting including milliseconds\n let date = new Date(value)\n return this.format(format, date)\n }\n\n format(format: string, date: Date): string {\n return moment(date).format(format)\n }\n}\n","//\n// TransformerIsArray.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerIsArray extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.isArray\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns true if the source is array, false otherwise.',\n DocDataTypePredefinedType.bool,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n _value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformBooleanValue(\n _value: boolean,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformNumericValue(\n _value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformMapValue(\n _value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _isRoot: boolean\n ): Promise<any | null> {\n return false\n }\n\n async transformArrayValue(\n _value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return true\n }\n}\n","//\n// TransformerIsBool.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerIsBool extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.isBool\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns true if the source is boolean, false otherwise. Value of boolean is ignored in this case, this is strictly for checking its data type.',\n DocDataTypePredefinedType.bool,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n _value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformBooleanValue(\n _value: boolean,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return true\n }\n\n async transformNumericValue(\n _value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformMapValue(\n _value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _isRoot: boolean\n ): Promise<any | null> {\n return false\n }\n\n async transformArrayValue(\n _value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n}\n","//\n// TransformerIsDictionary.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerIsDictionary extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.isDictionary\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns true if the source is dictionary, false otherwise.',\n DocDataTypePredefinedType.bool,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n _value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformBooleanValue(\n _value: boolean,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformNumericValue(\n _value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformMapValue(\n _value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _isRoot: boolean\n ): Promise<any | null> {\n return true\n }\n\n async transformArrayValue(\n _value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n}\n","//\n// TransformerIsNull.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerIsNull extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.isNull\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns true if the source is null, false otherwise. Any operation that results in undefined value (for example, calling .first() on empty array results to null.',\n DocDataTypePredefinedType.bool,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n _value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformBooleanValue(\n _value: boolean,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformNumericValue(\n _value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformMapValue(\n _value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _isRoot: boolean\n ): Promise<any | null> {\n return false\n }\n\n async transformArrayValue(\n _value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformNullValue(\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return true\n }\n}\n","//\n// TransformerIsNumber.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerIsNumber extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.isNumber\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns true if the source is number, false otherwise.',\n DocDataTypePredefinedType.bool,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n _value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformBooleanValue(\n _value: boolean,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformNumericValue(\n _value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return true\n }\n\n async transformMapValue(\n _value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _isRoot: boolean\n ): Promise<any | null> {\n return false\n }\n\n async transformArrayValue(\n _value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n}\n","//\n// TransformerIsString.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerIsString extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.isString\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns true if the source is string, false otherwise.',\n DocDataTypePredefinedType.bool,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n _value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return true\n }\n\n async transformBooleanValue(\n _value: boolean,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformNumericValue(\n _value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n\n async transformMapValue(\n _value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _isRoot: boolean\n ): Promise<any | null> {\n return false\n }\n\n async transformArrayValue(\n _value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return false\n }\n}\n","//\n// TransformerToString.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerToString extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.toString\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n \"Allows to describe value that otherwise can't be used as substitution output. For example, dictionary can't be printed by {{ dict }}, however, it can be printed using {{ dict.toString() }}. This method fully describes dictionary, array, string, number or bool, all supported data types. Dictionaries and arrays will be deep-described including their content.\",\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return value\n }\n\n async transformBooleanValue(\n value: boolean,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return `${value ? 'true' : 'false'}`\n }\n\n async transformNumericValue(\n value: number,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return `${value}`\n }\n\n async transformArrayValue(\n value: Array<any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return JSON.stringify(value)\n }\n\n async transformMapValue(\n _value: Map<any, any>,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext,\n _isRoot: boolean\n ): Promise<any | null> {\n // TODO\n return ''\n }\n}\n","//\n// TransformerCamelcased.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport _ from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerCamelcased extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.camelcased\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns string in camel case representation',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n const upperFirst = await this.expectBool(0, _args, _context, _executionContext)\n\n const str = _.camelCase(value)\n return upperFirst ? _.upperFirst(str) : str\n }\n}\n","//\n// TransformerCapitalized.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport _ from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerCapitalized extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.capizalited\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(this, 'Returns Capitalized source string.', DocDataTypePredefinedType.string, args, null)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return capitalized string\n return _.capitalize(value)\n }\n}\n","//\n// TransformerCapitalized.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport _ from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerContains extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsTransformers.contains\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('contains', 'String to search for', 'String')]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns true or false depending whether the source string constains provided string. Case sensitive search.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let userValue = await this.expectString(0, args, context, executionContext)\n\n // Return capitalized string\n return value.includes(userValue)\n }\n}\n","//\n// TransformerDefault.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerDefault extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.default\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('default', 'Text to use as default fallback', DocDataTypePredefinedType.string)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns default value if the source value is empty in case of array and dictionary, its 0 in case of number, the length of string is 0 or value is null',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let defaultValue = await this.expectString(0, args, context, executionContext)\n\n // Return default value if provided string is empty but not nil\n return value.length === 0 ? defaultValue : value\n }\n\n async transformNullValue(\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let defaultValue = await this.expectString(0, args, context, executionContext)\n\n // Return default value because argument was null\n return defaultValue\n }\n\n // TODO: Rewrite\n // We want to support additional cases\n}\n","//\n// TransformerEquals.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerEquals extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.equals\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('value', 'Value to compare to', DocDataTypePredefinedType.string)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Outputs value only is it is equal to another value. Value must be a string value.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let userValue = await this.expectString(0, args, context, executionContext)\n\n // Test for string equality with given string\n return value === userValue ? value : ''\n }\n}\n","//\n// TransformerEqualsTernary.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerEqualsTernary extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 3\n }\n\n keyword(): string {\n return PLKeywordsTransformers.equalsTernary\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('compareTo', 'Value to compare to', DocDataTypePredefinedType.string),\n PLDoc.arg('trueValue', 'Value used if true', DocDataTypePredefinedType.string),\n PLDoc.arg('falseValue', 'Value used if false', DocDataTypePredefinedType.string)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns first string if the source is equal to provided value, otherwise returns second string.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let compareTo = await await this.expectString(0, args, context, executionContext)\n let output1 = await await this.expectString(1, args, context, executionContext)\n let output2 = await await this.expectString(2, args, context, executionContext)\n\n // Test for string equality with given string - if equal, return the first string, otherwise return the second string\n return value === compareTo ? output1 : output2\n }\n}\n","//\n// TransformerExtended.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerExtended extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsTransformers.extended\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('prefix', 'Prefix text', DocDataTypePredefinedType.string),\n PLDoc.arg('suffix', 'Suffix text', DocDataTypePredefinedType.string)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n 'Return source string prefixed and suffixed with provided values.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let prefix = await this.expectString(0, args, context, executionContext)\n let suffix = await this.expectString(1, args, context, executionContext)\n\n // Return prefixed value of the original string\n return `${prefix}${value}${suffix}`\n }\n}\n","//\n// TransformerLowercased.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport _ from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerLowercased extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.lowercased\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(this, 'Returns lowercased source string.', DocDataTypePredefinedType.string, args, null)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return _.toLower(value)\n }\n}\n","//\n// TransformerPrefixed.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerPrefixed extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.prefixed\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('prefix', 'Prefix text', DocDataTypePredefinedType.string)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Return source string prefixed with provided value.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let prefix = await this.expectString(0, args, context, executionContext)\n\n // Return prefixed value of the original string\n return `${prefix}${value}`\n }\n}\n","import { StringUtils } from './../../../../utils/StringUtils'\n\n//\n// TransformerReplacing.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerReplacing extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsTransformers.replacing\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('search', 'Searched text to be replaced', DocDataTypePredefinedType.string),\n PLDoc.arg('replace', 'Text to replace with', DocDataTypePredefinedType.string)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns source string with all occurances of provided substring replaced with another string.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let searchString = await this.expectString(0, args, context, executionContext)\n let replacementString = await this.expectString(1, args, context, executionContext)\n\n // Return string with all occurances of provided string with the replacement value\n return StringUtils.replaceAll(value, searchString, replacementString)\n }\n}\n","//\n// TransformerSlashDoubleQuotes.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport { StringUtils } from './../../../../utils/StringUtils'\n\nimport _ from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSlashDoubleQuotes extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.slashDoubleQuotes\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns source string with all double quotes prefixed with backslash.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return string with safe double quotes\n return StringUtils.replaceAll(value, `\"`, `\\\"`)\n }\n}\n","import { StringUtils } from './../../../../utils/StringUtils'\n//\n// TransformerSlashNewlines.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSlashNewlines extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.slashNewlines\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns source string with all newlines prefixed with backslash.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return string with safe newlines\n return StringUtils.replaceAll(value, '\\n', '\\\\\\n')\n }\n}\n","//\n// TransformerSlashSingleQuotes.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSlashSingleQuotes extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.slashSingleQuotes\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns source string with all single quotes prefixed with backslash.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return string with safe single quotes\n return value.replace(\"'\", \"'\")\n }\n}\n","//\n// TransformerSnakecased.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport _ from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSnakecased extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.snakecased\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(this, 'Returns snakecased source string.', DocDataTypePredefinedType.string, args, null)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return _.snakeCase(value)\n }\n}\n","//\n// TransformerSplit.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSplit extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.split\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('separator', 'string to split with', DocDataTypePredefinedType.string)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns array of strings made by splitting the source string using separator. Separator can be multiple characters.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let separator = await this.expectString(0, args, context, executionContext)\n\n // Split string by separator\n return value.split(separator)\n }\n}\n","//\n// TransformerSplitExpr.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSplitExpr extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.splitExpr\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('expression', 'Expression to split with', DocDataTypePredefinedType.string)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns array of strings split using expression. Expression must be a valid regular expression, otherwise exception is thrown.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let separator = await this.expectString(0, args, context, executionContext)\n\n // Split string by separator\n let components = value.split(new RegExp(separator)).filter(c => {\n return c.length !== 0\n })\n return components\n }\n}\n","//\n// TransformerSubstring.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSubstring extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 2\n }\n\n keyword(): string {\n return PLKeywordsTransformers.substring\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [\n PLDoc.arg('location', 'Location of substring', DocDataTypePredefinedType.int),\n PLDoc.arg('length', 'String to split with', DocDataTypePredefinedType.int)\n ]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns substring by initial location and length. location and length must be Int. When location is out of bounds, empty string is returned. When length + location is out of bounds, substring until the end of the original string will be returned.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let location = await this.expectInt(0, args, context, executionContext)\n let length = await this.expectInt(1, args, context, executionContext)\n\n // Test bounds and return trimmed results if needed\n if (location >= value.length) {\n return ''\n }\n\n let boundLength = value.length - location > length ? length : value.length - location\n\n // Return substring\n return value.substr(location, boundLength)\n }\n}\n","//\n// TransformerSuffixed.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerSuffixed extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.suffixed\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('suffix', 'Suffix text', DocDataTypePredefinedType.string)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Return source string suffixed with provided value.',\n DocDataTypePredefinedType.string,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let suffix = await this.expectString(0, args, context, executionContext)\n\n // Return prefixed value of the original string\n return `${value}${suffix}`\n }\n}\n","//\n// TransformerTrimmingCharacter.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from '../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from '../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from '../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerTrimmingCharacter extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 1\n }\n\n keyword(): string {\n return PLKeywordsTransformers.trimming\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = [PLDoc.arg('character', 'Character to trim', DocDataTypePredefinedType.string)]\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns string left and right-trimmed with specified character.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n args: Array<PLTransformerArgument>,\n context: PLInterpreterContext,\n executionContext: PLExecutionContext\n ): Promise<any> {\n // Parse arguments\n let character = await this.expectString(0, args, context, executionContext)\n\n // Only possible to trim single character\n if (character.length !== 1) {\n // TODO: Rewrite\n throw Error('Replacement string must be a single character')\n }\n\n // Return trimmed string\n return this.trim(value, character)\n }\n\n trim(s, c): string {\n if (c === ']') c = '\\\\]'\n if (c === '\\\\') c = '\\\\\\\\'\n return s.replace(new RegExp('^[' + c + ']+|[' + c + ']+$', 'g'), '')\n }\n}\n","//\n// TransformerTrimmingSpaces.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerTrimmingSpaces extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.trimmingSpaces\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(\n this,\n 'Returns string with left and right trimmed spaces.',\n DocDataTypePredefinedType.array,\n args,\n null\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n // Return trimmed string\n return value.trim()\n }\n}\n","//\n// TransformerUppercased.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLTransformer } from '../../Transformer'\nimport { PLDoc, DocArgument } from '../../../../tools/documentation/Doc'\nimport { PLTransformerArgument } from '../../TransformerArgument'\nimport { PLExecutionContext } from '../../../ExecutionContext'\nimport { PLInterpreterContext } from './../../../InterpreterContext'\nimport { DocDataTypePredefinedType } from './../../../../tools/documentation/Doc'\nimport { PLKeywordsTransformers } from './../../../../configuration/KeywordsTranformers'\nimport _ from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLTransformerUppercased extends PLTransformer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Errors\n\n numberOfArguments(): number {\n return 0\n }\n\n keyword(): string {\n return PLKeywordsTransformers.uppercased\n }\n\n documentation(): PLDoc {\n // Provide documentation\n let args: Array<DocArgument> = []\n\n return PLDoc.transfomerDoc(this, 'Returns uppercased source string.', DocDataTypePredefinedType.string, args, null)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutation\n\n async transformStringValue(\n value: string,\n _args: Array<PLTransformerArgument>,\n _context: PLInterpreterContext,\n _executionContext: PLExecutionContext\n ): Promise<any> {\n return _.toUpper(value)\n }\n}\n","//\n// Variable.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport _ from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Transformer Definition\n\nexport class PLVariable {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n /** Variable identifier */\n identifier: string\n\n /** Context identifiers where it was defined, which is used in scope lookup */\n scope: Array<string>\n\n /** If set, variable can be redefined after it was defined for the first time */\n isMutable: boolean\n\n /** If set, variable is considered global and will be available in any context */\n isGlobal: boolean\n\n /** Data payload of the variable */\n payload: any\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(identifier: string, scope: Array<string>, isMutable: boolean, isGlobal: boolean, payload: any) {\n this.identifier = identifier\n this.scope = scope\n this.isMutable = isMutable\n this.isGlobal = isGlobal\n this.payload = payload\n }\n\n static immutableProperty(scope: Array<string>, identifier: string, payload: any): PLVariable {\n return new PLVariable(identifier, scope, false, false, payload)\n }\n\n static mutableProperty(scope: Array<string>, identifier: string, payload: any): PLVariable {\n return new PLVariable(identifier, scope, true, false, payload)\n }\n\n static immutableGlobalProperty(scope: Array<string>, identifier: string, payload: any): PLVariable {\n return new PLVariable(identifier, scope, false, true, payload)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Lookup\n\n setPayload(payload: any) {\n if (!this.isMutable) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.variableImmutable(this.identifier)\n throw Error('variableImmutable')\n }\n\n this.payload = payload\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Validation\n\n isAvailableInContext(flowIdentifier: Array<string>): boolean {\n // Properties that are global are always available, no matter the scope\n if (this.isGlobal) {\n return true\n }\n\n // Properties defined within root scope are also always available\n if (this.scope.length === 0) {\n return true\n }\n\n // Properties that were defined in scope deeper than current executing scope can't be available.. obviously\n if (flowIdentifier.length < this.scope.length) {\n return false\n }\n\n // Compare the flow. Property is available if it was defined within the proper scope\n return _.isEqual(this.scope, flowIdentifier.slice(0, this.scope.length))\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Debug\n\n debugDescription(): string {\n return `${this.isMutable ? 'var' : 'let'} ${this.identifier}, defined in scope ${this.scope}, ${\n this.isGlobal ? 'global' : 'scoped'\n }, type: ${typeof this.payload}`\n }\n}\n","//\n// PLVariableContext.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\nimport { PLVariable } from './Variable'\nimport _ from 'lodash'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - PLInterpreterContext Definition\n\nexport class PLVariableContext {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n stack: Array<PLVariable>\n\n functionReturnStack: Array<Map<string, any>> = []\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {\n this.stack = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Variable creation\n\n setVariable(identifier: string, isGlobal: boolean, isMutable: boolean, context: Array<string>, payload: any) {\n // Find any variable that matches in the context. If any was found, it can't be set as shadowing is not allowed\n if (this.getVariableFailable(identifier, context)) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.variableAlreadyDefined(identifier)\n throw Error('variableAlreadyDefined')\n }\n\n // Create variable\n let variable: PLVariable\n if (isGlobal && !isMutable) {\n variable = PLVariable.immutableGlobalProperty(_.clone(context), identifier, payload)\n } else if (!isGlobal && !isMutable) {\n variable = PLVariable.immutableProperty(_.clone(context), identifier, payload)\n } else if (!isGlobal && isMutable) {\n variable = PLVariable.mutableProperty(_.clone(context), identifier, payload)\n }\n\n this.stack.push(variable)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Variable retrieval\n\n getVariable(identifier: string, context: Array<string>): PLVariable {\n // TODO: Lookup optimization, but considering just how much user variables can blueprints realistically have, it is just not needed now\n // Find any variable that matches in the context. Since variables can't be shadowed, this will only ever return one or zero variables\n // Fail if no variables are found\n let variable = this.getVariableFailable(identifier, context)\n if (variable === null) {\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.variableNotDefined(identifier)\n throw Error(`variableNotDefined: ${identifier}`)\n }\n\n return variable\n }\n\n getVariableFailable(identifier: string, context: Array<string>): PLVariable | null {\n // TODO: Lookup optimization, but considering just how much user variables can blueprints realistically have, it is just not needed now\n // Find any variable that matches in the context. Since variables can't be shadowed, this will only ever return one or zero variables\n let lookup = this.variables(identifier).filter(variable => {\n return variable.isAvailableInContext(context)\n })\n return lookup.length > 0 ? lookup[0] : null\n }\n\n variables(identifier: string): Array<PLVariable> {\n return this.stack.filter(variable => {\n return variable.identifier === identifier\n })\n }\n}\n","//\n// ConcreteBuffer.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { ConcreteToken } from './ConcreteToken'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - LexicalToken Buffer Definition\n\nexport class ConcreteBuffer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n tokens: Array<ConcreteToken>\n\n isEmpty(): boolean {\n return this.tokens.length === 0\n }\n\n size(): number {\n return this.tokens.length\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(tokens: Array<ConcreteToken>) {\n this.tokens = tokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Manipulation\n\n addToken(token: ConcreteToken) {\n this.tokens.push(token)\n }\n\n addTokens(tokens: [ConcreteToken]) {\n tokens.forEach(token => {\n this.tokens.push(token)\n })\n }\n\n removeFirst(): ConcreteToken | null {\n if (this.tokens.length === 0) {\n return null\n }\n\n return this.tokens.splice(0, 1)[0]\n }\n\n removeLast(): ConcreteToken | null {\n if (this.tokens.length === 0) {\n return null\n }\n\n return this.tokens.pop()\n }\n\n removeAt(at: number): ConcreteToken | null {\n if (this.tokens.length > at) {\n return this.tokens.splice(at, 1)[0]\n } else {\n return null\n }\n }\n\n removeLastFew(count: number): Array<ConcreteToken> {\n return this.tokens.splice(this.tokens.length - count, count)\n }\n\n removeFirstFew(count: number): Array<ConcreteToken> {\n return this.tokens.splice(0, count)\n }\n\n shallowCopy(): ConcreteBuffer {\n var copiedTokens = new Array<ConcreteToken>()\n this.tokens.forEach(token => {\n let copiedToken: ConcreteToken = {\n type: token.type,\n associatedValue: token.associatedValue,\n lineOffset: token.lineOffset,\n firstLineDirective: token.firstLineDirective,\n lts: token.lts,\n debugSymbol: token.debugSymbol\n }\n copiedTokens.push(copiedToken)\n })\n\n return new ConcreteBuffer(copiedTokens)\n }\n\n first(): ConcreteToken | null {\n if (this.tokens.length === 0) {\n return null\n }\n\n return this.tokens[0]\n }\n\n last(): ConcreteToken | null {\n if (this.tokens.length === 0) {\n return null\n }\n\n return this.tokens[this.tokens.length - 1]\n }\n\n lookahead(offset: number): ConcreteToken | null {\n if (this.tokens.length > offset) {\n return this.tokens[offset]\n }\n\n return null\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Debug\n\n debugDescription(): string {\n return `\n --- Concrete Buffer ---\n - Count: ${this.tokens.length} tokens\n - Tags:\n ${this.tokens\n .map(token => {\n return ` - ${JSON.stringify(token)}`\n })\n .join('\\n')}\n `\n }\n}\n","//\n// ConcreteParser.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLDebugger } from '../../../debugger/Debugger'\nimport { PLParserConcreteError } from '../../../debugger/DebuggerErrors'\nimport { PLBlueprintConfiguration } from './../../../blueprints/BlueprintConfiguration'\nimport { StringUtils } from './../../../utils/StringUtils'\nimport { LexicalBuffer } from './../Lexical/LexicalBuffer'\nimport { LexicalToken, LexicalTokenType } from './../Lexical/LexicalToken'\nimport { ConcreteBuffer } from './ConcreteBuffer'\nimport { ConcreteToken, ConcreteTokenType } from './ConcreteToken'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\ninterface ExtractionResult {\n token: ConcreteToken\n size: number\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - LexicalToken Parser Definition\n\nexport class ConcreteParser {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n tokens: LexicalBuffer\n configuration: PLBlueprintConfiguration\n debugger: PLDebugger\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(tokens: LexicalBuffer, configuration: PLBlueprintConfiguration, debug: PLDebugger) {\n this.tokens = tokens\n this.configuration = configuration\n this.debugger = debug\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Parsing\n\n parse(): ConcreteBuffer {\n let concreteBuffer = new ConcreteBuffer([])\n let openedFlows: number = 0\n let lineOffset: number = 0\n let isFirstLineDirective: boolean = true\n\n try {\n // Don't parse empty token array\n if (this.tokens.size() === 0) {\n return concreteBuffer\n }\n\n // Create mutable copy of provided tokens\n let lexicalBuffer = this.tokens.shallowCopy()\n\n // Iterate until the buffer is empty, constructing tokens\n let token = lexicalBuffer.removeFirst()\n while (token !== null) {\n let extracted: ExtractionResult | null = null\n switch (token.type) {\n case LexicalTokenType.plainText:\n extracted = this.extractTextToken(lexicalBuffer.tokens, token.associatedValue)\n lineOffset += token.associatedValue.length\n\n // Check whether string only contains whitespaces (or tabs). Otherwise, it is not first line directive\n if (!StringUtils.isOnlySpaces(token.associatedValue)) {\n isFirstLineDirective = false\n }\n break\n case LexicalTokenType.newline:\n // Handle beginning of the new line\n extracted = {\n token: {\n type: ConcreteTokenType.text,\n associatedValue: '\\n',\n lineOffset: 0,\n firstLineDirective: false,\n lts: [token],\n debugSymbol: null\n },\n size: 1\n }\n lineOffset = 0\n break\n case LexicalTokenType.openingSubstitution:\n extracted = this.extractSubstitutionToken(lexicalBuffer.tokens, token)\n // Substitution always means flow on the same line won't be the initial directive\n isFirstLineDirective = false\n break\n case LexicalTokenType.openingComment:\n // In case of comment, discard everything and don't create token, only remove tokens\n // Comment tokens don't participate in syntax table\n lexicalBuffer.removeFirstFew(this.extractCommentToken(lexicalBuffer.tokens))\n break\n case LexicalTokenType.openingFlow:\n // Parse the flow\n extracted = this.extractFlow(lexicalBuffer.tokens, lineOffset, isFirstLineDirective, token)\n if (extracted.token.type === ConcreteTokenType.flowEnd) {\n openedFlows -= 1\n if (openedFlows < 0) {\n throw this.debugger.reportAnalysisErrorFromLexicalToken(\n PLParserConcreteError.enclosingFlowTagPrecedingFlowDefinition,\n token\n )\n }\n } else {\n openedFlows += 1\n }\n\n // Check the previous token\n let lastBufferedToken = concreteBuffer.last()\n if (lastBufferedToken !== null) {\n if (lastBufferedToken.type === ConcreteTokenType.text) {\n if (StringUtils.isOnlySpacesOrLineBreaks(lastBufferedToken.associatedValue)) {\n concreteBuffer.removeLast()\n } else {\n // Option: Enable when it should not be possible to put anything after flow tag\n // throw this.debugger.reportAnalysisErrorFromLexicalToken(PLParserConcreteError.flowTextNotAllowedAfterDefinition, token)\n }\n }\n }\n\n // Check the next token after extracted result. If it is newline token, remove it because we want to ignore newline after flow definition\n let followingToken = lexicalBuffer.lookahead(extracted.size - 1)\n if (followingToken !== null) {\n if (followingToken.type === LexicalTokenType.newline) {\n lexicalBuffer.removeAt(extracted.size - 1)\n }\n }\n break\n case LexicalTokenType.enclosingSubstitution:\n throw this.debugger.reportAnalysisErrorFromLexicalToken(\n PLParserConcreteError.missingOpeningSubstitutionTag,\n token\n )\n case LexicalTokenType.enclosingComment:\n throw this.debugger.reportAnalysisErrorFromLexicalToken(\n PLParserConcreteError.missingOpeningCommentTag,\n token\n )\n case LexicalTokenType.enclosingFlow:\n throw this.debugger.reportAnalysisErrorFromLexicalToken(PLParserConcreteError.missingOpeningFlowTag, token)\n case LexicalTokenType.flowEnd:\n throw this.debugger.reportAnalysisErrorFromLexicalToken(PLParserConcreteError.missingOpeningFlowTag, token)\n case LexicalTokenType.openingEditorPlaceholder:\n throw this.debugger.reportAnalysisErrorFromLexicalToken(PLParserConcreteError.editorPlaceholderFound, token)\n case LexicalTokenType.enclosingEditorPlaceholder:\n throw this.debugger.reportAnalysisErrorFromLexicalToken(PLParserConcreteError.editorPlaceholderFound, token)\n }\n\n // Remove the extracted tokens and add concrete one instead\n if (extracted !== null) {\n // print(\"extracted \\(lineOffset)\")\n let extractedTokens = lexicalBuffer.removeFirstFew(Math.max(extracted.size - 1, 0)) // Only remove n-1 tokens because one was already removed by iterating over buffer\n concreteBuffer.addToken(extracted.token)\n this.debugger.symbolTable.emitSymbolFromConcreteToken(extracted.token)\n\n // For newline, fix lineOffset and reset directive pool\n let lastToken = extractedTokens[extractedTokens.length - 1]\n if (lastToken) {\n switch (lastToken.type) {\n case LexicalTokenType.newline:\n lineOffset = 0\n isFirstLineDirective = true\n break\n case LexicalTokenType.plainText:\n if (lastToken.associatedValue.endsWith('\\n')) {\n lineOffset = 0\n isFirstLineDirective = true\n }\n break\n default:\n break\n }\n }\n }\n\n // Remove another token from the buffer\n token = lexicalBuffer.removeFirst()\n }\n } catch (error) {\n throw error\n }\n\n return concreteBuffer\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Token Extraction\n\n extractTextToken(tokens: Array<LexicalToken>, prefix: string): ExtractionResult {\n let complexString: string = prefix\n var lts: Array<LexicalToken> = new Array<LexicalToken>()\n\n for (let [index, token] of tokens.entries()) {\n lts.push(token)\n switch (token.type) {\n case LexicalTokenType.plainText:\n complexString += token.associatedValue\n break\n case LexicalTokenType.newline:\n complexString += '\\n'\n // When newline is encountered, close the text token and extract the one afterwards as well\n return {\n token: {\n type: ConcreteTokenType.text,\n associatedValue: complexString,\n lineOffset: 0,\n firstLineDirective: false,\n lts: lts,\n debugSymbol: null\n },\n size: index + 2\n }\n default:\n // When non-text token is encountered, close the text token\n return {\n token: {\n type: ConcreteTokenType.text,\n associatedValue: complexString,\n lineOffset: 0,\n firstLineDirective: false,\n lts: lts,\n debugSymbol: null\n },\n size: index + 1\n }\n }\n }\n\n return {\n token: {\n type: ConcreteTokenType.text,\n associatedValue: complexString,\n lineOffset: 0,\n firstLineDirective: false,\n lts: lts,\n debugSymbol: null\n },\n size: tokens.length\n }\n }\n\n extractSubstitutionToken(tokens: Array<LexicalToken>, openingToken: LexicalToken): ExtractionResult {\n // Expect 2 tokens\n if (tokens.length < 2) {\n throw this.debugger.reportAnalysisErrorFromLexicalTokens(PLParserConcreteError.unclosedSubstitutionTag, [\n openingToken,\n ...tokens\n ])\n }\n\n // Expect definition and enclosure\n if (this.isText(tokens[0]) && tokens[1].type === LexicalTokenType.enclosingSubstitution) {\n return {\n token: {\n type: ConcreteTokenType.substitution,\n associatedValue: this.textFrom(tokens[0]),\n lineOffset: 0,\n firstLineDirective: false,\n lts: [openingToken, tokens[0], tokens[1]],\n debugSymbol: null\n },\n size: 3\n }\n }\n\n // Structure is incorrect\n throw this.debugger.reportAnalysisErrorFromLexicalTokens(PLParserConcreteError.invalidSubstitutionStructure, [\n ...tokens,\n openingToken\n ])\n }\n\n extractCommentToken(tokens: Array<LexicalToken>): number {\n for (let [index, token] of tokens.entries()) {\n if (token.type === LexicalTokenType.enclosingComment) {\n return index + 1\n }\n }\n\n // Structure is incorrect\n throw this.debugger.reportAnalysisErrorFromLexicalTokens(PLParserConcreteError.unclosedCommentTag, tokens)\n }\n\n extractFlow(\n tokens: Array<LexicalToken>,\n lineOffset: number,\n isFirstLineDirective: boolean,\n openingToken: LexicalToken\n ): ExtractionResult {\n // Expect 2 tokens\n if (tokens.length < 2) {\n throw this.debugger.reportAnalysisErrorFromLexicalTokens(PLParserConcreteError.unclosedFlowTag, [\n openingToken,\n ...tokens\n ])\n }\n\n // Expect definition and enclosure. Create either flow directive or flow end based on the token found inside\n if (this.isText(tokens[0]) && tokens[1].type === LexicalTokenType.enclosingFlow) {\n return {\n token: {\n type: ConcreteTokenType.flow,\n associatedValue: this.textFrom(tokens[0]),\n lineOffset: lineOffset,\n firstLineDirective: isFirstLineDirective,\n lts: [openingToken, tokens[0], tokens[1]],\n debugSymbol: null\n },\n size: 3\n }\n } else if (tokens[0].type === LexicalTokenType.flowEnd && tokens[1].type === LexicalTokenType.enclosingFlow) {\n return {\n token: {\n type: ConcreteTokenType.flowEnd,\n associatedValue: null,\n lineOffset: 0,\n firstLineDirective: false,\n lts: [openingToken, tokens[0], tokens[1]],\n debugSymbol: null\n },\n size: 3\n }\n }\n\n // Flow is incorrect, because it doesn't contain correct pieces\n throw this.debugger.reportAnalysisErrorFromLexicalTokens(PLParserConcreteError.invalidFlowStructure, [\n openingToken,\n ...tokens\n ])\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n isEqual(t1: LexicalToken, t2: LexicalToken): boolean {\n return t1.type === t2.type && t1.associatedValue === t2.associatedValue\n }\n\n isText(t1: LexicalToken): boolean {\n return t1.type === LexicalTokenType.plainText\n }\n\n textFrom(token: LexicalToken): string {\n switch (token.type) {\n case LexicalTokenType.plainText:\n return token.associatedValue\n default:\n throw Error(\"Internal: Can't extract text from non-text token of type (token))\")\n }\n }\n}\n","//\n// ConcreteToken.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\nimport { LexicalToken } from '../Lexical/LexicalToken'\n\nexport enum ConcreteTokenType {\n text = 'text',\n substitution = 'substitution',\n flow = 'flow',\n flowEnd = 'flowEnd'\n}\n\nexport class ConcreteToken {\n /** Type of the concrete token */\n type: ConcreteTokenType\n\n /** Additional information associated with the token - usually its payload */\n associatedValue: string | null\n\n /** Line offset from the line beginning */\n lineOffset: number\n\n /** Flag signifying that the concrete token is the first executable token on a single processed line (but might not be the only one) */\n firstLineDirective: boolean\n\n /** Lexical tokens providing raw information for the concrete token */\n lts: LexicalToken[]\n\n /** Debug symbol identifier */\n debugSymbol: string | null\n}\n","//\n// LexicalBuffer.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { LexicalToken } from './LexicalToken'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - LexicalToken Buffer Definition\n\nexport class LexicalBuffer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n tokens: Array<LexicalToken>\n lastId: number\n\n isEmpty(): boolean {\n return this.tokens.length === 0\n }\n\n size(): number {\n return this.tokens.length\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(tokens: Array<LexicalToken>) {\n this.tokens = tokens\n this.lastId = tokens.length\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Manipulation\n\n addToken(token: LexicalToken) {\n this.tokens.push(token)\n this.lastId += 1\n }\n\n addTokens(tokens: Array<LexicalToken>) {\n tokens.forEach(token => {\n this.tokens.push(token)\n })\n }\n\n removeFirst(): LexicalToken | null {\n if (this.tokens.length === 0) {\n return null\n }\n\n let removedToken = this.tokens.splice(0, 1)[0]\n return removedToken\n }\n\n removeLast(): LexicalToken | null {\n if (this.tokens.length === 0) {\n return null\n }\n\n return this.tokens.pop()\n }\n\n removeAt(at: number): LexicalToken | null {\n if (this.tokens.length > at) {\n return this.tokens.splice(at, 1)[0]\n } else {\n return null\n }\n }\n\n removeLastFew(count: number): Array<LexicalToken> {\n return this.tokens.splice(this.tokens.length - count, count)\n }\n\n removeFirstFew(count: number): Array<LexicalToken> {\n let removedTokens = this.tokens.splice(0, count)\n return removedTokens\n }\n\n shallowCopy(): LexicalBuffer {\n var copiedTokens = new Array<LexicalToken>()\n this.tokens.forEach(token => {\n let copiedToken: LexicalToken = {\n type: token.type,\n associatedValue: token.associatedValue,\n startChar: token.startChar,\n startLine: token.startLine,\n endChar: token.endChar,\n endLine: token.endLine,\n virtual: token.virtual,\n debugSymbol: token.debugSymbol\n }\n copiedTokens.push(copiedToken)\n })\n\n return new LexicalBuffer(copiedTokens)\n }\n\n shallowCopyOmittingVirtualTokens(): LexicalBuffer {\n let copy = this.shallowCopy()\n copy.tokens = copy.tokens.filter(token => !token.virtual)\n return copy\n }\n\n first(): LexicalToken | null {\n if (this.tokens.length === 0) {\n return null\n }\n\n return this.tokens[0]\n }\n\n last(): LexicalToken | null {\n if (this.tokens.length === 0) {\n return null\n }\n\n return this.tokens[this.tokens.length - 1]\n }\n\n lookahead(offset: number): LexicalToken | null {\n if (this.tokens.length > offset) {\n return this.tokens[offset]\n }\n\n return null\n }\n\n sequentialIdentifier(): string {\n // Form unique identifier for each lexical token in form of l-#\n return `l-${this.size() + 1}`\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Debug\n\n debugDescription(): string {\n return `\n --- Lexical Buffer ---\n - Count: ${this.tokens.length} tokens\n - Tags:\n ${this.tokens\n .map(token => {\n return ` - ${JSON.stringify(token)}`\n })\n .join('\\n')}\n `\n }\n}\n","//\n// LexicalParser.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLDebugger } from '../../../debugger/Debugger'\nimport { SymbolBuffer } from '../../symbols/SymbolBuffer'\nimport { PLBlueprintConfiguration } from './../../../blueprints/BlueprintConfiguration'\nimport { LexicalBuffer } from './LexicalBuffer'\nimport { LexicalToken, LexicalTokenType } from './LexicalToken'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - LexicalParser Definition\n\nexport class LexicalParser {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n definition: string\n configuration: PLBlueprintConfiguration\n debugger: PLDebugger\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(definition: string, configuration: PLBlueprintConfiguration, debug: PLDebugger) {\n this.definition = definition\n this.configuration = configuration\n this.debugger = debug\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Parsing\n\n parse(): LexicalBuffer {\n // Create token storage\n let buffer = new LexicalBuffer([])\n let symbolBuffer = new SymbolBuffer()\n\n // Split the lines first\n let pieces = this.definition.split('\\n')\n\n // Iterate on eachh line, splitting it into control tags and plain texts\n pieces.forEach(piece => {\n let startIndex = 0\n let skipNext = false\n\n // Test each char separately\n let scalars = piece.split('')\n for (let [index, scalar] of scalars.entries()) {\n // Move buffer one characte forward\n symbolBuffer.seekNextChar()\n\n // In case we have previously found opening tag, skip the next char\n if (skipNext) {\n skipNext = false\n continue\n }\n\n // First for the opening tag, then enclosing tag\n // If the opening tag is found, test what comes after it\n // If the closing tag is found, test what comes before it\n // If (in both cases) control elements are found, close current token\n // and create new one from the control element. Then continue parsing forward,\n // potentially skipping the peeked character\n if (scalar === this.configuration.openingWrapperIdentifier) {\n // Skip last character as it can't form wrapper\n if (scalars.length === index + 1) {\n break\n }\n\n // Found opening wrapper, peek at character after it and see whether it is a control element. If no present, skip\n let lookaheadToken = scalars.length > index + 1 ? scalars[index + 1] : null\n if (!lookaheadToken) {\n continue\n }\n\n let controlToken = this.openingToken(lookaheadToken, symbolBuffer.line, symbolBuffer.char)\n if (controlToken) {\n // Found the token, construct the control block and text token with the content before that\n if (index > 0) {\n // Only when text has something\n let endIndex = index - 1\n if (endIndex >= startIndex) {\n let substring = piece.substr(startIndex, endIndex - startIndex + 1)\n let textToken: LexicalToken = {\n type: LexicalTokenType.plainText,\n associatedValue: substring,\n startLine: symbolBuffer.line,\n startChar: symbolBuffer.char - substring.length,\n endLine: symbolBuffer.line,\n endChar: symbolBuffer.char - 1,\n virtual: false,\n debugSymbol: null\n }\n buffer.addToken(textToken)\n this.debugger.symbolTable.emitSymbolFromLexicalToken(textToken)\n }\n }\n\n buffer.addToken(controlToken)\n this.debugger.symbolTable.emitSymbolFromLexicalToken(controlToken)\n skipNext = true\n startIndex = index + 2\n }\n } else if (scalar === this.configuration.closingWrapperIdentifier) {\n // Found closing wrapper, peek at character before it and see whether it is control element\n let previousToken = index > 0 ? scalars[index - 1] : null\n if (!previousToken) {\n continue\n }\n\n let controlToken = this.enclosingToken(previousToken, symbolBuffer.line, symbolBuffer.char)\n if (controlToken) {\n let suffixTokens: Array<LexicalToken> | null = null\n\n // Found the token, construct the control block\n if (index - 2 > startIndex) {\n // Handle text between control tags\n let text = piece.substr(startIndex, index - startIndex - 1)\n let flowEndAdded = false\n if (controlToken.type === LexicalTokenType.enclosingFlow) {\n // Test for shorthand closure of flows where we are not using second control tag, ie {[ definition /]}\n if (text.endsWith(this.configuration.flowEnd)) {\n // If it is, remove the flowEnd character from resulting text and instead add suffix token\n suffixTokens = this.enclosingFlowTagCombination(symbolBuffer.line, symbolBuffer.char)\n text = text.substr(0, text.length - 1)\n flowEndAdded = true\n }\n }\n if (text.length > 0) {\n let textToken: LexicalToken = {\n type: LexicalTokenType.plainText,\n associatedValue: text,\n startLine: symbolBuffer.line,\n startChar: symbolBuffer.char - 2 - text.length + (flowEndAdded ? 0 : 1),\n endLine: symbolBuffer.line,\n endChar: symbolBuffer.char - 3 + (flowEndAdded ? 0 : 1),\n virtual: false,\n debugSymbol: null\n }\n buffer.addToken(textToken)\n this.debugger.symbolTable.emitSymbolFromLexicalToken(textToken)\n }\n } else if (index - 1 > startIndex) {\n // For exactly one char, test if it is a control definition, otherwise create normal text\n // TODO: Validate correctness\n let possibleEnd = scalars[startIndex]\n if (possibleEnd === this.configuration.flowEnd) {\n let flowEndToken: LexicalToken = {\n type: LexicalTokenType.flowEnd,\n associatedValue: null,\n startLine: symbolBuffer.line,\n startChar: symbolBuffer.char,\n endLine: symbolBuffer.line,\n endChar: symbolBuffer.char,\n virtual: false,\n debugSymbol: null\n }\n buffer.addToken(flowEndToken)\n this.debugger.symbolTable.emitSymbolFromLexicalToken(flowEndToken)\n } else {\n let textToken: LexicalToken = {\n type: LexicalTokenType.plainText,\n associatedValue: possibleEnd,\n startLine: symbolBuffer.line,\n startChar: symbolBuffer.char,\n endLine: symbolBuffer.line,\n endChar: symbolBuffer.char,\n virtual: false,\n debugSymbol: null\n }\n buffer.addToken(textToken)\n this.debugger.symbolTable.emitSymbolFromLexicalToken(textToken)\n }\n }\n\n // Add control token\n buffer.addToken(controlToken)\n this.debugger.symbolTable.emitSymbolFromLexicalToken(controlToken)\n startIndex = index + 1\n\n // Add any token added by parsing but not originally present\n if (suffixTokens) {\n suffixTokens.forEach(t => {\n buffer.addToken(t)\n this.debugger.symbolTable.emitSymbolFromLexicalToken(t)\n })\n }\n }\n }\n }\n\n // Add any text was left on the line\n if (startIndex !== piece.length) {\n let substring = piece.substr(startIndex, piece.length - startIndex)\n let textToken: LexicalToken = {\n type: LexicalTokenType.plainText,\n associatedValue: substring,\n startLine: symbolBuffer.line,\n startChar: symbolBuffer.char - substring.length,\n endLine: symbolBuffer.line,\n endChar: symbolBuffer.char,\n virtual: false,\n debugSymbol: null\n }\n buffer.addToken(textToken)\n this.debugger.symbolTable.emitSymbolFromLexicalToken(textToken)\n }\n\n // Add newline token\n let newlineToken: LexicalToken = {\n type: LexicalTokenType.newline,\n associatedValue: null,\n startLine: symbolBuffer.line,\n startChar: symbolBuffer.char + 1,\n endLine: symbolBuffer.line,\n endChar: symbolBuffer.char + 1,\n virtual: false,\n debugSymbol: null\n }\n buffer.addToken(newlineToken)\n this.debugger.symbolTable.emitSymbolFromLexicalToken(newlineToken)\n symbolBuffer.seekNextLine()\n })\n\n // Remove extraneous last token added from the iterators\n buffer.removeLast()\n\n return buffer\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n enclosingFlowTagCombination(line: number, character: number): Array<LexicalToken> {\n return [\n {\n type: LexicalTokenType.openingFlow,\n associatedValue: null,\n startChar: character,\n endChar: character + 1,\n startLine: line,\n endLine: line,\n virtual: true,\n debugSymbol: null\n },\n {\n type: LexicalTokenType.flowEnd,\n associatedValue: null,\n startChar: character + 2,\n endChar: character + 2,\n startLine: line,\n endLine: line,\n virtual: true,\n debugSymbol: null\n },\n {\n type: LexicalTokenType.enclosingFlow,\n associatedValue: null,\n startChar: character + 3,\n endChar: character + 4,\n startLine: line,\n endLine: line,\n virtual: true,\n debugSymbol: null\n }\n ]\n }\n\n openingToken(from: string, line: number, character: number): LexicalToken | null {\n let type: LexicalTokenType\n\n switch (from) {\n case this.configuration.openingSubstitutionIdentifier:\n type = LexicalTokenType.openingSubstitution\n break\n case this.configuration.openingFlowIdentifier:\n type = LexicalTokenType.openingFlow\n break\n case this.configuration.openingCommentIdentifier:\n type = LexicalTokenType.openingComment\n break\n case this.configuration.openingEditorPlaceholderIdentifier:\n type = LexicalTokenType.openingEditorPlaceholder\n break\n }\n\n if (type) {\n return {\n type: type,\n associatedValue: null,\n startChar: character,\n endChar: character + 1,\n startLine: line,\n endLine: line,\n virtual: false,\n debugSymbol: null\n }\n }\n return null\n }\n\n enclosingToken(from: string, line: number, character: number): LexicalToken | null {\n let type: LexicalTokenType\n\n switch (from) {\n case this.configuration.closingSubstitutionIdentifier:\n type = LexicalTokenType.enclosingSubstitution\n break\n case this.configuration.closingFlowIdentifier:\n type = LexicalTokenType.enclosingFlow\n break\n case this.configuration.closingCommentIdentifier:\n type = LexicalTokenType.enclosingComment\n break\n case this.configuration.closingEditorPlaceholderIdentifier:\n type = LexicalTokenType.enclosingEditorPlaceholder\n break\n }\n\n if (type) {\n return {\n type: type,\n associatedValue: null,\n startChar: character - 1,\n endChar: character,\n startLine: line,\n endLine: line,\n virtual: false,\n debugSymbol: null\n }\n }\n return null\n }\n}\n","//\n// LexicalToken.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\nexport enum LexicalTokenType {\n openingSubstitution = 'openingSubstitution',\n enclosingSubstitution = 'enclosingSubstitution',\n openingFlow = 'openingFlow',\n enclosingFlow = 'enclosingFlow',\n flowEnd = 'flowEnd',\n openingComment = 'openingComment',\n enclosingComment = 'enclosingComment',\n openingEditorPlaceholder = 'openingEditorPLaceholder',\n enclosingEditorPlaceholder = 'enclosingEditorPlaceholder',\n plainText = 'plainText',\n newline = 'newline'\n}\n\nexport class LexicalToken {\n type: LexicalTokenType\n associatedValue: string | null\n startChar: number\n startLine: number\n endChar: number\n endLine: number\n\n debugSymbol: string | null\n\n /** Flag signifying that token was created by the system */\n virtual: boolean\n}\n","//\n// LanguageError.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLErrorAnalysis } from './LanguageErrorAnalysis'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Custom Error\n\nexport class PLError extends Error {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n analysis: PLErrorAnalysis | null\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(message: string, analysis: PLErrorAnalysis | null) {\n // Restore prototype chain so the error correctly works for class and superclass\n super(message)\n const actualProto = new.target.prototype\n Object.setPrototypeOf(this, actualProto)\n\n // Store properties into now-linked project\n this.analysis = analysis ?? null\n }\n}\n","//\n// LanguageErrorAnalysis.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport enum PLErrorSeverityType {\n warning,\n error\n}\n\nexport enum PLErrorSourceType {\n analyzer,\n runtime\n}\n\nexport type PLErrorRange = {\n startLine: number\n startChar: number\n endLine: number\n endChar: number\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Error Analysis Container\n\nexport class PLErrorAnalysis {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n severity?: PLErrorSeverityType\n source?: PLErrorSourceType\n range?: PLErrorRange\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(\n severity?: PLErrorSeverityType,\n source?: PLErrorSourceType,\n range?: { startLine: number; startChar: number; endLine: number; endChar: number }\n ) {\n this.severity = severity\n this.source = source\n this.range = range\n }\n}\n","//\n// Symbol.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Supernova. All rights reserved.\n//\n\nimport { SymbolType } from './SymbolType'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nexport interface SymbolModel {\n identifier: string\n source: string\n startLine: number\n startChar: number\n endLine: number\n endChar: number\n type: SymbolType\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Symbol Table Definition\n\nexport class Symbol implements SymbolModel {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n identifier: string\n source: string\n startLine: number\n startChar: number\n endLine: number\n endChar: number\n type: SymbolType\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(model: SymbolModel) {\n Object.assign(this, model)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Symbol creation\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Symbol lookup\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Symbol representation\n\n /** Retrieve symbol data without identifier */\n anonymizedSymbolData() {\n return {\n source: this.source,\n startLine: this.startLine,\n startChar: this.startChar,\n endLine: this.endLine,\n endChar: this.endChar,\n type: this.type\n }\n }\n}\n","//\n// SymbolBuffer.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Symbol Buffer Definition\n\nexport class SymbolBuffer {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n line: number\n char: number\n seekFirstMode: boolean\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {\n this.line = 0\n this.char = -1\n this.seekFirstMode = true\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Buffer manipulation\n\n /** Modify seeking buffer with singular character */\n seekUsingCharacter(char: string) {\n if (char.length !== 1) {\n throw 'Seek must only happen on individual characters'\n }\n if (char === '\\n') {\n this.seekNextLine()\n } else {\n this.seekNextChar()\n }\n }\n\n /** Modify seeking buffer with sequence of characters. Can be both regular and special (newlines) characters and modifies buffer accordingly */\n seekUsingMultipleCharacters(chars: string) {\n for (let char of chars) {\n this.seekUsingCharacter(char)\n }\n }\n\n /** Modify counters by regular character */\n seekNextChar() {\n this.char += 1\n }\n\n /** Modify counters by newline character */\n seekNextLine() {\n this.line += 1\n this.char = this.seekFirstMode ? -1 : 0\n }\n\n /** Set behavior of counter. When enabled, counter will start from -1, expecting seek to happen before first data read. Defaults to true */\n setSeekHappensFirst(seekFirst: boolean) {\n this.seekFirstMode = seekFirst\n }\n}\n","//\n// SymbolFactory.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Supernova. All rights reserved.\n//\n\nimport { flatten } from 'lodash'\nimport { v4 as uuid } from 'uuid'\nimport { SyntaxNode } from '../syntax/nodes/SyntaxNode'\nimport { ConcreteToken } from '../Tokenization/Concrete/ConcreteToken'\nimport { LexicalToken } from '../Tokenization/Lexical/LexicalToken'\nimport { Symbol } from './Symbol'\nimport { SymbolType } from './SymbolType'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Symbol Factory Definition\n\nexport class SymbolFactory {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n private evaluatedSource: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(source: string) {\n this.evaluatedSource = source\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Factory configuration\n\n setSource(source: string) {\n this.evaluatedSource = source\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience symbol constructors\n\n private symbol(\n type: SymbolType,\n source: string,\n startLine: number,\n startChar: number,\n endLine: number,\n endChar: number\n ): Symbol {\n return new Symbol({\n type: type,\n source: source,\n startLine: startLine,\n startChar: startChar,\n endLine: endLine,\n endChar: endChar,\n identifier: uuid()\n })\n }\n\n lexicalSymbolFromToken(token: LexicalToken) {\n return this.symbol(\n SymbolType.lexicalToken,\n this.evaluatedSource,\n token.startLine,\n token.startChar,\n token.endLine,\n token.endChar\n )\n }\n\n concreteSymbolFromToken(token: ConcreteToken) {\n let range = this.computeSymbolRangeFromLexicalTokens(token.lts)\n return this.symbol(\n SymbolType.concreteToken,\n this.evaluatedSource,\n range.startLine,\n range.startChar,\n range.endLine,\n range.endChar\n )\n }\n\n syntaxSymbolFromNode(token: SyntaxNode) {\n let range = this.computeSymbolRangeFromConcreteTokens(token.backingTokens)\n return this.symbol(\n SymbolType.syntaxToken,\n this.evaluatedSource,\n range.startLine,\n range.startChar,\n range.endLine,\n range.endChar\n )\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Range computing\n\n /** Compute symbol range from array of given lexical tokens. Will find beginning and end line and char or return -1 if no tokens were given */\n computeSymbolRangeFromLexicalTokens(\n tokens: LexicalToken[]\n ): { startLine: number; startChar: number; endLine: number; endChar: number } {\n // We are assuming tokens form continued, closed range\n let startLine = -1\n let startChar = -1\n let endLine = -1\n let endChar = -1\n\n // Form proper range from minimum to maximum over multiple lines\n tokens.forEach(token => {\n if (startLine > token.startLine || startLine === -1) {\n startLine = token.startLine\n startChar = token.startChar\n }\n if (endLine < token.endLine || endLine === -1) {\n endLine = token.endLine\n token.endChar\n }\n\n if (token.startLine === startLine && startChar > token.startChar) {\n startChar = token.startChar\n }\n if (token.endLine === endLine && endChar < token.endChar) {\n endChar = token.endChar\n }\n })\n\n // Return the range\n return {\n startLine: startLine,\n endLine: endLine,\n startChar: startChar,\n endChar: endChar\n }\n }\n\n /** Compute symbol range from array of given concrete tokens. Will find beginning and end line and char or return -1 if no tokens were given */\n computeSymbolRangeFromConcreteTokens(\n tokens: ConcreteToken[]\n ): { startLine: number; startChar: number; endLine: number; endChar: number } {\n // Concrete tokens are backed by lexical tokens which can be used to trace their exact location\n let lexicalTokens = flatten(tokens.map(t => t.lts))\n return this.computeSymbolRangeFromLexicalTokens(lexicalTokens)\n }\n}\n","//\n// SymbolTable.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Supernova. All rights reserved.\n//\n\nimport { SyntaxNode } from '../syntax/nodes/SyntaxNode'\nimport { ConcreteToken } from '../Tokenization/Concrete/ConcreteToken'\nimport { LexicalToken } from '../Tokenization/Lexical/LexicalToken'\nimport { Symbol } from './Symbol'\nimport { SymbolFactory } from './SymbolFactory'\nimport { SymbolType } from './SymbolType'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Symbol Table Definition\n\nexport class PLSymbolTable {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n private symbolFactory: SymbolFactory\n readonly symbols: Map<string, Symbol>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(source: string) {\n this.symbols = new Map<string, Symbol>()\n this.symbolFactory = new SymbolFactory(source)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Symbol creation\n\n emitSymbolFromLexicalToken(token: LexicalToken): Symbol {\n let symbol = this.symbolFactory.lexicalSymbolFromToken(token)\n token.debugSymbol = symbol.identifier\n return this.storeSymbol(symbol)\n }\n\n emitSymbolFromConcreteToken(token: ConcreteToken): Symbol {\n let symbol = this.symbolFactory.concreteSymbolFromToken(token)\n token.debugSymbol = symbol.identifier\n return this.storeSymbol(symbol)\n }\n\n emitSymbolFromSyntaxNode(node: SyntaxNode): Symbol {\n let symbol = this.symbolFactory.syntaxSymbolFromNode(node)\n node.debugSymbol = symbol.identifier\n return this.storeSymbol(symbol)\n }\n\n private storeSymbol(symbol: Symbol): Symbol {\n this.symbols.set(symbol.identifier, symbol)\n return symbol\n }\n\n setExecutedSource(source: string) {\n this.symbolFactory.setSource(source)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Symbol lookup\n\n lexicalPhaseSymbols(): Array<Symbol> {\n return Array.from(this.symbols.values()).filter(symbol => symbol.type === SymbolType.lexicalToken)\n }\n\n lexicalPhaseSymbolsSortedByLocation(): Array<Symbol> {\n return this.symbolArraySortedByLocation(this.lexicalPhaseSymbols())\n }\n\n concretePhaseSymbols(): Array<Symbol> {\n return Array.from(this.symbols.values()).filter(symbol => symbol.type === SymbolType.concreteToken)\n }\n\n concretePhaseSymbolSortedByLocation(): Array<Symbol> {\n return this.symbolArraySortedByLocation(this.concretePhaseSymbols())\n }\n\n syntaxPhaseSymbols(): Array<Symbol> {\n return Array.from(this.symbols.values()).filter(symbol => symbol.type === SymbolType.syntaxToken)\n }\n\n syntaxPhaseSymbolSortedByLocation(): Array<Symbol> {\n return this.symbolArraySortedByLocation(this.syntaxPhaseSymbols())\n }\n\n symbolById(symbolId: string): Symbol | null {\n return this.symbols.get(symbolId)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n symbolArraySortedByLocation(symbols: Array<Symbol>): Array<Symbol> {\n symbols.sort((a, b) => {\n return a.startLine !== b.startLine ? a.startLine - b.startLine : a.startChar - b.startChar\n })\n return symbols\n }\n}\n","//\n// SymbolType.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2021 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Symbol Type Definiton\n\nexport enum SymbolType {\n lexicalToken = 'lt',\n concreteToken = 'ct',\n syntaxToken = 'st'\n}\n","//\n// SyntaxParser.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLParserSyntaxError } from '../../debugger/DebuggerErrors'\nimport { PLExecutionContext } from '../../interpreter/ExecutionContext'\nimport { ConcreteBuffer } from '../Tokenization/Concrete/ConcreteBuffer'\nimport { ConcreteTokenType } from './../Tokenization/Concrete/ConcreteToken'\nimport { NodeType, SyntaxNode } from './nodes/SyntaxNode'\nimport { SyntaxNodeFlow } from './nodes/SyntaxNodeFlow'\nimport { SyntaxNodeSubstitution } from './nodes/SyntaxNodeSubstitution'\nimport { SyntaxNodeText } from './nodes/SyntaxNodeText'\nimport { SyntaxTree } from './SyntaxTree'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Syntax Parser Definition\n\nexport class SyntaxParser {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n readonly tokens: ConcreteBuffer\n executionContext: PLExecutionContext\n openedFlowNodes: Array<SyntaxNodeFlow>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(tokens: ConcreteBuffer, executionContext: PLExecutionContext) {\n this.tokens = tokens\n this.executionContext = executionContext\n this.openedFlowNodes = []\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Parsing\n\n parse(): SyntaxTree {\n try {\n // Process copy of buffer into syntax tree or throw error when blueprint syntax is incorrect\n let concreteBuffer = this.tokens.shallowCopy()\n let syntaxTree = this.parseTokens(concreteBuffer)\n return syntaxTree\n } catch (error) {\n throw error\n }\n }\n\n parseTokens(tokens: ConcreteBuffer): SyntaxTree {\n // Construct syntax tree from the provided tokens\n // Create initial empty syntax tree\n let syntaxTree = new SyntaxTree()\n\n // Iterate until the token buffer is empty\n let token = tokens.removeFirst()\n while (token !== null) {\n try {\n let parsedNode: SyntaxNode | null = null\n\n // Process each token type separately\n switch (token.type) {\n case ConcreteTokenType.text:\n // Create simple text node\n parsedNode = new SyntaxNodeText(token.associatedValue, [token])\n break\n case ConcreteTokenType.substitution:\n // Create simple substitution node\n parsedNode = new SyntaxNodeSubstitution(token.associatedValue, this.executionContext, [token])\n break\n case ConcreteTokenType.flow:\n // Two situations are handled simultaneously:\n // - Simple flows with beginning and end\n // - Chained flows with beginning and end that can contain multiple flow definitions in succession\n // Create the flow which contains all tokens until the next flow that chains to it or flow end which interrupts the chain immediately\n let currentFlowNode = new SyntaxNodeFlow(\n token.associatedValue,\n token.lineOffset,\n token.firstLineDirective,\n null,\n this.executionContext,\n [token]\n )\n\n // Link this node to parent node, so proper identifier chain\n let lastChainableFlowNode =\n this.openedFlowNodes.length > 0 ? this.openedFlowNodes[this.openedFlowNodes.length - 1] : null\n currentFlowNode.setParent(lastChainableFlowNode)\n\n // In case flow node was already opened - we test whether it is chained or not chained case\n if (lastChainableFlowNode !== null) {\n let chainsTo = lastChainableFlowNode.flow.chainableFlows()\n if (chainsTo !== null && chainsTo.includes(currentFlowNode.flow.keyword())) {\n // New flow chains with the old one, so it will become a new node storage\n this.openedFlowNodes.pop()\n lastChainableFlowNode.setLinksToFlow(currentFlowNode)\n } else {\n // New flow doesn't chain with the old one so it is child of the current one\n // Do nothing\n }\n } else {\n // Flow is the first in the stack so it will become a new node storage\n // Do nothing\n }\n\n // Store flow node so it is written to current level as well\n parsedNode = currentFlowNode\n break\n case ConcreteTokenType.flowEnd:\n // Each flow end tag decreases parent level\n if (this.openedFlowNodes.length > 0) {\n this.openedFlowNodes.pop()\n } else {\n // If parent level is already at 0, enclosing tag is extraneous\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.enclosingFlowTagPrecedingFlowDefinition\n }\n break\n }\n\n // If parsed node was created (anything other than flow end fow now) add it to buffer\n if (parsedNode !== null) {\n // Always add to the last opened flow, unless none, in which case we add to the root group\n let openedFlowNode = this.lastOpenedChainNode()\n if (openedFlowNode !== null) {\n openedFlowNode.flowGroup.add(parsedNode)\n } else {\n syntaxTree.rootNode.add(parsedNode)\n }\n }\n\n // If parsed node was a flow, add it to buffer of opened flow nodes\n if (parsedNode !== null && parsedNode.nodeType === NodeType.flow) {\n this.openedFlowNodes.push(parsedNode as SyntaxNodeFlow)\n }\n\n // Emit symbols for valid notes if debugger is present\n if (parsedNode !== null) {\n this.executionContext.debugger.symbolTable.emitSymbolFromSyntaxNode(parsedNode)\n }\n } catch (error) {\n throw error\n }\n\n token = tokens.removeFirst()\n }\n\n // Unclosed flow\n if (this.openedFlowNodes.length > 0) {\n throw this.executionContext.debugger.reportAnalysisErrorFromSyntaxNode(\n PLParserSyntaxError.missingEnclosingFlowTag,\n this.openedFlowNodes[0]\n )\n }\n\n return syntaxTree\n }\n\n lastOpenedChainNode(): SyntaxNodeFlow | null {\n return this.openedFlowNodes.length > 0 ? this.openedFlowNodes[this.openedFlowNodes.length - 1] : null\n }\n}\n","//\n// SyntaxTree.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { SyntaxNodeGroup } from './nodes/SyntaxNodeGroup'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Syntax Tree Definition\n\nexport class SyntaxTree {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n rootNode: SyntaxNodeGroup\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(rootNode?: SyntaxNodeGroup) {\n this.rootNode = rootNode ?? new SyntaxNodeGroup([], 0, [])\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Debug\n\n debugDescription(): string {\n return `\n Syntax Tree:\n ${this.rootNode.debugDescription()}\n `\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Equality\n\n public equals(obj: SyntaxTree): boolean {\n return this.rootNode === obj.rootNode\n }\n}\n","//\n// SyntaxNode.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLExecutionContext } from '../../../interpreter/ExecutionContext'\nimport { ConcreteToken } from '../../Tokenization/Concrete/ConcreteToken'\nimport { PLInterpreterContext } from './../../../interpreter/InterpreterContext'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport enum NodeType {\n text,\n flow,\n substitution,\n group\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Syntax Node Definition\n\nexport abstract class SyntaxNode {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n nodeType: NodeType\n backingTokens: Array<ConcreteToken>\n debugSymbol: string | null\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Methods\n\n // Used to render the syntax node\n abstract interpret(context: PLInterpreterContext, executionContext: PLExecutionContext): Promise<string>\n\n // Debug description\n abstract debugDescription(): string\n}\n","//\n// SyntaxNodeFlow.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { v4 as uuid } from 'uuid'\nimport { PLExecutionContext } from '../../../interpreter/ExecutionContext'\nimport { PLFlow } from '../../../interpreter/flows/Flow'\nimport { PLFlowSource } from '../../../interpreter/flows/FlowSource'\nimport { ConcreteToken } from '../../Tokenization/Concrete/ConcreteToken'\nimport { PLFlowFormatRequirement, PLFlowFormatType } from './../../../interpreter/flows/Flow'\nimport { PLFlowOutput } from './../../../interpreter/flows/FlowOutput'\nimport { PLInterpreterContext } from './../../../interpreter/InterpreterContext'\nimport { StringUtils } from './../../../utils/StringUtils'\nimport { NodeType, SyntaxNode } from './SyntaxNode'\nimport { SyntaxNodeGroup } from './SyntaxNodeGroup'\nimport { SyntaxNodeSubstitution } from './SyntaxNodeSubstitution'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Syntax Node Definitions\n\nexport class SyntaxNodeFlow implements SyntaxNode {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n nodeType: NodeType\n backingTokens: Array<ConcreteToken>\n debugSymbol: string | null\n\n flowGroup: SyntaxNodeGroup\n flowIdentifier: string\n directive: string\n flow: PLFlow\n\n lineOffset: number\n firstLineDirective: boolean\n\n outputs: Map<string, PLFlowOutput>\n sources: Map<string, PLFlowSource>\n keywords: Map<string, boolean>\n\n previousChainFlow?: SyntaxNodeFlow = null\n nextChainFlow?: SyntaxNodeFlow = null\n parent?: SyntaxNodeFlow = null\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(\n directive: string,\n lineOffset: number,\n firstLineDirective: boolean,\n flowGroup: SyntaxNodeGroup | null = null,\n executionContext: PLExecutionContext,\n from: Array<ConcreteToken>\n ) {\n this.nodeType = NodeType.flow\n this.backingTokens = from\n this.debugSymbol = null\n\n this.directive = directive\n this.flowGroup = flowGroup ?? new SyntaxNodeGroup([], 0, [])\n this.flowIdentifier = uuid()\n\n this.lineOffset = lineOffset\n this.firstLineDirective = firstLineDirective\n\n // The flow definition is as follows: [keyword] [keyword]..\n // Flow largely varies based on the node - if, for etc.\n // Flow needs to have at least 2 keywords\n // Due to way the flows are built, they can have any arbitrary structure\n try {\n let components = StringUtils.splitIgnoringQuotedContent(\n StringUtils.withoutSpacesInsideRoundBrackets(StringUtils.trimmed(directive)),\n ' '\n )\n let flowKeyword = components[0] ?? null\n if (flowKeyword == null) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.missingFlowKeyword\n throw Error('missingFlowKeyword')\n }\n\n // Find flow where the components strictly match the flow definition.\n let flow = executionContext.flow(flowKeyword)\n if (!flow) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.unknownFlow(flowKeyword)\n throw Error('missingFlowKeyword')\n }\n\n // Validate the format of the flow\n // While doing that, extract arguments and prepared the named buffer\n // Flow must match the required part (which comes first) but the optional part can be ommited so the size is dynamic\n let requiredParts = flow.flowFormat().filter(format => {\n return format.requirement === PLFlowFormatRequirement.required\n })\n // Not used currently\n /*\n let optionalParts = flow.flowFormat().filter(format => {\n format.requirement === PLFlowFormatRequirement.optional\n })*/\n\n // Test whether required and optional parts follow one another\n let foundOptional = false\n for (let part of flow.flowFormat()) {\n if (part.requirement === PLFlowFormatRequirement.required) {\n if (foundOptional) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.flowRequiredPartMustPrecedeOptional(flowKeyword)\n throw Error('flowRequiredPartMustPrecedeOptional')\n }\n } else if (part.requirement === PLFlowFormatRequirement.optional) {\n foundOptional = true\n }\n }\n\n // Test required parts\n for (let [index, part] of requiredParts.entries()) {\n switch (part.type) {\n case PLFlowFormatType.keyword:\n if (index >= components.length) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.flowKeywordMissing(flowKeyword, keyword)\n throw Error('flowKeywordMissing')\n }\n if (components[index] !== part.definition) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.flowKeywordMissing(flowKeyword, keyword)\n throw Error('flowKeywordMissing')\n }\n break\n case PLFlowFormatType.output:\n case PLFlowFormatType.source:\n if (index >= components.length) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.flowArgumentEmpty(flowKeyword, index + 1)\n throw Error('flowArgumentEmpty')\n }\n break\n }\n }\n\n // No need to test optional parts for now (but maybe later)\n // Build sources, outputs and keywords\n let outputs: Map<string, PLFlowOutput> = new Map<string, PLFlowOutput>()\n let sources: Map<string, PLFlowSource> = new Map<string, PLFlowSource>()\n let keywords: Map<string, boolean> = new Map<string, boolean>()\n\n for (let [index, formatPiece] of flow.flowFormat().entries()) {\n switch (formatPiece.type) {\n case PLFlowFormatType.output:\n // case .output(let key):\n // Parse output, property identified by string to which values are stored. Output is not parsed and expected to be string\n // Only parse output if it is required (always present) or optional and there is enough arguments to feed it\n let parseOutput: boolean = true\n if (formatPiece.requirement === PLFlowFormatRequirement.optional && components.length <= index) {\n parseOutput = false\n }\n\n if (parseOutput) {\n let output = new PLFlowOutput(components[index])\n outputs.set(formatPiece.definition, output)\n }\n break\n case PLFlowFormatType.source:\n // Parse source, substitution-like string that transforms one value to another value\n // Only parse source if it is required (always present) or optional and there is enough arguments to feed it\n let parseSource: boolean = true\n if (formatPiece.requirement === PLFlowFormatRequirement.optional && components.length <= index) {\n parseSource = false\n }\n\n if (parseSource) {\n // TODO: Emit additional symbol information to symbol table to make the errors more preccise\n let substitutionNode = new SyntaxNodeSubstitution(components[index], executionContext, this.backingTokens)\n let source = new PLFlowSource(substitutionNode)\n sources.set(formatPiece.definition, source)\n }\n break\n case PLFlowFormatType.keyword:\n // Add keyword definition to output for cases\n keywords.set(formatPiece.definition, index < components.length)\n }\n }\n\n // Store everything\n this.outputs = outputs\n this.sources = sources\n this.keywords = keywords\n this.flow = flow\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Linking\n\n setLinksToFlow(node: SyntaxNodeFlow) {\n this.nextChainFlow = node\n node.previousChainFlow = this\n }\n\n unlinkPreviousChainedFlow() {\n this.previousChainFlow = null\n }\n\n unlinkNextChainedFlow() {\n this.nextChainFlow = null\n }\n\n setParent(node: SyntaxNodeFlow | null) {\n this.parent = node\n }\n\n flowStackIdentifier(): Array<string> {\n let identifiers: Array<string> = [this.flowIdentifier]\n let parent = this.parent\n\n while (parent) {\n identifiers.splice(0, 0, parent.flowIdentifier)\n parent = parent.parent\n }\n\n return identifiers\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Debug\n\n debugDescription(): string {\n return `\n Flow Node: ${this.directive}\n Group: ${this.flowGroup.debugDescription()}\n `\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Equality\n\n public equals(obj: SyntaxNodeFlow): boolean {\n return this.directive === obj.directive && this.flowGroup === obj.flowGroup\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Rendering\n\n async interpret(_context: PLInterpreterContext, _executionContext: PLExecutionContext): Promise<string> {\n // TODO: Rewrite\n throw Error(\"Flow can't interpret directly\")\n }\n}\n","//\n// SyntaxNodeComplex.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { SyntaxNode } from './SyntaxNode'\nimport { NodeType } from './SyntaxNode'\nimport { PLExecutionContext } from '../../../interpreter/ExecutionContext'\nimport { PLInterpreterContext } from './../../../interpreter/InterpreterContext'\nimport { ConcreteToken } from '../../Tokenization/Concrete/ConcreteToken'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Syntax Node Definitions\n\nexport class SyntaxNodeGroup implements SyntaxNode {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n nodeType: NodeType\n debugSymbol: string | null\n backingTokens: Array<ConcreteToken>\n\n nodes: Array<SyntaxNode>\n depth: number\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutations\n\n constructor(nodes: Array<SyntaxNode>, depth: number = 0, from: Array<ConcreteToken>) {\n this.nodeType = NodeType.group\n this.backingTokens = from\n this.debugSymbol = null\n\n this.nodes = nodes\n this.depth = depth\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Mutations\n\n add(node: SyntaxNode) {\n this.nodes.push(node)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Debug\n\n debugDescription(): string {\n return `\n Group Node, size: ${this.nodes.length}, depth: ${this.depth}\n Subnodes: [\n ${this.nodes\n .map(value => {\n return ` - ${value.debugDescription()}`\n })\n .join('\\n')}\n ]\n `\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Equality\n\n public equals(obj: SyntaxNodeGroup): boolean {\n // Test the depth and size of the group\n if (this.nodes.length !== obj.nodes.length) {\n return false\n }\n\n // Test each element against its counterpart, separately. Probably not the most optimal way\n // but the method should not really be used anywhere else then tests, also the group size is usually rather small\n for (let [index, lnode] of this.nodes.entries()) {\n let rnode = obj.nodes[index]\n if (lnode.nodeType === NodeType.text && rnode.nodeType === NodeType.text && lnode === rnode) {\n continue\n } else if (\n lnode.nodeType === NodeType.substitution &&\n rnode.nodeType === NodeType.substitution &&\n lnode === rnode\n ) {\n continue\n } else if (lnode.nodeType === NodeType.flow && rnode.nodeType === NodeType.flow && lnode === rnode) {\n continue\n } else if (lnode.nodeType === NodeType.group && rnode.nodeType === NodeType.group && lnode === rnode) {\n continue\n }\n\n return false\n }\n // TODO: Rewrite\n\n return true\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Rendering\n\n async interpret(_context: PLInterpreterContext, _executionContext: PLExecutionContext): Promise<string> {\n throw \"Group can't interpret directly\"\n }\n}\n","//\n// SyntaxNodeSubstitution.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { NodeType, SyntaxNode } from './SyntaxNode'\nimport { PLFunction } from '../../../interpreter/functions/Function'\nimport { PLExecutionContext } from '../../../interpreter/ExecutionContext'\nimport { PLTransformer } from './../../../interpreter/transformers/Transformer'\nimport { StringUtils } from './../../../utils/StringUtils'\nimport { PLInterpreterContext } from './../../../interpreter/InterpreterContext'\nimport { ConcreteToken } from '../../Tokenization/Concrete/ConcreteToken'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Syntax Node Definitions\n\nexport class SyntaxNodeSubstitution implements SyntaxNode {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n nodeType: NodeType\n backingTokens: Array<ConcreteToken>\n debugSymbol: string | null\n\n customDataSource: { function: PLFunction; directive: string } | null\n transformers: Array<{ transformer: PLTransformer; directive: string }>\n directive: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(directive: string, executionContext: PLExecutionContext, from: Array<ConcreteToken>) {\n this.nodeType = NodeType.substitution\n this.backingTokens = from\n this.debugSymbol = null\n\n this.directive = directive\n\n // The substitution definition is as follows: [value].[:optional transformer(..)].[:optional transformer(..)]..\n // Some examples (for data of: [name: \"Anna\"]:\n // - plain substitution: {{ name }} -> \"Anna\"\n // - mutated substitution, no arguments: {{ name.uppercased() }} -> \"ANNA\"\n // - mutated substitution, arguments: {{ name.extended(\"_\", \"\") }} -> \"_Anna\"\n // - chained mutated substitution, arguments: {{ name.uppercased().extended(\"_\", \"\") }} -> \"_ANNA\"\n //\n // Optionally, substitution can also start with function invocation, providing data from different source than context.\n // Data from function get converted into context when invoked.\n // Function invocations have to start with @ and functions can only be at the beginning of substitution directive\n // Function invocations can be defined with dots, to specify package they come from.\n // - plain function invocation: {{ @fn.randomString() }}\n // - mutated function invocation: {{ @fn.randomString().uppercased() }}\n // - mutated function invocation, arguments: {{ @fn.randomString(this.value).uppercased() }}\n // - chained mutated substitution, arguments, using another function invocation inside arguments: {{ @fn.sort(@fn.generateInts(), \"Stuff\").sort().from(@fn.randomInt(2)) }}\n try {\n // Check whether substitution starts with @. If so, we find the definition for function that will give us the data. Function word is all until first (\n let workingDirective = StringUtils.trimmed(directive)\n let hasCustomDataSource = false\n\n if (workingDirective.startsWith('@')) {\n // Directive starts with prefix, drop prefix, find the function name\n workingDirective = workingDirective.substr(1)\n let keyword = StringUtils.substringUntilDelimiter(workingDirective, '(')\n if (keyword === null) {\n // Function must always be invoked using ()\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.functionMustBeCalled\n throw Error('functionMustBeCalled')\n }\n // It is a keyword, test if there is function for such keyword\n let func = executionContext.function(keyword)\n if (func === null) {\n // TODO: Rework\n // throw PulsarLangErrors.SyntaxError.unknownFunction(keyword)\n throw Error('unknownFunction ' + keyword)\n }\n\n // Parse its argument\n let argument = StringUtils.argumentStringBetweenBracketsFirstOccurance(workingDirective, keyword)\n\n // Remove the entire function definition from the directive to continue the parsing without bothering\n // Drops argument size, keyword size and opening and closing bracket\n workingDirective = workingDirective.substr(argument.length + keyword.length + 2)\n\n // Store the function that will serve as data source\n this.customDataSource = {\n function: func,\n directive: argument\n }\n hasCustomDataSource = true\n } else {\n // No function at the beginning\n this.customDataSource = null\n }\n\n // Remove extraneous dot, if any, and validate that it continues with dot\n if (hasCustomDataSource && workingDirective.length > 0) {\n if (workingDirective.startsWith('.')) {\n workingDirective = workingDirective.substring(1)\n } else {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.dotNotationAfterFunctionInvocationExpected(this.customDataSource!.function.keyword)\n throw Error('dotNotationAfterFunctionInvocationExpected')\n }\n }\n\n // Parse the definition and build the list of transformers, if any\n let components = StringUtils.splitIgnoringQuotedBracketedContent(workingDirective, '.')\n\n // Components are only required if we don't have custom data source, as custom data source alone is enough\n if (components.length === 0 && !hasCustomDataSource) {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.missingSubstitutionValue\n throw Error('missingSubstitutionValue')\n }\n\n let transformerStack: Array<{\n transformer: PLTransformer\n directive: string\n }> = []\n for (let component of components) {\n // Get potential transformer keyword\n let keyword = StringUtils.substringUntilDelimiter(component, '(')\n if (keyword !== null) {\n // It is a keyword, test if there is transformer for such keyword\n let transformer = executionContext.transformer(keyword)\n if (transformer !== null) {\n if (transformer.keyword() == 'value') {\n // Specifically for value transformer treat is as root as it breaks the root chain\n transformer = executionContext.valueAlwaysRootTransformer()\n }\n let argument = StringUtils.argumentStringBetweenBrackets(component, keyword)\n transformerStack.push({\n transformer: transformer,\n directive: argument\n })\n } else {\n // Transformer not found\n // throw PulsarLangErrors.SyntaxError.unknownTransformer(keyword)\n // TODO: Rewrite\n throw Error(`unknown transformer ${keyword}`)\n }\n } else {\n // It is not a keyword but key instead, use value() transformer\n let valueTransformer = executionContext.valueTransformer()\n transformerStack.push({\n transformer: valueTransformer,\n directive: component\n })\n }\n }\n\n // First transformers needs to be of value type unless custom data source is provided. At this point, there is always transformer\n if (!hasCustomDataSource) {\n let transformer = transformerStack.length > 0 ? transformerStack[0] : null\n if (transformer === null || transformer.transformer.keyword() !== 'value') {\n // TODO: Rewrite\n // throw PulsarLangErrors.SyntaxError.substitutionMustNotStartWithTransformer(transfomer.keyword)\n throw Error('substitutionMustNotStartWithTransformer')\n }\n }\n\n this.transformers = transformerStack\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Transformation\n\n async modifyInputValue(context: PLInterpreterContext, executionContext: PLExecutionContext): Promise<any> {\n try {\n // If function is provided, execute the function\n let data: any | null = null\n if (this.customDataSource !== null) {\n let func = this.customDataSource.function\n let directive = this.customDataSource.directive\n\n data = await func.provideValueUsingArgumentString(directive, context, executionContext)\n } else {\n // Fetch the value from the current context because function wasn't provided\n data = context.data\n }\n\n // Mutate the value with transformers one by one. Note that transformer is root if it is the first one in the chain - usually used to retrieve data.\n // This is important to know down the road, because some functionality can only be invoked using the root transformer, such as direct access to variable context\n for (let [index, transformerEntry] of this.transformers.entries()) {\n data = await transformerEntry.transformer.transformValueUsingArgumentString(\n data,\n transformerEntry.directive,\n context,\n executionContext,\n index === 0\n )\n }\n\n return data\n } catch (error) {\n throw error\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Debug\n\n debugDescription(): string {\n return `Directive ${this.directive}, applied transformers: ${JSON.stringify(this.transformers)}`\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Equality\n\n public equals(obj: SyntaxNodeSubstitution): boolean {\n return this.directive === obj.directive\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Rendering\n\n async interpret(context: PLInterpreterContext, executionContext: PLExecutionContext): Promise<string> {\n try {\n // Update the value from the context\n let dynamicValue = await this.modifyInputValue(context, executionContext)\n\n // Return value only if it is a string or number (in which case it gets translated to string). If it results in something else, throw error\n if (typeof dynamicValue === 'string') {\n return dynamicValue\n } else if (typeof dynamicValue === 'number') {\n return dynamicValue.toString()\n }\n\n //TODO: proper fix for empty body\n if (dynamicValue === null && this.directive === '#body') {\n return ''\n }\n\n // TODO: Rewrite\n // throw PulsarLangErrors.InterpreterError.substitutionOutputNotString(\"\")\n throw Error('substitutionOutputNotString: ' + dynamicValue)\n } catch (error) {\n throw error\n }\n }\n\n // Specific for substitution node\n async interpretValue(context: PLInterpreterContext, executionContext: PLExecutionContext): Promise<any> {\n try {\n // Return value no matter what it is\n let dynamicValue = await this.modifyInputValue(context, executionContext)\n return dynamicValue\n } catch (error) {\n throw error\n }\n }\n}\n","//\n// SyntaxNodeText.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\nimport { SyntaxNode } from './SyntaxNode'\nimport { NodeType } from './SyntaxNode'\nimport { PLExecutionContext } from '../../../interpreter/ExecutionContext'\nimport { PLInterpreterContext } from './../../../interpreter/InterpreterContext'\nimport { ConcreteToken } from '../../Tokenization/Concrete/ConcreteToken'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Syntax Node Definitions\n\nexport class SyntaxNodeText implements SyntaxNode {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n nodeType: NodeType\n backingTokens: Array<ConcreteToken>\n debugSymbol: string | null\n\n text: string\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(text: string, from: Array<ConcreteToken>) {\n this.nodeType = NodeType.text\n this.backingTokens = from\n this.debugSymbol = null\n\n this.text = text\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Debug\n\n debugDescription(): string {\n return `Text Node: \\\"${this.text}\\\"`\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Equality\n\n public equals(obj: SyntaxNodeText): boolean {\n return this.text === obj.text\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Rendering\n\n async interpret(_context: PLInterpreterContext, _executionContext: PLExecutionContext): Promise<string> {\n return this.text\n }\n}\n","//\n// PLAutocompleteEngine.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLDoc } from './../documentation/Doc'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definition\n\nexport enum PLAutocompleteEngineSuggestionType {\n method = 'method',\n transformer = 'transformer',\n snippet = 'snippet',\n variable = 'variable'\n}\n\nexport type PLAutocompleteEngineSuggestion = {\n /// Type of suggestion - functions, keywords, variables etc.\n type: PLAutocompleteEngineSuggestionType\n\n /// User input based on which suggestion is generated\n inputString: string\n\n /// Documentation object containing all textual information for user\n documentationObject: PLDoc\n\n /// Suggestion string that will be used to replace user input if use commits the action\n suggestionString: string\n\n /// Declaration string that will be used to document declaration if needed\n declarationString: string | null\n\n /// Ranges of characters that constributed to the suggestion\n ranges: Array<{\n location: number\n length: number\n }>\n\n /// Calculated weight of the suggestion based on the longest subrange\n weight: number\n\n /// Location for the caret\n caretLocation: number | null\n}\n\nexport type PLAutocompleteEngineApplicationResult = {\n /// Type of suggestion - functions, keywords, variables etc.\n resultingString: string\n\n /// Selection\n proposedSelectionLocation: number\n proposedSelectionLength: number\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Autocomplete Engine\n\nexport class PLAutocompleteEngine {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Suggestions\n\n suggestNextBasedOnString(\n _string: String,\n _selectionLocation: number,\n _selectionLength: number\n ): Array<PLAutocompleteEngineSuggestion> {\n // Suggestion engine can be used without any implementation to provide static suggestions based on keyword search only\n return []\n }\n\n suggestedStringUntilSelection(string: String, selectionLocation: number, _selectionLength: number): string {\n return string.substring(0, selectionLocation)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Autocomplete application\n\n applySuggestion(\n suggestion: PLAutocompleteEngineSuggestion,\n string: String,\n selectionLocation: number,\n _selectionLength: number,\n _decoderAddition: number\n ): PLAutocompleteEngineApplicationResult {\n // Split string by selection\n let stringUntilSelection = string.substring(0, selectionLocation)\n let stringAfterSelection = string.substr(selectionLocation, string.length - selectionLocation)\n\n // Finish the autocompleted part by removing the part that overlaps with autocomplete result\n stringUntilSelection = stringUntilSelection.substr(0, selectionLocation - suggestion.inputString.length)\n stringUntilSelection += suggestion.suggestionString\n\n let finalString = `${stringUntilSelection}${stringAfterSelection}`\n return {\n resultingString: finalString,\n proposedSelectionLocation: stringUntilSelection.length,\n proposedSelectionLength: 0\n }\n }\n}\n","//\n// PLBlueprintAutocompleteEngine.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLDeclarationBuilder } from './../documentation/DeclarationBuilder'\nimport {\n PLAutocompleteEngine,\n PLAutocompleteEngineSuggestion,\n PLAutocompleteEngineSuggestionType\n} from './AutocompleteEngine'\nimport { PLAutocompleteBlueprintSnippet } from './BlueprintSnippets'\nimport { PLExecutionContext } from './../../interpreter/ExecutionContext'\nimport { PLTransformer } from './../../interpreter/transformers/Transformer'\nimport { PLFunction } from './../../interpreter/functions/Function'\nimport { PLVariable } from './../../interpreter/variables/Variable'\nimport { PLDoc } from '../documentation/Doc'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport enum PLBlueprintAutocompleteEngineControlCharacter {\n substitutionOpen = '{{',\n substitutionClose = '}}',\n flowOpening = '{[',\n flowClosing = '/]}',\n commentOpen = '/*',\n commentClose = '*/',\n quote = '\"',\n none = 'none'\n}\n\ntype PLAEUsableVariablePack = {\n variable: PLVariable\n ranges: Array<{\n location: number\n length: number\n }>\n weight: number\n}\n\ntype PLAEUsableFunctionPack = {\n function: PLFunction\n ranges: Array<{\n location: number\n length: number\n }>\n weight: number\n}\n\ntype PLAEUsableTransformerPack = {\n transformer: PLTransformer\n ranges: Array<{\n location: number\n length: number\n }>\n weight: number\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLBlueprintAutocompleteEngine extends PLAutocompleteEngine {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n executionContext: PLExecutionContext\n snippets: Array<PLAutocompleteBlueprintSnippet>\n includePlaceholders: boolean\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(executionContext: PLExecutionContext, includePlaceholders: boolean = false) {\n super()\n this.executionContext = executionContext\n this.snippets = new Array<PLAutocompleteBlueprintSnippet>()\n this.includePlaceholders = includePlaceholders\n }\n\n update(executionContext: PLExecutionContext) {\n this.executionContext = executionContext\n }\n\n loadSnippets(snippets: Array<PLAutocompleteBlueprintSnippet>) {\n this.snippets = this.snippets.concat(snippets)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Suggestions\n\n suggestNextBasedOnString(\n string: string,\n selectionLocation: number,\n selectionLength: number\n ): Array<PLAutocompleteEngineSuggestion> {\n // Extract selection: last line: keyword\n let stringUntilSelection = this.suggestedStringUntilSelection(string, selectionLocation, selectionLength)\n let lastLine = this.lastLineOfString(stringUntilSelection)\n\n // Figure out which context we are exploring\n let contextControlChar = this.seekLastControlCharacterOfString(lastLine)\n\n // Build suggestion pool and retrieve it\n return this.suggestionsForString(lastLine, contextControlChar)\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Suggestion pool construction\n\n private suggestionsForString(\n codeLine: string,\n context: PLBlueprintAutocompleteEngineControlCharacter\n ): Array<PLAutocompleteEngineSuggestion> {\n let suggestions: Array<PLAutocompleteEngineSuggestion> = new Array<PLAutocompleteEngineSuggestion>()\n\n // Suggestions differ based on last opened context\n switch (context) {\n case PLBlueprintAutocompleteEngineControlCharacter.substitutionOpen:\n case PLBlueprintAutocompleteEngineControlCharacter.flowOpening:\n // Fuctions start with @, variables must be preceeded with space but can follow bracket, transformers always follow\n let fnKeyword = this.lastWordOfString(codeLine, ['@'])\n let variableKeyword = this.lastWordOfString(codeLine, [' ', '('])\n let transformerKeyword = this.lastWordOfString(codeLine, ['.'])\n\n // Context in substitution and flows - variables, functions and transformers are available\n suggestions = suggestions.concat(this.variableSuggestionsContainingKeyword(variableKeyword))\n suggestions = suggestions.concat(this.functionSuggestionsContainingKeyword(fnKeyword))\n suggestions = suggestions.concat(this.transformerSuggestionsContainingKeyword(transformerKeyword))\n break\n // Note: This is to be improved later, we need to understand where we are in the context better, but more infrastructure for parser must be built before that (basically, not failable parser able to parse and expect what is going to be ahead)\n case PLBlueprintAutocompleteEngineControlCharacter.flowClosing:\n // There can't be anything after closing flow and no autocomplete will show\n break\n case PLBlueprintAutocompleteEngineControlCharacter.commentOpen:\n // Opened comment means raw string and no autocomplete will show\n break\n case PLBlueprintAutocompleteEngineControlCharacter.quote:\n // Opened quote means raw string and no autocomplete will show\n break\n case PLBlueprintAutocompleteEngineControlCharacter.commentClose:\n case PLBlueprintAutocompleteEngineControlCharacter.substitutionClose:\n case PLBlueprintAutocompleteEngineControlCharacter.none:\n // Plain context, so only snippets are available\n let snippetKeyword = this.lastWordOfString(codeLine, [' '])\n suggestions = suggestions.concat(this.snippetSuggestionsContainingKeyword(snippetKeyword))\n break\n }\n\n return suggestions\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Suggestion construction\n\n private variableSuggestionsContainingKeyword(subsequence: string): Array<PLAutocompleteEngineSuggestion> {\n // No empty keywords\n if (subsequence.length === 0) {\n return []\n }\n\n // Get all variables that fit the search\n let allVariables = this.executionContext.variableContext.stack\n let usableVariables = new Array<PLAEUsableVariablePack>()\n for (let variable of allVariables) {\n let ranges = this.rangesOfSubsequence(variable.identifier, subsequence)\n if (ranges) {\n let weight = this.longestRangeOfRanges(ranges)\n usableVariables.push({\n variable: variable,\n ranges: ranges,\n weight: weight\n })\n }\n }\n\n // Transform variables to suggestions\n let suggestions = new Array<PLAutocompleteEngineSuggestion>()\n for (let pack of usableVariables) {\n let suggestion = this.convertVariableToSuggestion(pack.variable, subsequence, pack.ranges, pack.weight)\n suggestions.push(suggestion)\n }\n\n // Sort variables by weight\n return this.sortedSuggestions(suggestions)\n }\n\n private transformerSuggestionsContainingKeyword(subsequence: string): Array<PLAutocompleteEngineSuggestion> {\n // No empty keywords\n if (subsequence.length === 0) {\n return []\n }\n\n // Get all variables that fit the search\n let allTransformers = this.executionContext.availableTransformers().values()\n let usableTransformers = new Array<PLAEUsableTransformerPack>()\n for (let transformer of allTransformers) {\n let ranges = this.rangesOfSubsequence(transformer.keyword(), subsequence)\n if (ranges) {\n let weight = this.longestRangeOfRanges(ranges)\n usableTransformers.push({\n transformer: transformer,\n ranges: ranges,\n weight: weight\n })\n }\n }\n\n // Transform variables to suggestions\n let suggestions = new Array<PLAutocompleteEngineSuggestion>()\n for (let pack of usableTransformers) {\n let suggestion = this.convertTransformerToSuggestion(pack.transformer, subsequence, pack.ranges, pack.weight)\n suggestions.push(suggestion)\n }\n\n // Sort variables by weight\n return this.sortedSuggestions(suggestions)\n }\n\n private snippetSuggestionsContainingKeyword(subsequence: string): Array<PLAutocompleteEngineSuggestion> {\n // No empty searches\n if (subsequence.length === 0) {\n return []\n }\n\n // Get all snippets that fit the search. Note that snippets don't use fuzzy search, instead they have to fit precisely\n let usableSnippets = this.snippets.filter(filter => {\n return filter.keyword.startsWith(subsequence)\n })\n\n // Transform snippets to suggestions\n let suggestions = new Array<PLAutocompleteEngineSuggestion>()\n for (let snippet of usableSnippets) {\n let suggestion = this.convertSnippetToSuggestion(snippet, subsequence)\n suggestions.push(suggestion)\n }\n\n // Sort suggestions by weight\n return this.sortedSuggestions(suggestions)\n }\n\n private functionSuggestionsContainingKeyword(subsequence: string): Array<PLAutocompleteEngineSuggestion> {\n // No empty keywords\n if (subsequence.length === 0) {\n return []\n }\n\n // Get all variables that fit the search\n let allFunctions = this.executionContext.availableFunctions().values()\n let usableFunctions = new Array<PLAEUsableFunctionPack>()\n for (let fn of allFunctions) {\n let ranges = this.rangesOfSubsequence(fn.keyword(), subsequence)\n if (ranges) {\n let weight = this.longestRangeOfRanges(ranges)\n usableFunctions.push({\n function: fn,\n ranges: ranges,\n weight: weight\n })\n }\n }\n\n // Transform variables to suggestions\n let suggestions = new Array<PLAutocompleteEngineSuggestion>()\n for (let pack of usableFunctions) {\n let suggestion = this.convertFunctionToSuggestion(pack.function, subsequence, pack.ranges, pack.weight)\n suggestions.push(suggestion)\n }\n\n // Sort variables by weight\n return this.sortedSuggestions(suggestions)\n }\n\n private convertFunctionToSuggestion(\n fn: PLFunction,\n searchKeyword: string,\n ranges: Array<{ location: number; length: number }>,\n weight: number\n ): PLAutocompleteEngineSuggestion {\n let suggestion = PLDeclarationBuilder.snippetDeclarationForFunction(fn, this.includePlaceholders)\n let declaration = PLDeclarationBuilder.documentationDeclarationForFunction(fn)\n let doc = fn.documentation() ?? new PLDoc(fn.keyword(), null, 'No description', null, [])\n return {\n type: PLAutocompleteEngineSuggestionType.method,\n inputString: searchKeyword,\n suggestionString: suggestion,\n ranges: ranges,\n weight: weight,\n caretLocation: null,\n documentationObject: doc,\n declarationString: declaration\n }\n }\n\n private convertTransformerToSuggestion(\n transformer: PLTransformer,\n searchKeyword: string,\n ranges: Array<{ location: number; length: number }>,\n weight: number\n ): PLAutocompleteEngineSuggestion {\n let suggestion = PLDeclarationBuilder.snippetDeclarationForTransformer(transformer, this.includePlaceholders)\n let declaration = PLDeclarationBuilder.documentationDeclarationForTransformer(transformer)\n let doc = transformer.documentation() ?? new PLDoc(transformer.keyword(), null, 'No description', null, [])\n return {\n type: PLAutocompleteEngineSuggestionType.transformer,\n inputString: searchKeyword,\n suggestionString: suggestion,\n ranges: ranges,\n weight: weight,\n caretLocation: null,\n documentationObject: doc,\n declarationString: declaration\n }\n }\n\n private convertVariableToSuggestion(\n variable: PLVariable,\n searchKeyword: string,\n ranges: Array<{ location: number; length: number }>,\n weight: number\n ): PLAutocompleteEngineSuggestion {\n let description: string\n if (variable.isGlobal) {\n description = 'Variable is immutable and available in global scope'\n } else if (variable.isMutable) {\n description = 'Variable is mutable and available in local scope'\n } else {\n description = 'Variable is immutable and available in local scope'\n }\n\n let doc = new PLDoc(variable.identifier, null, description, null, [])\n return {\n type: PLAutocompleteEngineSuggestionType.variable,\n inputString: searchKeyword,\n suggestionString: variable.identifier,\n ranges: ranges,\n weight: weight,\n caretLocation: null,\n documentationObject: doc,\n declarationString: null\n }\n }\n\n private convertSnippetToSuggestion(\n snippet: PLAutocompleteBlueprintSnippet,\n searchKeyword: string\n ): PLAutocompleteEngineSuggestion {\n let doc = new PLDoc(snippet.keyword, null, snippet.description ?? 'No Description', null, [])\n return {\n type: PLAutocompleteEngineSuggestionType.snippet,\n inputString: searchKeyword,\n suggestionString: snippet.content,\n ranges: [],\n weight: snippet.priority,\n caretLocation: snippet.caretPosition,\n documentationObject: doc,\n declarationString: null\n }\n }\n\n private sortedSuggestions(suggestions: Array<PLAutocompleteEngineSuggestion>): Array<PLAutocompleteEngineSuggestion> {\n // Sort suggestions by weight\n return suggestions.sort((s1, s2) => {\n return s1.weight - s2.weight\n })\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Fuzzy search\n\n private rangesOfSubsequence(string: string, subsequence: string): Array<{ location: number; length: number }> | null {\n // Make mutable and both lowercase, as search is case insensitive\n let subsequenceCount = subsequence.length\n var subsequence = subsequence.toLowerCase()\n let baseString = string.toLowerCase()\n\n // Empty string compares are not allowed\n if (baseString.length === 0 || subsequence.length === 0) {\n return []\n }\n\n // Subsequence longer than initial string can't be subsequence in the first place\n if (subsequence.length > string.length) {\n return null\n }\n\n var matchingIndexes: Array<number> = new Array<number>()\n\n // Iterate through all characters of the base string, comparing it one by one with first\n // character of subsequence. Remove first character of subsequence when found\n // If we empty the entire subsequence before we reach end of string, it contains it, otherwise, it does not\n\n // Note this is hardly optimal as we could compare just the characters\n // without recreating the string, but that complicates it slightly due to how\n // swift string works in general and I have no time for it now :)\n // Although, thinking about it, I'd probably code it faster than write this block of comment.\n // So if you find this comment, feel free to make it more optimal or be at peace with it,\n // the purpose of this algorithm is to search over few strings, so hardly worth the effort really.\n for (let i = 0; i < string.length; i++) {\n let character = string[i]\n if (subsequence.length > 0) {\n let subsequenceCharacter = subsequence[0]\n if (character === subsequenceCharacter) {\n // Subsequence character matches, move the index\n subsequence = subsequence.substring(1)\n matchingIndexes.push(i)\n } else {\n // We run out of subsequence, break\n break\n }\n }\n }\n\n if (matchingIndexes.length === subsequenceCount) {\n // We contained all characters in the sequence, create compact ranges and retrieve it\n return this.compactRanges(matchingIndexes)\n } else {\n // Not all characters are matching, so the search is invalid\n return null\n }\n }\n\n private compactRanges(indexes: Array<number>): Array<{ location: number; length: number }> {\n // This algorithm takes set of indexes of characters, such as 1, 2, 3, 5, 6, 8\n // and constructs ranges out of them by grouping together those that are close\n // numeric neighbours. Resulting output for such example will look like this:\n // [(1, 3), (5, 2), (8, 1)]\n\n // This function only works on sorted array, but doesn't check for it. Elements that are out of order (decreasing) are ignored.\n\n // Can't construct ranges from empty array\n if (indexes.length === 0) {\n return []\n }\n\n let firstOpeningIndex = indexes[0]\n indexes.shift()\n\n // No need to iterate on single element, which forms singular range\n if (indexes.length === 0) {\n return [\n {\n location: firstOpeningIndex,\n length: 1\n }\n ]\n }\n\n let ranges: Array<{ location: number; length: number }> = []\n var succeedingCount: number = 0\n\n // Iterate through all indexes, finding pairs\n while (indexes.length > 0) {\n let index = indexes[0]\n\n // If index jumps by more than one, we close current range\n if (firstOpeningIndex + succeedingCount < index - 1) {\n ranges.push({\n location: firstOpeningIndex,\n length: succeedingCount + 1\n })\n succeedingCount = 0\n firstOpeningIndex = index\n } else {\n succeedingCount += 1\n }\n\n // Index processed, drop it\n indexes.shift()\n }\n\n if (succeedingCount > 0) {\n ranges.push({\n location: firstOpeningIndex,\n length: succeedingCount + 1\n })\n }\n\n // Retrieve constructed ranges which are now optimal\n return ranges\n }\n\n private longestRangeOfRanges(ranges: Array<{ location: number; length: number }>): number {\n let max = ranges\n .map(range => {\n return range.length\n })\n .reduce((a, b) => {\n return Math.max(a, b)\n })\n\n return max\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Context analysis\n\n private seekLastControlCharacterOfString(codeLine: string): PLBlueprintAutocompleteEngineControlCharacter {\n // Find if there is some control character which signifies context we are in. Only interested in first control character\n // Note again this can be much faster by using ranges and not creating string again, but it only checks at most one line of average lenght of source code, so about 30-40 chars max.\n var codeLine = codeLine\n let length = codeLine.length\n for (let i = 0; i < length; i++) {\n for (let potentialControlChar of this.allControlCharacters()) {\n if (this.lastPartOfStringContains(codeLine, potentialControlChar)) {\n return potentialControlChar\n }\n }\n\n codeLine = codeLine.substring(0, codeLine.length - 1)\n }\n\n return PLBlueprintAutocompleteEngineControlCharacter.none\n }\n\n private allControlCharacters(): Array<PLBlueprintAutocompleteEngineControlCharacter> {\n return [\n PLBlueprintAutocompleteEngineControlCharacter.commentClose,\n PLBlueprintAutocompleteEngineControlCharacter.commentOpen,\n PLBlueprintAutocompleteEngineControlCharacter.flowClosing,\n PLBlueprintAutocompleteEngineControlCharacter.flowOpening,\n PLBlueprintAutocompleteEngineControlCharacter.quote,\n PLBlueprintAutocompleteEngineControlCharacter.substitutionClose,\n PLBlueprintAutocompleteEngineControlCharacter.substitutionOpen\n ]\n }\n\n private lastPartOfStringContains(string: string, contains: string): boolean {\n return string.endsWith(contains)\n }\n\n private lastWordOfString(string: string, delimiters: Array<string>): string {\n // Search backwards for first occurance of a delimiter defined in delimiters array\n var buffer = ''\n\n for (let i = string.length - 1; i >= 0; i--) {\n let c = string[i]\n if (delimiters.includes(c)) {\n return buffer\n } else {\n // Add character as prefix, so it is again in correct order when tested\n buffer = c + buffer\n }\n }\n\n return buffer\n }\n\n private lastLineOfString(string: string): string {\n return this.lastWordOfString(string, ['\\n'])\n }\n}\n","//\n// PLBlueprintSnippets.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLPlaceholderDisabledSnippetPool } from './PlaceholderDisabledSnippetPool'\nimport { PLPlaceholderEnabledSnippetPool } from './PlaceholderEnabledSnippetPool'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nexport type PLAutocompleteBlueprintSnippet = {\n /** Snippet invocation keyword */\n keyword: string\n\n /** Snippet content to be inserted into the code */\n content: string\n\n /** Snippet description */\n description: string | null\n\n /** Suggestion string that will be used to replace user input if use commits the action */\n caretPosition: number | null\n\n /** Priority */\n priority: number\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Pre-defined blueprints\n\nexport class PLAutocompleteBlueprintSnippets {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - PLAutocompleteBlueprintSnippet pool building\n\n snippetPool(includingEditorPlaceholder: boolean = false): Array<PLAutocompleteBlueprintSnippet> {\n if (includingEditorPlaceholder) {\n let pool = new PLPlaceholderEnabledSnippetPool()\n return pool.allSnippets()\n } else {\n let pool = new PLPlaceholderDisabledSnippetPool()\n return pool.allSnippets()\n }\n }\n}\n","//\n// PLPlaceholderDisabledSnippetPool.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { dedent } from 'ts-dedent'\nimport { PLAutocompleteBlueprintSnippet } from './BlueprintSnippets'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Pre-defined blueprints\n\nexport class PLPlaceholderDisabledSnippetPool {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - PLAutocompleteBlueprintSnippet pool building\n\n allSnippets(): Array<PLAutocompleteBlueprintSnippet> {\n return [\n // Default, non-specific snippets\n this.commentSnippet(),\n this.commentMultilineSnippet(),\n this.flowSnippet(),\n this.flowEndSnippet(),\n this.flowNoBodySnippet(),\n this.substitutionSnippet(),\n\n // Purpose-specific snippets\n // this.debugFlowSnippet(),\n this.logFlowSnippet(),\n this.varFlowSnippet(),\n this.letFlowSnippet(),\n this.setFlowSnippet(),\n this.globalFlowSnippet(),\n this.importFlowSnippet(),\n this.returnFlowSnippet(),\n this.emitFlowSnippet(),\n this.injectFlowSnippet(),\n this.codeMergeFlowSnippet(),\n this.mapFlowSnippet(),\n this.mapElseFlowSnippet(),\n this.forFlowSnippet(),\n this.forElseFlowSnippet(),\n this.traverseFlowSnippet(),\n this.switchFlowSnippet(),\n this.switchDefaultFlowSnippet(),\n this.caseFlowSnippet(),\n this.defaultFlowSnippet(),\n this.ifFlowSnippet(),\n this.ifElseFlowSnippet(),\n this.ifElseIfElseFlowSnippet()\n ]\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Default, non-specific snippets\n\n commentSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates inline comment block.'\n let content = dedent(`\n {* *}\n\n `)\n\n return {\n keyword: 'comment',\n content: content,\n description: desc,\n caretPosition: 3,\n priority: 0\n }\n }\n\n commentMultilineSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates multiline comment block.'\n let content = `\n {*\n\n *}\n\n `\n\n return {\n keyword: 'comment_block',\n content: content,\n description: desc,\n caretPosition: 4,\n priority: 0\n }\n }\n\n flowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates flow with opening and ending statement including content block.'\n let content = dedent(`\n {[ Statement ]}\n Body\n {[/]}\n\n `)\n\n return {\n keyword: 'flow',\n content: content,\n description: desc,\n caretPosition: 3,\n priority: 0\n }\n }\n\n flowEndSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates ending tag for opened flow.'\n let content = dedent(`\n {[/]}\n\n `)\n\n return {\n keyword: 'flow_end',\n content: content,\n description: desc,\n caretPosition: 6,\n priority: 0\n }\n }\n\n flowNoBodySnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates flow with opening and ending statement without content block.'\n let content = dedent(`\n {[ Statement /]}\n\n `)\n\n return {\n keyword: 'flow_no_body',\n content: content,\n description: desc,\n caretPosition: 3,\n priority: 0\n }\n }\n\n substitutionSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates substitution block used to output dynamic value.'\n let content = dedent(`\n {{ Statement }}\n `)\n\n return {\n keyword: 'substitution',\n content: content,\n description: desc,\n caretPosition: 3,\n priority: 0\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Purpose specific snippets\n\n logFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Outputs any information into console. Log works with results of functions, variables or even custom messages'\n let content = dedent(`\n {[ log statement /]}\n `)\n\n return {\n keyword: 'log',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n varFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates named variable within the current scope that is mutable.'\n let content = dedent(`\n {[ var name value /]}\n `)\n\n return {\n keyword: 'var',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n letFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates named variable within the current scope that is immutable.'\n let content = dedent(`\n {[ let name value /]}\n `)\n\n return {\n keyword: 'let',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n setFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates flow used to modify value of previously defined mutable varible (defined using var flow).'\n let content = dedent(`\n {[ set name value /]}\n `)\n\n return {\n keyword: 'set',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n globalFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates named variable that is accessible within any scope. Note that global variables are always immutable and should only be used to set things such as global configuration flags.'\n let content = dedent(`\n {[ global name value /]}\n `)\n\n return {\n keyword: 'global',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n importFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates import flow used to extract value from another import. In order to define properties retrieved from blueprint execution, use return flow.'\n let content = dedent(`\n {[ import name from blueprint /]}\n `)\n\n return {\n keyword: 'import',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n returnFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates return flow used to define values that can be imported into another blueprint. Use import flow to reuse the values in another blueprint.'\n let content = dedent(`\n {[ return variable /]}\n `)\n\n return {\n keyword: 'return',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n emitFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates emit flow to export another blueprint from current one, resulting in multiple output files. Body of the emitter is what is used to define the content'\n let content = dedent(`\n {[ emit file filename ]}\n body to emit\n {[/]}\n\n `)\n\n return {\n keyword: 'emit',\n content: content,\n description: desc,\n caretPosition: 13,\n priority: 0\n }\n }\n\n injectFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates inject flow which allows to import content of another blueprint'\n let content = dedent(`\n {[ inject blueprint name context blueprint data /]}\n `)\n\n return {\n keyword: 'inject',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n codeMergeFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates merging code tag signifying that area inside this file is untouchable by code regeneration.'\n let content = dedent(`\n {[ code /]}\n\n `)\n\n return {\n keyword: 'code',\n content: content,\n description: desc,\n caretPosition: 12,\n priority: 0\n }\n }\n\n mapFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates directory iterator defining two new properties for each iteration, key and value'\n let content = dedent(`\n {[ map source to key value /]}\n {{ key }} {{ value }}\n {[/]}\n\n `)\n\n return {\n keyword: 'map',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n mapElseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates directory iterator defining two new properties for each iteration, key and value. If the source dictionary is empty, else block is used instead and can provide default value'\n let content = dedent(`\n {[ map source to key value /]}\n {{ key }} {{ value }}\n {[ else ]}\n body when empty\n {[/]}\n\n `)\n\n return {\n keyword: 'mapelse',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n forFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates array iterator defining new property for each iteration'\n let content = dedent(`\n {[ for value in source ]}\n {{ value }}\n {[/]}\n\n `)\n\n return {\n keyword: 'for',\n content: content,\n description: desc,\n caretPosition: 15,\n priority: 0\n }\n }\n\n forElseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates array iterator defining new property for each iteration. If the source array is empty, else block is used instead and can provide default value'\n let content = dedent(`\n {[ for value in source ]}\n {{ value }}\n {[ else ]}\n body when empty\n {[/]}\n\n `)\n\n return {\n keyword: 'for_else',\n content: content,\n description: desc,\n caretPosition: 15,\n priority: 0\n }\n }\n\n traverseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates traverse iterator which can be used to iterate through nested objects. '\n let content = dedent(`\n {[ traverse key into value source source or _ ]}\n {{ value }}\n {[/]}\n\n `)\n\n return {\n keyword: 'traverse',\n content: content,\n description: desc,\n caretPosition: 12,\n priority: 0\n }\n }\n\n switchFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates switch flow without default statement'\n let content = dedent(`\n {[ switch source ]}\n {[ case value1 ]}\n body\n {[ case value1 ]}\n body\n {[/]}\n `)\n\n return {\n keyword: 'switch',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n switchDefaultFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates switch flow with default statement to handle cases not explicitly handled within switch statement'\n let content = dedent(`\n {[ switch source ]}\n {[ case value1 ]}\n body\n {[ default ]}\n fallthrough\n {[/]}\n `)\n\n return {\n keyword: 'switch_default',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n caseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates anoter case for switch statement. If case statement results to true, body is invoked'\n let content = dedent(`\n {[ case value ]}\n\n `)\n\n return {\n keyword: 'case',\n content: content,\n description: desc,\n caretPosition: 8,\n priority: 0\n }\n }\n\n defaultFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates default branch for switch statement. Default branch is only executed when none of previous cases results to true'\n let content = dedent(`\n {[ default ]}\n\n `)\n\n return {\n keyword: 'default',\n content: content,\n description: desc,\n caretPosition: 15,\n priority: 0\n }\n }\n\n ifFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates conditional flow that executes when statement results to true'\n let content = dedent(`\n {[ if condition ]}\n true body\n {[/]}\n `)\n\n return {\n keyword: 'if',\n content: content,\n description: desc,\n caretPosition: 6,\n priority: 0\n }\n }\n\n ifElseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates conditional flow that executes when statement results to true, or resorts to else branch when false'\n let content = dedent(`\n {[ if condition ]}\n true body\n {[ else ]}\n false body\n {[/]}\n `)\n\n return {\n keyword: 'if_else',\n content: content,\n description: desc,\n caretPosition: 6,\n priority: 0\n }\n }\n\n ifElseIfElseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates conditional flow that executes when statement results to true, or resorts to another condition if false, or falls back to else branch when everything fails'\n let content = dedent(`\n {[ if condition ]}\n body\n {[ elseif another condition ]}\n body\n {[ else ]}\n body\n {[/]}\n `)\n\n return {\n keyword: 'if_elseif_else',\n content: content,\n description: desc,\n caretPosition: 6,\n priority: 0\n }\n }\n}\n","//\n// PLPlaceholderEnabledSnippetPool.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { dedent } from 'ts-dedent'\nimport { PLAutocompleteBlueprintSnippet } from './BlueprintSnippets'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Pre-defined blueprints\n\nexport class PLPlaceholderEnabledSnippetPool {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor() {}\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - PLAutocompleteBlueprintSnippet pool building\n\n allSnippets(): Array<PLAutocompleteBlueprintSnippet> {\n return [\n // Default, non-specific snippets\n this.commentSnippet(),\n this.commentMultilineSnippet(),\n this.flowSnippet(),\n this.flowEndSnippet(),\n this.flowNoBodySnippet(),\n this.substitutionSnippet(),\n\n // Purpose-specific snippets\n // this.debugFlowSnippet(),\n this.logFlowSnippet(),\n this.varFlowSnippet(),\n this.letFlowSnippet(),\n this.setFlowSnippet(),\n this.globalFlowSnippet(),\n this.importFlowSnippet(),\n this.returnFlowSnippet(),\n this.emitFlowSnippet(),\n this.injectFlowSnippet(),\n this.codeMergeFlowSnippet(),\n this.mapFlowSnippet(),\n this.mapElseFlowSnippet(),\n this.forFlowSnippet(),\n this.forElseFlowSnippet(),\n this.traverseFlowSnippet(),\n this.switchFlowSnippet(),\n this.switchDefaultFlowSnippet(),\n this.caseFlowSnippet(),\n this.defaultFlowSnippet(),\n this.ifFlowSnippet(),\n this.ifElseFlowSnippet(),\n this.ifElseIfElseFlowSnippet()\n ]\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Default, non-specific snippets\n\n commentSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates inline comment block.'\n let content = dedent(`\n {* *}\n\n `)\n\n return {\n keyword: 'comment',\n content: content,\n description: desc,\n caretPosition: 3,\n priority: 0\n }\n }\n\n commentMultilineSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates multiline comment block.'\n let content = `\n {*\n\n *}\n\n `\n\n return {\n keyword: 'comment_block',\n content: content,\n description: desc,\n caretPosition: 4,\n priority: 0\n }\n }\n\n flowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates flow with opening and ending statement including content block.'\n let content = dedent(`\n {[ \\$\\{1:Statement} ]}\n \\$\\{2:Body}\n {[/]}\n\n `)\n\n return {\n keyword: 'flow',\n content: content,\n description: desc,\n caretPosition: 3,\n priority: 0\n }\n }\n\n flowEndSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates ending tag for opened flow.'\n let content = dedent(`\n {[/]}\n\n `)\n\n return {\n keyword: 'flow_end',\n content: content,\n description: desc,\n caretPosition: 6,\n priority: 0\n }\n }\n\n flowNoBodySnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates flow with opening and ending statement without content block.'\n let content = dedent(`\n {[ \\$\\{1:Statement} /]}\n\n `)\n\n return {\n keyword: 'flow_no_body',\n content: content,\n description: desc,\n caretPosition: 3,\n priority: 0\n }\n }\n\n substitutionSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates substitution block used to output dynamic value.'\n let content = dedent(`\n {{ \\$\\{1:Statement} }}\n `)\n\n return {\n keyword: 'substitution',\n content: content,\n description: desc,\n caretPosition: 3,\n priority: 0\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Purpose specific snippets\n\n logFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Outputs any information into console. Log works with results of functions, variables or even custom messages'\n let content = dedent(`\n {[ log \\$\\{1:statement} /]}\n `)\n\n return {\n keyword: 'log',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n varFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates named variable within the current scope that is mutable.'\n let content = dedent(`\n {[ var \\$\\{1:name} \\$\\{2:value} /]}\n `)\n\n return {\n keyword: 'var',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n letFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates named variable within the current scope that is immutable.'\n let content = dedent(`\n {[ let \\$\\{1:name} \\$\\{2:value} /]}\n `)\n\n return {\n keyword: 'let',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n setFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates flow used to modify value of previously defined mutable varible (defined using var flow).'\n let content = dedent(`\n {[ set \\$\\{1:name} \\$\\{2:value} /]}\n `)\n\n return {\n keyword: 'set',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n globalFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates named variable that is accessible within any scope. Note that global variables are always immutable and should only be used to set things such as global configuration flags.'\n let content = dedent(`\n {[ global \\$\\{1:name} \\$\\{2:value} /]}\n `)\n\n return {\n keyword: 'global',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n importFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates import flow used to extract value from another import. In order to define properties retrieved from blueprint execution, use return flow.'\n let content = dedent(`\n {[ import \\$\\{1:name} from \\$\\{2:blueprint} /]}\n `)\n\n return {\n keyword: 'import',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n returnFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates return flow used to define values that can be imported into another blueprint. Use import flow to reuse the values in another blueprint.'\n let content = dedent(`\n {[ return \\$\\{1:variable} /]}\n `)\n\n return {\n keyword: 'return',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n emitFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates emit flow to export another blueprint from current one, resulting in multiple output files. Body of the emitter is what is used to define the content'\n let content = dedent(`\n {[ emit file \\$\\{1:filename} ]}\n \\$\\{1:body to emit}\n {[/]}\n\n `)\n\n return {\n keyword: 'emit',\n content: content,\n description: desc,\n caretPosition: 13,\n priority: 0\n }\n }\n\n injectFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates inject flow which allows to import content of another blueprint'\n let content = dedent(`\n {[ inject \\$\\{1:blueprint name} context \\$\\{2:data to pass} /]}\n `)\n\n return {\n keyword: 'inject',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n codeMergeFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates merging code tag signifying that area inside this file is untouchable by code regeneration.'\n let content = dedent(`\n {[ code /]}\n\n `)\n\n return {\n keyword: 'code',\n content: content,\n description: desc,\n caretPosition: 12,\n priority: 0\n }\n }\n\n mapFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates directory iterator defining two new properties for each iteration, key and value'\n let content = dedent(`\n {[ map \\$\\{1:source} to \\$\\{2:key} \\$\\{3:value} /]}\n {{ \\$\\{2:key} }} {{ \\$\\{3:value} }}\n {[/]}\n\n `)\n\n return {\n keyword: 'map',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n mapElseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates directory iterator defining two new properties for each iteration, key and value. If the source dictionary is empty, else block is used instead and can provide default value'\n let content = dedent(`\n {[ map \\$\\{1:source} to \\$\\{2:key} \\$\\{3:value} /]}\n {{ \\$\\{2:key} }} {{ \\$\\{3:value} }}\n {[ else ]}\n \\$\\{4:body when empty}\n {[/]}\n\n `)\n\n return {\n keyword: 'map_else',\n content: content,\n description: desc,\n caretPosition: 7,\n priority: 0\n }\n }\n\n forFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates array iterator defining new property for each iteration'\n let content = dedent(`\n {[ for \\$\\{1:value} in \\$\\{2:source} ]}\n {{ \\$\\{1:value} }}\n {[/]}\n\n `)\n\n return {\n keyword: 'for',\n content: content,\n description: desc,\n caretPosition: 15,\n priority: 0\n }\n }\n\n forElseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates array iterator defining new property for each iteration. If the source array is empty, else block is used instead and can provide default value'\n let content = dedent(`\n {[ for \\$\\{1:value} in \\$\\{2:source} ]}\n {{ \\$\\{1:value} }}\n {[ else ]}\n \\$\\{3:body when empty}\n {[/]}\n\n `)\n\n return {\n keyword: 'for_else',\n content: content,\n description: desc,\n caretPosition: 15,\n priority: 0\n }\n }\n\n traverseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates traverse iterator which can be used to iterate through nested objects. '\n let content = dedent(`\n {[ traverse \\$\\{1:key} into \\$\\{2:value} source \\$\\{3:source | _} ]}\n {{ \\$\\{2:value} }}\n {[/]}\n\n `)\n\n return {\n keyword: 'traverse',\n content: content,\n description: desc,\n caretPosition: 12,\n priority: 0\n }\n }\n\n switchFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates switch flow without default statement'\n let content = dedent(`\n {[ switch \\$\\{1:source} ]}\n {[ case \\$\\{2:value1} ]}\n \\$\\{3:body1}\n {[ case \\$\\{4:value2} ]}\n \\$\\{5:body2}\n {[/]}\n `)\n\n return {\n keyword: 'switch',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n switchDefaultFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates switch flow with default statement to handle cases not explicitly handled within switch statement'\n let content = dedent(`\n {[ switch \\$\\{1:source} ]}\n {[ case \\$\\{2:value1} ]}\n \\$\\{3:body1}\n {[ default ]}\n \\$\\{4:fallthrough}\n {[/]}\n `)\n\n return {\n keyword: 'switch_default',\n content: content,\n description: desc,\n caretPosition: 10,\n priority: 0\n }\n }\n\n caseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates anoter case for switch statement. If case statement results to true, body is invoked'\n let content = dedent(`\n {[ case \\$\\{1:value} ]}\n\n `)\n\n return {\n keyword: 'case',\n content: content,\n description: desc,\n caretPosition: 8,\n priority: 0\n }\n }\n\n defaultFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates default branch for switch statement. Default branch is only executed when none of previous cases results to true'\n let content = dedent(`\n {[ default ]}\n\n `)\n\n return {\n keyword: 'default',\n content: content,\n description: desc,\n caretPosition: 15,\n priority: 0\n }\n }\n\n ifFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc = 'Creates conditional flow that executes when statement results to true'\n let content = dedent(`\n {[ if \\$\\{1:condition} ]}\n \\$\\{2:executes when true}\n {[/]}\n `)\n\n return {\n keyword: 'if',\n content: content,\n description: desc,\n caretPosition: 6,\n priority: 0\n }\n }\n\n ifElseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates conditional flow that executes when statement results to true, or resorts to else branch when false'\n let content = dedent(`\n {[ if \\$\\{1:condition} ]}\n \\$\\{2:executes when true}\n {[ else ]}\n \\$\\{3:executes when false}\n {[/]}\n `)\n\n return {\n keyword: 'if_else',\n content: content,\n description: desc,\n caretPosition: 6,\n priority: 0\n }\n }\n\n ifElseIfElseFlowSnippet(): PLAutocompleteBlueprintSnippet {\n let desc =\n 'Creates conditional flow that executes when statement results to true, or resorts to another condition if false, or falls back to else branch when everything fails'\n let content = dedent(`\n {[ if \\$\\{1:condition} ]}\n \\$\\{2:executes when true}\n {[ elseif \\$\\{3:another condition} ]}\n \\$\\{4:executes when true}\n {[ else ]}\n \\$\\{5:executes when all false}\n {[/]}\n `)\n\n return {\n keyword: 'if_elseif_else',\n content: content,\n description: desc,\n caretPosition: 6,\n priority: 0\n }\n }\n}\n","//\n// PLDeclarationBuilder.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\nimport { PLFunction } from '../../interpreter/functions/Function'\nimport { PLTransformer } from '../../interpreter/transformers/Transformer'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLDeclarationBuilder {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Snippet declarations\n\n public static snippetDeclarationForFunction(func: PLFunction, includePlaceholders: boolean): string {\n var argumentString = ''\n let doc = func.documentation()\n\n if (doc !== null) {\n let transformedArguments = doc.arguments.map((arg, index) => {\n return includePlaceholders ? `\\$\\{${index + 1}:${arg.name}}` : `${arg.name}`\n })\n argumentString = transformedArguments.join(', ')\n }\n\n return `${func.keyword()}${argumentString}`\n }\n\n public static snippetDeclarationForTransformer(transformer: PLTransformer, includePlaceholders: boolean): string {\n var argumentString = ''\n let doc = transformer.documentation()\n\n if (doc !== null) {\n let transformedArguments = doc.arguments.map((arg, index) => {\n return includePlaceholders ? `\\$\\{${index + 1}:${arg.name}}` : `${arg.name}`\n })\n argumentString = transformedArguments.join(', ')\n }\n\n return `${transformer.keyword()}(${argumentString})`\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Documentation declaration\n\n public static documentationDeclarationForFunction(func: PLFunction): string {\n var returnString = ''\n var argumentString = ''\n let doc = func.documentation()\n\n if (doc !== null) {\n let transformedArguments = doc.arguments.map(arg => {\n return `${arg.name}: ${arg.dataType}`\n })\n argumentString = transformedArguments.join(', ')\n if (doc.returnType !== null) {\n returnString = ` -> ${doc.returnType}`\n }\n }\n\n return `${func.keyword()}(${argumentString})${returnString}`\n }\n\n public static documentationDeclarationForTransformer(transformer: PLTransformer): string {\n var returnString = ''\n var argumentString = ''\n let doc = transformer.documentation()\n\n if (doc !== null) {\n let transformedArguments = doc.arguments.map(arg => {\n return `${arg.name}: ${arg.dataType}`\n })\n argumentString = transformedArguments.join(', ')\n if (doc.returnType !== null) {\n returnString = ` -> ${doc.returnType}`\n }\n }\n\n return `${transformer.keyword()}(${argumentString})${returnString}`\n }\n}\n","//\n// PLDoc.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLFunction } from './../../interpreter/functions/Function'\nimport { PLTransformer } from '../../interpreter/transformers/Transformer'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Definitions\n\nexport type DocDataType = string\n\nexport enum DocDataTypePredefinedType {\n number = 'Number',\n bool = 'Bool',\n string = 'string',\n int = 'Int',\n double = 'Double',\n float = 'Float',\n array = 'Array',\n dict = 'Dictionary',\n any = 'Any'\n}\n\nexport interface DocArgument {\n name: string\n description: string\n dataType: DocDataType\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLDoc {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Documentation properties\n\n // You might notice that name and description is not optional. Why is that?\n // Because people are forced to write docs this way with every new function, method or flow.\n // Write docs. Be better developers.\n //\n // .. Btw don't try to cheat with empty strings. I thought of that too )\n name: string\n description: string\n returnType: string | null\n link: string | null\n\n arguments: Array<DocArgument>\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n constructor(\n name: string,\n link: string | null,\n text: string,\n dataType: string | null,\n args: Array<DocArgument> | null\n ) {\n this.name = name\n this.description = text\n\n this.link = link\n this.returnType = dataType\n this.arguments = args ?? []\n }\n\n public static functionDoc(\n func: PLFunction,\n text: string,\n dataType: DocDataType | DocDataTypePredefinedType,\n args: Array<DocArgument>,\n link: string | null\n ): PLDoc {\n return new PLDoc(func.keyword(), link, text, dataType, args)\n }\n\n public static transfomerDoc(\n transformer: PLTransformer,\n text: string,\n dataType: DocDataType | DocDataTypePredefinedType,\n args: Array<DocArgument>,\n link: string | null\n ): PLDoc {\n return new PLDoc(transformer.keyword(), link, text, dataType, args)\n }\n\n public static arg(name: string, text: string, dataType: DocDataType | DocDataTypePredefinedType): DocArgument {\n return {\n name: name,\n description: text,\n dataType: dataType\n }\n }\n}\n","//\n// PLBlueprintHighlightEngine.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nimport { PLHighlightEngine, PLHighlightEngineToken, PLHighlightEngineTokenType } from './HighlightEngine'\nimport { PLFlow } from './../../interpreter/flows/Flow'\nimport { PLTransformer } from './../../interpreter/transformers/Transformer'\nimport { PLFunction } from './../../interpreter/functions/Function'\nimport { PLExecutionContext } from './../../interpreter/ExecutionContext'\nimport { PLBlueprintHighlightEngineState } from './BlueprintHighlightEngineState'\nimport { SyntaxNodeSubstitution } from './../../parser/syntax/nodes/SyntaxNodeSubstitution'\nimport { StringUtils } from './../../utils/StringUtils'\nimport { SyntaxNodeFlow } from './../../parser/syntax/nodes/SyntaxNodeFlow'\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLBlueprintHighlightEngine extends PLHighlightEngine {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Init\n\n // Control tags\n blueprintFlowOpeningTag: string = '{['\n blueprintFlowClosingTag: string = ']}'\n blueprintFlowClosingEndingTag: string = '/]}'\n blueprintFlowOpeningSubstitution: string = '{{'\n blueprintFlowClosingSubstitution: string = '}}'\n blueprintCommentOpening: string = '{*'\n blueprintCommentClosing: string = '*}'\n blueprintSnippetOpening: string = '{#'\n blueprintSnippetClosing: string = '#}'\n\n blueprintFunctions: Map<string, PLFunction>\n blueprintTransformers: Map<string, PLTransformer>\n blueprintFlows: Map<string, PLFlow>\n\n executionContext: PLExecutionContext\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n public constructor(executionContext: PLExecutionContext) {\n super()\n this.executionContext = executionContext\n this.blueprintFunctions = new Map<string, PLFunction>()\n this.blueprintTransformers = new Map<string, PLTransformer>()\n this.blueprintFlows = new Map<string, PLFlow>()\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Tokenization\n\n public tokenize(string: string): Array<PLHighlightEngineToken> {\n this.updateKeywords(this.executionContext)\n let tokens: Array<PLHighlightEngineToken> = new Array<PLHighlightEngineToken>()\n\n // Parse flow, substitutions etc.\n tokens = tokens.concat(this.tokenizeControlTokens(string))\n\n // Parse comments and snippets separately, as they can overlap within the control tokens and this implementation is easier, though not optimal (it needs to run twice). Improvements later\n tokens = tokens.concat(this.tokenizeNoncontrolTokens(string))\n\n return tokens\n }\n\n tokenizeControlTokens(string: string): Array<PLHighlightEngineToken> {\n let tokens: Array<PLHighlightEngineToken> = []\n let state = new PLBlueprintHighlightEngineState(string)\n\n while (string.length > 0) {\n // Handle opened flow section\n if (state.followsFlowOpening) {\n let result = this.tokenizeUntilFlowEndOrNewline(state, string)\n tokens = tokens.concat(result.tokens)\n string = result.remaining\n\n // Handle opened substitution section\n } else if (state.followsSubstitutionOpening) {\n let result = this.tokenizeUntilSubstitutionEndOrNewline(state, string)\n tokens = tokens.concat(result.tokens)\n string = result.remaining\n\n // Handle no opened control tag\n } else {\n let result = this.tokenizeUntilAnyControlOpeningTag(state, string)\n tokens = tokens.concat(result.tokens)\n string = result.remaining\n }\n }\n\n return tokens\n }\n\n tokenizeNoncontrolTokens(string: string): Array<PLHighlightEngineToken> {\n // This method tokenizes comments and snippets, which disregard the control flows\n // For example, this can highlight comment inside substitution flow, as that comment is really ignored in parser\n let tokens: Array<PLHighlightEngineToken> = []\n let state = new PLBlueprintHighlightEngineState(string)\n\n while (string.length > 0) {\n // Handle opened comment section\n if (state.commentOpened) {\n let result = this.tokenizeUntilCommentEnd(state, string)\n tokens = tokens.concat(result.tokens)\n string = result.remaining\n\n // Handle opened snippet section\n } else if (state.snippetOpened) {\n let result = this.tokenizeUntilSnippetEnd(state, string)\n tokens = tokens.concat(result.tokens)\n string = result.remaining\n\n // Handle no opened noncontrol tag\n } else {\n let result = this.tokenizeUntilAnyNonControlOpeningTag(state, string)\n string = result\n }\n }\n\n return tokens\n }\n\n tokenizeUntilCommentEnd(\n state: PLBlueprintHighlightEngineState,\n string: string\n ): { remaining: string; tokens: Array<PLHighlightEngineToken> } {\n // Comment was opened, only another comment can close it and everything else is ignored\n // This can span multiple lines\n for (let index = 0; index < string.length; index++) {\n let c = string[index]\n state.addToBuffer(c)\n\n // Note we are also adding the beginning control tag (2 chars)\n let possibleCommentTag = state.lastBufferPart(2)\n if (possibleCommentTag === this.blueprintCommentClosing) {\n let token = this.tokenAtPosition(\n state.bufferStart - 1,\n index + 3,\n state.buffer,\n PLHighlightEngineTokenType.comment\n )\n state.resetAfterClosingComment()\n return {\n remaining: string.substring(index + 1), // Maybe potential index issue\n tokens: [token]\n }\n }\n }\n\n return {\n remaining: '',\n tokens: []\n }\n }\n\n tokenizeUntilSnippetEnd(\n state: PLBlueprintHighlightEngineState,\n string: string\n ): { remaining: string; tokens: Array<PLHighlightEngineToken> } {\n // Snippet was opened, only another snippet can close it and everything else is ignored\n // This can only happen for single line\n for (let index = 0; index < string.length; index++) {\n let c = string[index]\n state.addToBuffer(c)\n\n // Note we are also adding the beginning control tag (2 chars)\n let possibleSnippetTag = state.lastBufferPart(2)\n if (possibleSnippetTag === this.blueprintSnippetClosing) {\n let token = this.tokenAtPosition(\n state.bufferStart - 1,\n index + 3,\n state.buffer,\n PLHighlightEngineTokenType.dynamicSnippet\n )\n state.resetAfterClosingSnippet()\n return {\n remaining: string.substring(index + 1), // Maybe potential index issue\n tokens: [token]\n }\n }\n }\n\n return {\n remaining: '',\n tokens: []\n }\n }\n\n tokenizeUntilSubstitutionEndOrNewline(\n state: PLBlueprintHighlightEngineState,\n string: string\n ): { remaining: string; tokens: Array<PLHighlightEngineToken> } {\n let tokens: Array<PLHighlightEngineToken> = []\n let endReached: boolean = false\n let substitutionBeginning: number = state.seekedIndex - 1\n\n // Substitution was opened, only substitution end or newline can close it\n for (let index = 0; index < string.length; index++) {\n let c = string[index]\n state.addToBuffer(c)\n // console.log(`adding ${c} to buffer`)\n\n // Token is closing substitution\n let part = state.lastBufferPartIfEquals(this.blueprintFlowClosingSubstitution)\n // console.log(part)\n if (part) {\n let text = state.textAtPosition(part.startIndex, part.size)\n tokens.push(this.tokenAtPosition(part.startIndex, part.size, text, PLHighlightEngineTokenType.closingBracket))\n state.resetAfterSubstitutionClosingTag()\n endReached = true\n\n // Newline\n } else if (state.isLastCharacterLineSeparator()) {\n state.resetAfterNewline()\n endReached = true\n\n // Handle brackets\n } else if (state.isLastCharacterClosingBracket()) {\n let text = state.textAtPosition(state.seekedIndex - 1, 1)\n tokens.push(this.tokenAtPosition(state.seekedIndex - 1, 1, text, PLHighlightEngineTokenType.closingBracket))\n state.resetAfterBracket()\n } else if (state.isLastCharacterOpeningBracket()) {\n let text = state.textAtPosition(state.seekedIndex - 1, 1)\n tokens.push(this.tokenAtPosition(state.seekedIndex - 1, 1, text, PLHighlightEngineTokenType.openingBracket))\n state.resetAfterBracket()\n }\n\n if (endReached) {\n let remainingLength = string.length - index + 1\n let substitutionDefinition = string.substring(0, string.length - remainingLength + 1)\n let flowTokens = this.tokenizeSubstitution(substitutionDefinition, substitutionBeginning)\n tokens = tokens.concat(flowTokens)\n return {\n remaining: string.substring(index + 1, string.length),\n tokens: tokens\n }\n }\n }\n\n return {\n remaining: '',\n tokens: tokens\n }\n }\n\n tokenizeUntilFlowEndOrNewline(\n state: PLBlueprintHighlightEngineState,\n string: string\n ): { remaining: string; tokens: Array<PLHighlightEngineToken> } {\n let tokens: Array<PLHighlightEngineToken> = new Array<PLHighlightEngineToken>()\n let endReached: boolean = false\n let flowBeginning: number = state.seekedIndex - 1\n\n // Flow was opened, only flow end or newline can close it\n for (let index = 0; index < string.length; index++) {\n let c = string[index]\n state.addToBuffer(c)\n\n // Token is flow closing tag\n // Note this can be either shorthand /]} or full {[/]} but it will still work the same\n // because full also contains opening tag (we don't care about semantics)\n let flowClosingEndingTagPart = state.lastBufferPartIfEquals(this.blueprintFlowClosingEndingTag)\n let flowClosingTagPart = state.lastBufferPartIfEquals(this.blueprintFlowClosingTag)\n if (flowClosingEndingTagPart) {\n tokens.push(\n this.tokenAtPosition(\n flowClosingEndingTagPart.startIndex,\n flowClosingEndingTagPart.size,\n state.buffer,\n PLHighlightEngineTokenType.closingBracket\n )\n )\n state.resetAfterFlowClosingTag()\n endReached = true\n\n // Same as before, closing tag\n } else if (flowClosingTagPart) {\n tokens.push(\n this.tokenAtPosition(\n flowClosingTagPart.startIndex,\n flowClosingTagPart.size,\n state.buffer,\n PLHighlightEngineTokenType.closingBracket\n )\n )\n state.resetAfterFlowClosingTag()\n endReached = true\n\n // Newline\n } else if (state.isLastCharacterLineSeparator()) {\n state.resetAfterNewline()\n endReached = true\n\n // Handle brackets\n } else if (state.isLastCharacterClosingBracket()) {\n tokens.push(\n this.tokenAtPosition(state.seekedIndex - 1, 1, state.buffer, PLHighlightEngineTokenType.closingBracket)\n )\n state.resetAfterBracket()\n } else if (state.isLastCharacterOpeningBracket()) {\n tokens.push(\n this.tokenAtPosition(state.seekedIndex - 1, 1, state.buffer, PLHighlightEngineTokenType.openingBracket)\n )\n state.resetAfterBracket()\n }\n\n if (endReached) {\n let remainingLength = string.length - index + 1\n let flowDefinition = string.substring(0, string.length - remainingLength + 1) // Potential issue\n let flowTokens = this.tokenizeFlow(flowDefinition, flowBeginning)\n tokens = tokens.concat(flowTokens)\n return {\n remaining: string.substring(index + 1, string.length),\n tokens: tokens\n }\n }\n }\n\n return {\n remaining: '',\n tokens: []\n }\n }\n\n tokenizeUntilAnyNonControlOpeningTag(state: PLBlueprintHighlightEngineState, string: string): string {\n let endReached: boolean = false\n\n // This can span multiple lines\n for (let index = 0; index < string.length; index++) {\n let c = string[index]\n state.addToBuffer(c)\n\n // We are looking for any control token\n // Comment opening\n if (state.lastBufferPartIfEquals(this.blueprintCommentOpening)) {\n // tokens.push(this.token(at: part.startIndex, count: part.size, type: .comment))\n state.openComment()\n endReached = true\n\n // Snippet opening\n } else if (state.lastBufferPartIfEquals(this.blueprintSnippetOpening)) {\n // tokens.push(this.token(at: part.startIndex, count: part.size, type: .dynamicSnippet))\n state.openSnippet()\n endReached = true\n }\n\n if (endReached) {\n // Retrieve everything\n return string.substring(index + 1, string.length)\n }\n }\n\n // No control token found\n return ''\n }\n\n tokenizeUntilAnyControlOpeningTag(\n state: PLBlueprintHighlightEngineState,\n string: string\n ): { remaining: string; tokens: Array<PLHighlightEngineToken> } {\n let tokens: Array<PLHighlightEngineToken> = []\n let endReached: boolean = false\n let controlLength: number = 0\n let flowBeginning: number = state.seekedIndex - 1\n\n // This can span multiple lines\n for (let index = 0; index < string.length; index++) {\n let c = string[index]\n state.addToBuffer(c)\n\n // We are looking for any control token\n // Comment opening\n if (state.lastBufferPartIfEquals(this.blueprintCommentOpening)) {\n // tokens.push(this.token(at: part.startIndex, count: part.size, type: .comment))\n controlLength = this.blueprintCommentOpening.length\n state.openComment()\n endReached = true\n\n // Substitution opening\n } else if (state.lastBufferPartIfEquals(this.blueprintSnippetOpening)) {\n // tokens.push(this.token(at: part.startIndex, count: part.size, type: .dynamicSnippet))\n controlLength = this.blueprintSnippetOpening.length\n state.openSnippet()\n endReached = true\n\n // Substitution opening\n } else {\n let substitutionOpeningPart = state.lastBufferPartIfEquals(this.blueprintFlowOpeningSubstitution)\n if (substitutionOpeningPart) {\n tokens.push(\n this.tokenAtPosition(\n substitutionOpeningPart.startIndex,\n substitutionOpeningPart.size,\n state.buffer,\n PLHighlightEngineTokenType.openingBracket\n )\n )\n controlLength = this.blueprintFlowOpeningSubstitution.length\n state.resetAfterSubstitutionOpeningTag()\n endReached = true\n } else {\n let flowOpeningPart = state.lastBufferPartIfEquals(this.blueprintFlowOpeningTag)\n if (flowOpeningPart) {\n tokens.push(\n this.tokenAtPosition(\n flowOpeningPart.startIndex,\n flowOpeningPart.size,\n state.buffer,\n PLHighlightEngineTokenType.openingBracket\n )\n )\n controlLength = this.blueprintFlowOpeningTag.length\n state.resetAfterFlowOpeningTag()\n endReached = true\n }\n }\n }\n\n if (endReached) {\n // Create plain text\n if (index - controlLength > 0) {\n tokens.push(\n this.tokenAtPosition(flowBeginning + 1, index - 1, state.buffer, PLHighlightEngineTokenType.plainText)\n )\n }\n\n // Retrieve everything\n return {\n remaining: string.substring(index + 1, string.length),\n tokens: tokens\n }\n }\n }\n\n // No control token found\n return {\n remaining: '',\n tokens: []\n }\n }\n\n tokenizeFlow(definition: string, initialSeekIndex: number): Array<PLHighlightEngineToken> {\n let tokens: Array<PLHighlightEngineToken> = []\n\n try {\n // Interpret root node (root group node of syntax tree)\n let node = new SyntaxNodeFlow(definition, 0, true, null, this.executionContext, [])\n\n // Highlight sources\n for (let [_, source] of node.sources) {\n if (StringUtils.isSurroundedWithDoubleQuotes(source.directive())) {\n let index = definition.indexOf(source.directive())\n if (index !== -1) {\n tokens.push(\n this.tokenAtPosition(\n initialSeekIndex + index + 1,\n source.directive().length,\n source.directive(),\n PLHighlightEngineTokenType.stringConstant\n )\n )\n }\n } else {\n tokens = tokens.concat(this.highlightSubstitution(source.backingProperty, definition, initialSeekIndex))\n }\n }\n\n for (let [_, output] of node.outputs) {\n let index = definition.indexOf(output.originalBackingProperty)\n if (index !== -1) {\n tokens.push(\n this.tokenAtPosition(\n initialSeekIndex + index + 1,\n output.originalBackingProperty.length,\n output.originalBackingProperty,\n StringUtils.isSurroundedWithDoubleQuotes(output.originalBackingProperty)\n ? PLHighlightEngineTokenType.stringConstant\n : PLHighlightEngineTokenType.variable\n )\n )\n }\n }\n\n for (let [key, isEnabled] of node.keywords) {\n if (isEnabled) {\n let index = definition.indexOf(key)\n if (index !== -1) {\n tokens.push(\n this.tokenAtPosition(initialSeekIndex + index + 1, key.length, key, PLHighlightEngineTokenType.keyword)\n )\n }\n }\n }\n } catch {\n // Ignore tokenization errors\n return []\n }\n\n return tokens\n }\n\n tokenizeSubstitution(definition: string, initialSeekIndex: number): Array<PLHighlightEngineToken> {\n try {\n // Interpret root node (root group node of syntax tree)\n let node = new SyntaxNodeSubstitution(definition, this.executionContext, [])\n return this.highlightSubstitution(node, definition, initialSeekIndex)\n } catch {\n // Ignore tokenization errors\n return []\n }\n }\n\n highlightSubstitution(\n node: SyntaxNodeSubstitution,\n definition: string,\n initialSeekIndex: number\n ): Array<PLHighlightEngineToken> {\n let tokens: Array<PLHighlightEngineToken> = []\n\n // Highlight custom data source, if any - this means function at the beginning. Mark beginning @ as well by extending the range a bit\n if (node.customDataSource) {\n let keyword = node.customDataSource.function.keyword()\n let index = definition.indexOf(keyword)\n if (index !== -1) {\n tokens.push(\n this.tokenAtPosition(\n initialSeekIndex + index,\n keyword.length + 1,\n keyword,\n PLHighlightEngineTokenType.function\n )\n )\n }\n }\n\n for (let transformerPack of node.transformers) {\n if (transformerPack.transformer.keyword() === 'value') {\n // Treat as variable\n let index = definition.indexOf(transformerPack.directive)\n if (index) {\n tokens.push(\n this.tokenAtPosition(\n initialSeekIndex + index,\n transformerPack.directive.length + 1,\n transformerPack.directive,\n PLHighlightEngineTokenType.variable\n )\n )\n }\n } else {\n let keyword = transformerPack.transformer.keyword()\n let index = definition.indexOf(keyword)\n if (index) {\n tokens.push(\n this.tokenAtPosition(\n initialSeekIndex + index,\n keyword.length + 1,\n keyword,\n PLHighlightEngineTokenType.method\n )\n )\n }\n }\n\n // TODO: Nested parsing\n }\n\n return tokens\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n updateKeywords(executionContext: PLExecutionContext) {\n this.blueprintFlows = executionContext.availableFlows()\n this.blueprintTransformers = executionContext.availableTransformers()\n this.blueprintFunctions = executionContext.availableFunctions()\n }\n}\n","//\n// BlueprintHighlightEngineState.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Tokenizer state\n\nexport class PLBlueprintHighlightEngineState {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n seekedIndex: number = 0\n followsDot: boolean = false\n followsFunction: boolean = false\n followsFlowOpening: boolean = false\n followsSubstitutionOpening: boolean = false\n commentOpened: boolean = false\n snippetOpened: boolean = false\n\n bufferStart: number = 0\n buffer: string = ''\n fullString: string = ''\n\n lineSeparator: string = '\\n'\n wordSeparator: string = ' '\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n constructor(fullString: string) {\n this.fullString = fullString\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Convenience\n\n resetAfterNewline() {\n this.followsDot = false\n this.followsFunction = false\n this.followsFlowOpening = false\n this.followsSubstitutionOpening = false\n this.buffer = ''\n this.bufferStart = this.seekedIndex + 1\n }\n\n resetAfterSpace() {\n this.buffer = ''\n this.bufferStart = this.seekedIndex + 1\n }\n\n resetAfterSubstitutionOpeningTag() {\n this.buffer = ''\n this.bufferStart = this.seekedIndex + 1\n this.followsSubstitutionOpening = true\n }\n\n resetAfterSubstitutionClosingTag() {\n this.buffer = ''\n this.bufferStart = this.seekedIndex + 1\n this.followsSubstitutionOpening = false\n }\n\n resetAfterFlowOpeningTag() {\n this.buffer = ''\n this.bufferStart = this.seekedIndex + 1\n this.followsFlowOpening = true\n }\n\n resetAfterBracket() {\n this.buffer = ''\n this.bufferStart = this.seekedIndex + 1\n }\n\n resetAfterFlowClosingTag() {\n this.buffer = ''\n this.bufferStart = this.seekedIndex + 1\n this.followsFlowOpening = false\n }\n\n openComment() {\n // Note: Keeps opening tag in the buffer\n this.buffer = this.buffer.substr(this.buffer.length - 3, 2)\n this.bufferStart = this.seekedIndex - 1\n this.commentOpened = true\n }\n\n resetAfterClosingComment() {\n this.buffer = ''\n this.bufferStart = this.seekedIndex + 1\n this.commentOpened = false\n }\n\n openSnippet() {\n // Note: Keeps opening tag in the buffer\n this.buffer = this.buffer.substr(this.buffer.length - 3, 2)\n this.bufferStart = this.seekedIndex - 1\n this.snippetOpened = true\n }\n\n resetAfterClosingSnippet() {\n this.buffer = ''\n this.bufferStart = this.seekedIndex + 1\n this.snippetOpened = false\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Buffer\n\n addToBuffer(character: string) {\n this.buffer += character\n this.seekedIndex += 1\n }\n\n isBufferedNewline(): boolean {\n return this.buffer.length === 1 && this.buffer === this.lineSeparator\n }\n\n isLastCharacterWordSeparator(): boolean {\n if (this.buffer.length === 0) {\n return false\n }\n\n return this.buffer[this.buffer.length - 1] === this.wordSeparator\n }\n\n isLastCharacterLineSeparator(): boolean {\n if (this.buffer.length === 0) {\n return false\n }\n\n return this.buffer[this.buffer.length - 1] === this.lineSeparator\n }\n\n isLastCharacterOpeningBracket(): boolean {\n if (this.buffer.length === 0) {\n return false\n }\n\n return this.buffer[this.buffer.length - 1] === '('\n }\n\n isLastCharacterClosingBracket(): boolean {\n if (this.buffer.length === 0) {\n return false\n }\n\n return this.buffer[this.buffer.length - 1] === ')'\n }\n\n isLastCharacterQuote(): boolean {\n if (this.buffer.length === 0) {\n return false\n }\n\n return this.buffer[this.buffer.length - 1] === '\"'\n }\n\n isLastCharacterFunctionMark(): boolean {\n if (this.buffer.length === 0) {\n return false\n }\n\n return this.buffer[this.buffer.length - 1] === '@'\n }\n\n lastBufferPart(size: number): string | null {\n if (this.buffer.length >= size) {\n return this.buffer.substr(this.buffer.length - size, size)\n }\n\n return null\n }\n\n lastBufferPartIfEquals(equals: string): { equals: boolean; startIndex: number; size: number } | null {\n let lastBufferedPart = this.lastBufferPart(equals.length)\n if (lastBufferedPart === equals) {\n return {\n equals: true,\n startIndex: this.seekedIndex - equals.length,\n size: equals.length\n }\n }\n\n return null\n }\n\n textAtPosition(position: number, length: number): string {\n return this.fullString.substr(position, length)\n }\n}\n","//\n// PLHighlightEngine.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\nexport enum PLHighlightEngineTokenType {\n keyword = 'keyword',\n openingBracket = 'openingBracket',\n closingBracket = 'closingBracket',\n customDelimiter1 = 'cd1',\n customDelimiter2 = 'cd2',\n stringKey = 'stringKey',\n stringConstant = 'stringConstant',\n numericConstant = 'numericConstant',\n comment = 'comment',\n function = 'function',\n method = 'method',\n variable = 'variable',\n plainText = 'plainText',\n\n dynamicSnippet = 'dynamicSnippet'\n}\n\nexport type PLHighlightEngineStyleFont = {\n family: string\n weight: number\n size: number\n}\n\nexport type PLHighlightEngineToken = {\n /// Type of found token (keyword etc.)\n type: PLHighlightEngineTokenType\n\n /// Position of found token\n position: number\n\n /// Character count of found token\n count: number\n\n /// Text definition of the token\n text: string\n}\n\nexport type PLHighlightEngineStyle = {\n /// Font for highlighted string\n font: PLHighlightEngineStyleFont\n\n /// Text color\n color: string\n\n /// Token type\n type: PLHighlightEngineTokenType\n}\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Function Definition\n\nexport class PLHighlightEngine {\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Definitions\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Properties\n\n /// Styles used for different types of tokens\n styles: Map<PLHighlightEngineTokenType, PLHighlightEngineStyle>\n\n /// Base font for everything that is not highlighted\n baseFont: PLHighlightEngineStyleFont = {\n family: 'Helvetica',\n weight: 300,\n size: 12\n }\n\n /// Base color for everything that is not highlighted\n baseColor: string = '#000'\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Constructor\n\n public constructor() {\n // Create styles and make default ones before it can be configured\n this.styles = new Map<PLHighlightEngineTokenType, PLHighlightEngineStyle>()\n this.setupDefaultStyles()\n }\n\n private setupDefaultStyles() {\n // Create default style for all token types\n for (let type of Object.values(PLHighlightEngineTokenType)) {\n let style: PLHighlightEngineStyle = {\n font: {\n family: 'Helvetica',\n weight: 300,\n size: 12\n },\n color: '#000',\n type: type\n }\n this.setStyle(style)\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Tokenization\n\n public tokenize(_string: string): Array<PLHighlightEngineToken> {\n // Highlight engine can be used without any implementation to style the base string still\n return []\n }\n\n tokenAtPosition(\n position: number,\n count: number | null,\n text: string,\n type: PLHighlightEngineTokenType\n ): PLHighlightEngineToken {\n return {\n type: type,\n position: position,\n count: count ? count : 1,\n text: text\n }\n }\n\n // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n // MARK: - Styling\n\n public setStyles(styles: Array<PLHighlightEngineStyle>) {\n // Override existing styles\n for (let style of styles) {\n this.setStyle(style)\n }\n }\n\n public setStyle(style: PLHighlightEngineStyle) {\n // Override existing style\n this.styles.set(style.type, style)\n }\n\n public setStyleUsingDefinition(font: PLHighlightEngineStyleFont, color: string, type: PLHighlightEngineTokenType) {\n let style: PLHighlightEngineStyle = {\n font: font,\n color: color,\n type: type\n }\n\n this.setStyle(style)\n }\n}\n","//\n// FlowHelpers.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Imports\n\n// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n// MARK: - Helpers\n\nexport class FlowUtils {\n static offsetLines(content: string, by: number, character: string): string {\n return content\n .split('\\n')\n .map(piece => {\n return `${character.repeat(by)}${piece}`\n })\n .join('\\n')\n }\n\n static offsetLinesIgnoreFirst(content: string, by: number, character: string): string {\n let lines = content.split('\\n')\n let buffer: Array<string> = []\n for (let [offset, element] of lines.entries()) {\n let piece = offset > 0 ? `${character.repeat(by)}${element}` : element\n buffer.push(piece)\n }\n\n return buffer.join('\\n')\n }\n\n static offsetLinesCanIgnoreFirstline(\n content: string,\n shouldIgnoreFirstLine: boolean,\n userOffset: number,\n nodeOffset: number,\n character: string\n ): string {\n let actualOffset: number = Math.max(-nodeOffset, nodeOffset + userOffset)\n if (shouldIgnoreFirstLine) {\n return this.offsetLinesIgnoreFirst(content, actualOffset, character)\n } else {\n return this.offsetLines(content, actualOffset, character)\n }\n }\n}\n","//\n// StringUtils.ts\n// Pulsar Language\n//\n// Created by Jiri Trecak.\n// Copyright © 2020 Supernova. All rights reserved.\n//\n\nexport class StringUtils {\n /** Returns string without whitespaces and newlines, trimmed left and right */\n public static trimmed(str: string): string {\n return str.trim()\n }\n\n /** Returns string without double quotes, trimmed left and right */\n public static withoutDoubleQuotes(str: string): string {\n return str.replace(/(^\"|\"$)/g, '')\n }\n\n /** Returns string without single and double quotes, trimmed left and right */\n public static withoutQuotes(str: string): string {\n return str.replace(/(^'|'$)/g, '')\n }\n\n /** Returns opening string until the first occurance of the character. If delimiter is not found, returns null */\n public static substringUntilDelimiter(str: string, delimiter: string): string | null {\n let buffer = ''\n for (const c of str) {\n if (c !== delimiter) {\n buffer += c\n } else {\n return buffer\n }\n }\n\n return null\n }\n\n /** Returns whether string is prefixed and suffixed with double quotes */\n public static isSurroundedWithDoubleQuotes(str: string): boolean {\n return str.startsWith('\"') && str.endsWith('\"')\n }\n\n /** Returns substring between two round brackets. Returns null if it doesn't fit the format */\n public static argumentStringBetweenBrackets(str: string, keyword: string): string | null {\n let argument = str\n if (argument.startsWith(keyword)) {\n argument = argument.substr(keyword.length)\n } else {\n // TODO: Rewrite\n // throw NSError(domain: \"\", code: 0, userInfo: [NSLocalizedDescriptionKey: \"String is not valid for keyword \\(keyword)\"])\n return null\n }\n if (argument.startsWith('(') && argument.endsWith(')')) {\n argument = argument.substr(1, argument.length - 2)\n } else {\n // TODO: Rewrite\n // throw NSError(domain: \"\", code: 0, userInfo: [NSLocalizedDescriptionKey: \"Argument must be prefixed with ( and suffixed with )\"])\n return null\n }\n\n return argument\n }\n\n /** Returns substring between two round brackets using syntax-sensitive parsing (ignoring quoted content and properly balancing number of ( ) */\n public static argumentStringBetweenBracketsFirstOccurance(str: string, keyword: string): string | null {\n // This recieves keyword(...)...\n let argument = str\n if (argument.startsWith(keyword)) {\n argument = argument.substr(keyword.length)\n } else {\n // TODO: Rewrite\n // throw NSError(domain: \"\", code: 0, userInfo: [NSLocalizedDescriptionKey: \"String is not valid for keyword \\(keyword)\"])\n return null\n }\n\n // Test if argument starts with (\n if (argument.startsWith('(')) {\n argument = argument.substr(1)\n } else {\n // TODO: Rewrite\n // throw NSError(domain: \"\", code: 0, userInfo: [NSLocalizedDescriptionKey: \"Argument must be prefixed with (\"])\n return null\n }\n\n // At this point, we have ...)... and we start parsing with openedBrackets count at 1\n let buffer = ''\n let lock: string | null = null\n let previousChar: string | null = null\n let openedBrackets: number = 1\n\n for (const c of argument) {\n // Iterate each character, testing for locks\n // Last character escapes so ignore next one\n if (previousChar !== '\\\\') {\n if (lock === c) {\n // Lock pair found, unlock\n lock = null\n } else {\n // Lock character found, but if it was escaped, ignored it\n if (lock === null && (c === \"'\" || c === '\"')) {\n lock = c\n }\n }\n }\n\n // If content is not locked and character is either opening or closing bracket, we increase/decrease the level\n if (lock === null && c === '(') {\n openedBrackets += 1\n } else if (lock === null && c === ')') {\n if (openedBrackets > 0) {\n openedBrackets -= 1\n }\n\n // If we have closed the opening bracket, return the argument content\n if (openedBrackets === 0) {\n return buffer\n }\n }\n previousChar = c\n buffer += c\n }\n\n // TODO: Rewrite\n // throw NSError(domain: \"\", code: 0, userInfo: [NSLocalizedDescriptionKey: \"Argument must be suffixed with )\"])\n return null\n }\n\n /** Returns string without single and double quotes but removes only 1 character at most */\n public static withoutQuotesSingleOccurance(str: string): string {\n let string = str\n if (string.startsWith('\"') || string.startsWith(\"'\")) {\n string = string.substr(1)\n }\n\n if (string.endsWith('\"') || string.endsWith(\"'\")) {\n string = string.substr(0, string.length - 1)\n }\n\n return string\n }\n\n /** Returns string without single and double quotes but removes only 1 character at most */\n public static withoutDoubleQuotesSingleOccurance(str: string): string {\n let string = str\n if (string.startsWith('\"')) {\n string = string.substr(1)\n }\n\n if (string.endsWith('\"')) {\n string = string.substr(0, string.length - 1)\n }\n string = string.replace(/\\\\\"/g, '\"') // unmask quotes\n\n return string\n }\n\n /** Returns string without round brackets, trimmed left and right */\n public static withoutRoundBrackets(str: string): string {\n return str.replace('^[(]+|[)]+$', '')\n }\n\n /** Creates a full range of a string, returning range of (0, length) */\n public static fullRange(str: string): { location: number; length: number } {\n return { location: 0, length: str.length }\n }\n\n /** Creates string made of N spaces */\n public static spaces(count: number): string {\n return ' '.repeat(count)\n }\n\n /** Splits string using separator while properly handling quotes.\n Content inside single or double quote will be ignored. Only content within closed quote pair will be ignored,\n Last single, not closed quote will be ignored. Quote types can't be combined, if the quote pair\n started with one type, it needs to be closed with the same one. There can be multiple types of quote pairs in single string though.\n Returns original string without splitting if separator is single or double quote as this behavior is undefined */\n public static splitIgnoringQuotedContent(str: string, separator: string): Array<string> {\n if (separator === '\"' || separator === \"'\") {\n return [str]\n }\n\n let components: Array<string> = []\n let buffer = ''\n let lock: string | null = null\n let previousChar: string | null = null\n let lastQuotePairPosition: number | null = null\n\n for (let [index, c] of str.split('').entries()) {\n // Iterate each character, testing for locks\n if (c === separator) {\n // Found separator, ignore the split if lock is active, otherwise add word to buffer\n if (lock === null) {\n components.push(buffer)\n buffer = ''\n lastQuotePairPosition = null\n } else {\n buffer += c\n }\n } else {\n // Separator not found\n buffer += c\n\n // Last character escapes so ignore next one\n if (previousChar !== '\\\\') {\n if (lock === c) {\n // Lock pair found, unlock\n lock = null\n lastQuotePairPosition = index\n } else {\n // Lock character found, but if it was escaped, ignored it\n if (lock === null && (c === \"'\" || c === '\"')) {\n lock = c\n }\n }\n }\n // Remove lock assuming last character wasn't escaped\n }\n previousChar = c\n }\n\n // If there is some word, append it\n if (buffer.length > 0) {\n // Note that if the lock was opened but not closed, there is potentially last piece that wasn't split and should be\n // This is an edge case so we are treating it as such.\n // Could be optimized further just by saving whether separator was found inside lock but no need\n if (lock !== null) {\n // Gracefully handle edge case situation where following: \"test \\\"test test\\\"\\\" test\" can happen\n // Another quote is opened after some content with separator inside was ignored, meaning that separation of last buffer will actually result\n // in incorrectly separating content within quotes. So we split only the part after the last quote and prepend the prefix\n if (lastQuotePairPosition) {\n let substring = str.substr(lastQuotePairPosition, str.length - lastQuotePairPosition)\n let subcomponents = substring.split(separator)\n\n // Prepend the string with the unsplit part\n\n if (subcomponents.length > 0) {\n let firstItem = subcomponents[0]\n firstItem = `${buffer.substring(0, buffer.length - substring.length)}${firstItem}`\n subcomponents.splice(0, 1, firstItem)\n }\n\n // Append separated components\n components = components.concat(subcomponents)\n } else {\n components = components.concat(buffer.split(separator))\n }\n } else {\n components.push(buffer)\n }\n }\n\n return components\n }\n\n /** Removes spaces when they are inside of brackets, but properly handling spaces inside quoted content which should remain intact */\n public static withoutSpacesInsideRoundBrackets(str: string): string {\n let bracketCount = 0\n let isInsideQuotes = false\n let previousChar: string | null = null\n let result = ''\n\n for (let char of str) {\n switch (char) {\n case '(':\n if (!isInsideQuotes) {\n bracketCount += 1\n }\n break\n case ')':\n if (!isInsideQuotes) {\n bracketCount -= 1\n }\n break\n case '\"':\n if (previousChar && previousChar === '\\\\') {\n // Escaped quotes do not change \"isInsideQuotes\"\n } else {\n isInsideQuotes = !isInsideQuotes\n }\n break\n default:\n break\n }\n if (char === ' ') {\n if (bracketCount === 0 || isInsideQuotes) {\n result += char\n }\n } else {\n result += char\n }\n\n previousChar = char\n }\n\n return result\n }\n\n /** Splits string using separator while properly handling quotes and ignoring all content that comes in ().\n Content inside single or double quote will be ignored. Only content within closed quote pair will be ignored,\n Last single, not closed quote will be ignored. Quote types can't be combined, if the quote pair\n started with one type, it needs to be closed with the same one. There can be multiple types\n of quote pairs in single string though.\n Returns original string without splitting if separator is single, double quote or left/right bracket as this behavior is undefined */\n public static splitIgnoringQuotedBracketedContent(str: string, separator: string): Array<string> {\n if (\n separator === '\"' ||\n separator === \"'\" ||\n separator === '(' ||\n separator === ')' ||\n separator === '[' ||\n separator === ']'\n ) {\n return [str]\n }\n\n let components: Array<string> = []\n let buffer = ''\n let lock: string | null = null\n let previousChar: string | null = null\n let lastQuotePairPosition: number | null = null\n let openedRoundBrackets: number = 0\n let openedSquareBrackets: number = 0\n\n for (let [index, c] of str.split('').entries()) {\n // Iterate each character, testing for locks\n if (c === separator) {\n // Found separator, ignore the split if lock is active, or ignore the split if inside bracket, otherwise add word to buffer\n if (lock === null && openedSquareBrackets === 0 && openedRoundBrackets === 0) {\n components.push(buffer)\n buffer = ''\n lastQuotePairPosition = null\n } else {\n buffer += c\n }\n } else {\n // Separator not found\n buffer += c\n\n // Last character escapes so ignore next one\n if (previousChar !== '\\\\') {\n if (lock === c) {\n // Lock pair found, unlock\n lock = null\n lastQuotePairPosition = index\n } else {\n // Lock character found, but if it was escaped, ignored it\n if (lock === null && (c === \"'\" || c === '\"')) {\n lock = c\n }\n }\n }\n\n // If content is not locked and character is either opening or closing bracket, we increase/decrease the level\n if (lock === null && c === '(') {\n openedRoundBrackets += 1\n } else if (lock === null && c === ')') {\n if (openedRoundBrackets > 0) {\n openedRoundBrackets -= 1\n }\n } else if (lock === null && c === '[') {\n openedSquareBrackets += 1\n } else if (lock === null && c === ']') {\n if (openedSquareBrackets > 0) {\n openedSquareBrackets -= 1\n }\n }\n }\n previousChar = c\n }\n\n // If there is some word, append it\n if (buffer.length > 0) {\n // Note that if the lock was opened but not closed, there is potentially last piece that wasn't split and should be\n // This is an edge case so we are treating it as such.\n // Could be optimized further just by saving whether separator was found inside lock but no need\n if (lock !== null) {\n // Gracefully handle edge case situation where following: \"test \\\"test test\\\"\\\" test\" can happen\n // Another quote is opened after some content with separator inside was ignored, meaning that separation of last buffer will actually result\n // in incorrectly separating content within quotes. So we split only the part after the last quote and prepend the prefix\n if (lastQuotePairPosition) {\n let substring = str.substr(lastQuotePairPosition, str.length - lastQuotePairPosition)\n let subcomponents = substring.split(separator)\n\n // Prepend the string with the unsplit part\n if (subcomponents.length > 0) {\n let firstItem = subcomponents[0]\n firstItem = `${buffer.substring(0, buffer.length - substring.length)}${firstItem}`\n subcomponents.splice(0, 1, firstItem)\n }\n\n // Append separated components\n components = components.concat(subcomponents)\n } else {\n components = components.concat(buffer.split(separator))\n }\n } else {\n components.push(buffer)\n }\n }\n\n return components\n }\n\n /** Tests whether all characters of the string are lowercased and are only letters a-z */\n public static isLowercaseLetters(str: string): boolean {\n return /^[a-z]+$/.test(str)\n }\n\n /** Tests whether all characters of the string are lowercased and are only letters a-z, including separator dot */\n public static isLowercaseLettersCanIncludeDot(str: string): boolean {\n return /^[a-z.]+$/.test(str)\n }\n\n /** Tests whether all characters of the string are letters */\n public static isLetters(str: string): boolean {\n return /^[a-zA-Z]+$/.test(str)\n }\n\n /** Tests whether all characters of the string are letters, including separator dot */\n public static isLettersCanIncludeDot(str: string): boolean {\n return /^[a-zA-Z.]+$/.test(str)\n }\n\n /** Tests whether the first character of the string is lowercase */\n public static isFirstCharacterLetterLowercase(str: string): boolean {\n if (str.length === 0) {\n return false\n }\n\n return str[0].toLowerCase() === str[0]\n }\n\n /** Tests whether all characters of the string are spaces */\n public static isOnlySpaces(str: string): boolean {\n return /^[ ]+$/.test(str)\n }\n\n /** Tests whether all characters of the string are spaces or newlines */\n public static isOnlySpacesOrLineBreaks(str: string): boolean {\n return /^\\s*$/.test(str)\n }\n\n /** Tests whether string represents array definition - starts with [, ends with ]\n * and doesn't contain : unless in double quotes\n */\n public static isStructuralArrayDefinition(str: string): boolean {\n let trimmed = str.trim()\n if (trimmed.startsWith('[') && trimmed.endsWith(']') && str.indexOf(':') === -1) {\n return true\n }\n\n return false\n }\n\n /** Parses array if it is structuraly viable and retrieves array components */\n public static parsedArrayFromDefinition(str: string): Array<string> | null {\n let workingString = str\n if (!this.isStructuralArrayDefinition(str)) {\n return null\n }\n\n // Clear the array definition\n // Remove first and last symbol ([])\n workingString = workingString.trim().substr(1, workingString.length - 2)\n\n // Split array with \",\"\n let components = this.splitIgnoringQuotedBracketedContent(workingString, ',')\n return components\n }\n\n /** Tests whether string represents dictionary definition - starts with [, ends with ]\n * and contains at least once :\n */\n public static isStructuralDictionaryDefinition(str: string): boolean {\n // TODO: Test this properly, only find definitions that don't have : inside quotes\n let trimmed = str.trim()\n if (trimmed.startsWith('[') && trimmed.endsWith(']') && str.indexOf(':') !== -1) {\n return true\n }\n\n return false\n }\n\n /** Parses array if it is structuraly viable and retrieves array components */\n public static parsedDictionaryFromDefinition(str: string): Map<string, string> | null {\n let workingString = str\n if (!this.isStructuralDictionaryDefinition(str)) {\n return null\n }\n\n // Clear the array\n workingString = workingString.trim()\n\n // Remove first and last symbol ([])\n workingString.substr(1, workingString.length - 2)\n\n // Test whether the remaining string isn't just :. If so, it means we are creating empty dictionary\n if (workingString === ':') {\n return new Map<string, string>()\n }\n\n // Split dictionary key-value pairs with \",\"\n let components = this.splitIgnoringQuotedBracketedContent(workingString, ',')\n\n // Split keys and values. Format MUST be [key] : [value], otherwise we fail\n let map = new Map<string, string>()\n for (let component of components) {\n let pair = this.splitIgnoringQuotedContent(component, ':')\n if (pair.length === 2) {\n // Add the data\n map.set(pair[0], pair[1])\n } else {\n // Format is wrong\n return null\n }\n }\n\n return map\n }\n\n public static replaceAll(str: string, find: string, replace: string) {\n return str.replace(new RegExp(this.escapeRegExp(find), 'g'), replace)\n }\n\n public static escapeRegExp(string: string) {\n return string.replace(/[.*+\\-?^${}()|[\\]\\\\]/g, '\\\\$&')\n }\n}\n","module.exports = require(\"axios\");;","module.exports = require(\"fs\");;","module.exports = require(\"jszip\");;","module.exports = require(\"lodash\");;","module.exports = require(\"lodash/fp\");;","module.exports = require(\"moment\");;","module.exports = require(\"parse-github-url\");;","module.exports = require(\"path\");;","module.exports = require(\"ts-dedent\");;","module.exports = require(\"util\");;","module.exports = require(\"uuid\");;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/exports.ts\");\n"],"sourceRoot":""}
|