@holoscript/core 8.0.12 → 8.0.14
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/README.md +14 -0
- package/bin/holo-decision.mjs +133 -0
- package/dist/{GLTFPipeline-L76YTXKA.js → GLTFPipeline-6LS3UDYX.js} +6 -6
- package/dist/{GLTFPipeline-ZWJN7GI6.cjs → GLTFPipeline-VTI6PRRQ.cjs} +10 -10
- package/dist/{HoloCompositionParser-FLBZKFD3.js → HoloCompositionParser-GILABNN3.js} +5 -5
- package/dist/{HoloCompositionParser-3XEC7IJC.cjs → HoloCompositionParser-ZVRYVEA5.cjs} +12 -12
- package/dist/{HoloScriptPlusParser-RNUCHOAJ.cjs → HoloScriptPlusParser-WTPRPRPR.cjs} +8 -8
- package/dist/{HoloScriptPlusParser-55AY4MUF.js → HoloScriptPlusParser-ZP53ECSL.js} +5 -5
- package/dist/{SceneIRCompiler-KWUFHZ4O.cjs → SceneIRCompiler-7KQ5NKAU.cjs} +11 -11
- package/dist/{SceneIRCompiler-63KA3M2F.js → SceneIRCompiler-VX75RB6H.js} +6 -6
- package/dist/{chunk-EM2OGPYE.js → chunk-2GKF7JQ6.js} +3 -3
- package/dist/{chunk-HVX7QQYK.js → chunk-3KHRZTNW.js} +3 -3
- package/dist/{chunk-UTUD6GJI.js → chunk-42Z3SVHQ.js} +3 -3
- package/dist/{chunk-Z4IUBW46.js → chunk-47XZ62KM.js} +112 -55
- package/dist/{chunk-GGR7QUKK.cjs → chunk-4CRMVEON.cjs} +37 -37
- package/dist/{chunk-QBY7LRN2.js → chunk-4NEPHK2K.js} +3 -3
- package/dist/{chunk-65S62L4D.cjs → chunk-5B2AJKA5.cjs} +20 -20
- package/dist/{chunk-PJFTTSKE.js → chunk-5T6BWIB7.js} +4 -4
- package/dist/{chunk-KFVNCW4Q.js → chunk-62OYZT6Q.js} +3 -3
- package/dist/{chunk-3KMANSQJ.cjs → chunk-645EWDZW.cjs} +4 -4
- package/dist/{chunk-BP4KTMLY.js → chunk-6FCNMTL5.js} +4 -4
- package/dist/{chunk-77QI552M.js → chunk-73EDVY5D.js} +3 -3
- package/dist/{chunk-7IDJDMPU.cjs → chunk-7FYSSI3C.cjs} +27 -2
- package/dist/{chunk-WNYXT4TE.cjs → chunk-7ITJP33Q.cjs} +3 -3
- package/dist/chunk-7ZKQ32XK.js +1571 -0
- package/dist/{chunk-P7JEKJTZ.cjs → chunk-B6JHTTMR.cjs} +25 -14
- package/dist/{chunk-FG6PYGIZ.js → chunk-BLCWQ225.js} +4 -4
- package/dist/{chunk-7NPZZZD7.js → chunk-C73GVAYC.js} +16 -9
- package/dist/{chunk-RMOEL2GD.cjs → chunk-CESMPUEZ.cjs} +3794 -1137
- package/dist/{chunk-SQXAZHDG.js → chunk-CHIZSMWD.js} +3 -3
- package/dist/{chunk-G35CAQ7I.cjs → chunk-D44CEFY4.cjs} +5 -5
- package/dist/chunk-ERYKKPHW.cjs +1884 -0
- package/dist/{chunk-TYNRXRHF.js → chunk-EYHPTJ3F.js} +3695 -1045
- package/dist/{chunk-J3UHV5T4.cjs → chunk-FGXJPJ3W.cjs} +4 -4
- package/dist/{chunk-IJU6AS67.cjs → chunk-FHR2AVMA.cjs} +23 -23
- package/dist/{chunk-LMB555QB.cjs → chunk-FOM36K5I.cjs} +18 -18
- package/dist/{chunk-JBYBMBMW.js → chunk-FWKEY4LD.js} +3 -2
- package/dist/{chunk-ZRPALBQB.cjs → chunk-GGH3ZYDB.cjs} +5 -5
- package/dist/{chunk-2BYAUHBO.js → chunk-GI5YYZH6.js} +3 -3
- package/dist/{chunk-VTEXJOSD.cjs → chunk-GYJLP4BO.cjs} +30 -30
- package/dist/{chunk-OC6GV5QH.cjs → chunk-HCONR4J6.cjs} +38 -38
- package/dist/{chunk-B3CWTCK2.js → chunk-IA7FCSRY.js} +27 -2
- package/dist/{chunk-5FYMCVBY.js → chunk-IXFNA5TT.js} +4 -4
- package/dist/{chunk-G6KACNMO.js → chunk-JCVSCKUH.js} +4 -4
- package/dist/{chunk-FHVPN7BN.js → chunk-JQCXLKAU.js} +3 -3
- package/dist/{chunk-F3YT6GUF.cjs → chunk-KLM6QD6D.cjs} +14 -14
- package/dist/{chunk-UGQ3QNV6.js → chunk-KOGPVAP6.js} +24 -8
- package/dist/{chunk-CKV5NYAE.js → chunk-KYJD2UMV.js} +4 -4
- package/dist/{chunk-LB3ZZMKT.cjs → chunk-L4DBUX3N.cjs} +10 -10
- package/dist/{chunk-RXQNRZ5F.js → chunk-LGRKBTPM.js} +3 -3
- package/dist/{chunk-OMNHTCS4.cjs → chunk-LHUDAJQT.cjs} +3 -2
- package/dist/{chunk-PDXX5UI4.cjs → chunk-LQNL3IYV.cjs} +38 -38
- package/dist/{chunk-WWNCM473.js → chunk-M7XR3F53.js} +4 -4
- package/dist/{chunk-IFW5IW4L.cjs → chunk-ML4V5PVU.cjs} +670 -627
- package/dist/{chunk-656IAS7B.cjs → chunk-N7IYRAFG.cjs} +21 -14
- package/dist/chunk-N7MIIDLI.cjs +1605 -0
- package/dist/{chunk-USOUXQYD.js → chunk-NWKARJM2.js} +130 -22
- package/dist/{chunk-VVAAZITA.cjs → chunk-OOP4S3GU.cjs} +5 -5
- package/dist/{chunk-TX6ZBIF4.js → chunk-ORBVCOTC.js} +3 -3
- package/dist/{chunk-RRQIAJLQ.cjs → chunk-OSKGCXAQ.cjs} +5 -5
- package/dist/{chunk-QEDMOGF3.cjs → chunk-P65OIMJT.cjs} +7 -7
- package/dist/{chunk-QM7FJB5W.js → chunk-PSWCJQS4.js} +4 -4
- package/dist/{chunk-7N63JHUN.cjs → chunk-PZ46WRHX.cjs} +8 -8
- package/dist/{chunk-AATYYLYK.js → chunk-Q4J2K7FI.js} +16 -5
- package/dist/chunk-QLPRI3QW.js +1875 -0
- package/dist/{chunk-WTH23ISI.js → chunk-R5VKLUMR.js} +4 -4
- package/dist/{chunk-NQN5LFN4.cjs → chunk-REN3LHO6.cjs} +19 -19
- package/dist/{chunk-JEJ7TT54.js → chunk-RVN7OPCP.js} +4 -4
- package/dist/{chunk-ZK7KX5CD.cjs → chunk-SE2Y5BSL.cjs} +6 -6
- package/dist/{chunk-2X3IPCBK.cjs → chunk-SKVBUGMC.cjs} +7 -7
- package/dist/{chunk-GZPUA2TL.cjs → chunk-SNMQUWIO.cjs} +10 -10
- package/dist/{chunk-OIBRWLPY.cjs → chunk-TKDDIE3T.cjs} +54 -3
- package/dist/{chunk-5H5GFBMG.cjs → chunk-TMNAKNV2.cjs} +112 -55
- package/dist/{chunk-5LVFTGKH.js → chunk-TZQKJOPC.js} +3 -3
- package/dist/{chunk-TSTFYGGX.js → chunk-UKEK2NZJ.js} +3 -3
- package/dist/{chunk-3IUHTGDD.cjs → chunk-VA7THINF.cjs} +38 -38
- package/dist/{chunk-Z557DVYN.js → chunk-VMCR5QVI.js} +4 -4
- package/dist/{chunk-IS7NTKY5.cjs → chunk-VTFLKSJL.cjs} +14 -14
- package/dist/{chunk-VO52AJD5.js → chunk-VXHB6ZHY.js} +4 -4
- package/dist/{chunk-S4O7CFHQ.cjs → chunk-VZI7S7P6.cjs} +7 -7
- package/dist/{chunk-BQJ3YBF3.js → chunk-W4AJMMQR.js} +667 -628
- package/dist/{chunk-2KKOYZYI.cjs → chunk-XZC75AJ4.cjs} +5 -5
- package/dist/{chunk-FWCHPCD4.js → chunk-Y2OCKXVD.js} +4 -4
- package/dist/{chunk-EI5G5JLY.cjs → chunk-YBM34FUJ.cjs} +134 -22
- package/dist/{chunk-DUG3OQAS.js → chunk-YDSNDCV3.js} +3 -3
- package/dist/{chunk-566ZB4LZ.cjs → chunk-YM7UUYR5.cjs} +5 -5
- package/dist/{chunk-BCP4E7MD.cjs → chunk-YMI3ED3B.cjs} +26 -10
- package/dist/{chunk-CP7V3ATL.js → chunk-Z7NUL73U.js} +51 -4
- package/dist/cli/holoscript-runner.cjs +11 -11
- package/dist/cli/holoscript-runner.js +4 -4
- package/dist/compiler/agent-inference.cjs +8 -8
- package/dist/compiler/agent-inference.js +4 -4
- package/dist/compiler/android-xr.cjs +7 -7
- package/dist/compiler/android-xr.js +5 -5
- package/dist/compiler/android.cjs +6 -6
- package/dist/compiler/android.js +4 -4
- package/dist/compiler/context.cjs +6 -6
- package/dist/compiler/context.js +3 -3
- package/dist/compiler/daimon-seed.cjs +9 -9
- package/dist/compiler/daimon-seed.js +4 -4
- package/dist/compiler/domain-block-utils.cjs +165 -165
- package/dist/compiler/domain-block-utils.js +4 -4
- package/dist/compiler/dtdl.cjs +7 -7
- package/dist/compiler/dtdl.js +4 -4
- package/dist/compiler/gltf-pipeline.cjs +8 -8
- package/dist/compiler/gltf-pipeline.js +1 -1
- package/dist/compiler/godot.cjs +6 -6
- package/dist/compiler/godot.js +5 -5
- package/dist/compiler/incremental.cjs +8 -8
- package/dist/compiler/incremental.js +3 -3
- package/dist/compiler/index.cjs +871 -207
- package/dist/compiler/index.d.ts +21 -1
- package/dist/compiler/index.js +696 -60
- package/dist/compiler/ios.cjs +6 -6
- package/dist/compiler/ios.js +4 -4
- package/dist/compiler/llm-provider-capabilities.cjs +6 -6
- package/dist/compiler/llm-provider-capabilities.js +3 -3
- package/dist/compiler/openxr.cjs +6 -6
- package/dist/compiler/openxr.js +5 -5
- package/dist/compiler/sdf.cjs +7 -7
- package/dist/compiler/sdf.js +5 -5
- package/dist/compiler/state.cjs +6 -6
- package/dist/compiler/state.js +4 -4
- package/dist/compiler/trait-composition.cjs +7 -7
- package/dist/compiler/trait-composition.js +3 -3
- package/dist/compiler/unity.cjs +6 -6
- package/dist/compiler/unity.js +5 -5
- package/dist/compiler/unreal.cjs +7 -7
- package/dist/compiler/unreal.js +5 -5
- package/dist/compiler/urdf.cjs +14 -14
- package/dist/compiler/urdf.js +5 -5
- package/dist/compiler/usd-physics.cjs +7 -7
- package/dist/compiler/usd-physics.js +4 -4
- package/dist/compiler/visionos.cjs +6 -6
- package/dist/compiler/visionos.js +5 -5
- package/dist/compiler/vrchat.cjs +7 -7
- package/dist/compiler/vrchat.js +5 -5
- package/dist/compiler/wasm.cjs +10 -10
- package/dist/compiler/wasm.js +5 -5
- package/dist/compiler/webgpu.cjs +6 -6
- package/dist/compiler/webgpu.js +5 -5
- package/dist/constants.cjs +3 -3
- package/dist/constants.js +1 -1
- package/dist/entries/scripting.cjs +6 -6
- package/dist/entries/scripting.js +2 -2
- package/dist/evolution/index.cjs +21 -17
- package/dist/evolution/index.d.ts +9 -0
- package/dist/evolution/index.js +6 -6
- package/dist/index.cjs +930 -703
- package/dist/index.d.ts +70 -5
- package/dist/index.js +192 -109
- package/dist/parser.cjs +19 -19
- package/dist/parser.js +5 -5
- package/dist/reconstruction/index.cjs +127 -38
- package/dist/reconstruction/index.d.ts +159 -0
- package/dist/reconstruction/index.js +11 -2
- package/dist/runtime.d.ts +1 -0
- package/dist/traitDocs/traitDocs.cjs +8 -8
- package/dist/traitDocs/traitDocs.js +2 -2
- package/dist/traits/index.cjs +566 -471
- package/dist/traits/index.js +93 -11
- package/package.json +25 -41
- package/dist/chunk-G3BM3CT4.cjs +0 -639
- package/dist/chunk-KEYG7HGY.js +0 -1062
- package/dist/chunk-QX34ELJ7.js +0 -625
- package/dist/chunk-W2GA3EQB.cjs +0 -1065
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkP65OIMJT_cjs = require('./chunk-P65OIMJT.cjs');
|
|
4
|
+
var chunkSE2Y5BSL_cjs = require('./chunk-SE2Y5BSL.cjs');
|
|
5
5
|
var chunkZHPMP447_cjs = require('./chunk-ZHPMP447.cjs');
|
|
6
6
|
var ans = require('@holoscript/core-types/ans');
|
|
7
7
|
|
|
@@ -205,9 +205,9 @@ function generateControllersYaml(robotName, jointNames, options) {
|
|
|
205
205
|
exports.URDFCompiler = void 0; exports.URDFCompiler_default = void 0;
|
|
206
206
|
var init_URDFCompiler = chunkZHPMP447_cjs.__esm({
|
|
207
207
|
"src/compiler/URDFCompiler.ts"() {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
exports.URDFCompiler = class extends
|
|
208
|
+
chunkSE2Y5BSL_cjs.init_CompilerBase();
|
|
209
|
+
chunkP65OIMJT_cjs.init_DomainBlockCompilerMixin();
|
|
210
|
+
exports.URDFCompiler = class extends chunkSE2Y5BSL_cjs.CompilerBase {
|
|
211
211
|
constructor(options = {}) {
|
|
212
212
|
super();
|
|
213
213
|
this.compilerName = "URDFCompiler";
|
|
@@ -572,11 +572,11 @@ var init_URDFCompiler = chunkZHPMP447_cjs.__esm({
|
|
|
572
572
|
if (domainBlocks.length === 0) return;
|
|
573
573
|
this.emitBlank();
|
|
574
574
|
this.emit("<!-- v4.2 Domain Blocks -->");
|
|
575
|
-
const compiled =
|
|
575
|
+
const compiled = chunkP65OIMJT_cjs.compileDomainBlocks(
|
|
576
576
|
domainBlocks,
|
|
577
577
|
{
|
|
578
578
|
material: (block) => {
|
|
579
|
-
const mat =
|
|
579
|
+
const mat = chunkP65OIMJT_cjs.compileMaterialBlock(block);
|
|
580
580
|
const lines = [];
|
|
581
581
|
lines.push(
|
|
582
582
|
`<material name="${this.escapeStringValue(mat.name, "TypeScript")}">`
|
|
@@ -597,15 +597,15 @@ var init_URDFCompiler = chunkZHPMP447_cjs.__esm({
|
|
|
597
597
|
return lines.join("\n");
|
|
598
598
|
},
|
|
599
599
|
physics: (block) => {
|
|
600
|
-
const phys =
|
|
601
|
-
return
|
|
600
|
+
const phys = chunkP65OIMJT_cjs.compilePhysicsBlock(block);
|
|
601
|
+
return chunkP65OIMJT_cjs.physicsToURDF(phys);
|
|
602
602
|
},
|
|
603
603
|
audio: (block) => {
|
|
604
|
-
const audio =
|
|
604
|
+
const audio = chunkP65OIMJT_cjs.compileAudioSourceBlock(block);
|
|
605
605
|
return `<!-- Audio: ${this.escapeStringValue(audio.name, "TypeScript")} (${audio.keyword}) clip="${audio.properties.clip || ""}" volume="${audio.properties.volume ?? 1}" -->`;
|
|
606
606
|
},
|
|
607
607
|
weather: (block) => {
|
|
608
|
-
const weather =
|
|
608
|
+
const weather = chunkP65OIMJT_cjs.compileWeatherBlock(block);
|
|
609
609
|
return `<!-- Weather: ${weather.keyword} "${weather.name || ""}" layers: ${weather.layers.map((l) => l.type).join(", ")} -->`;
|
|
610
610
|
}
|
|
611
611
|
},
|
|
@@ -777,17 +777,28 @@ var init_URDFCompiler = chunkZHPMP447_cjs.__esm({
|
|
|
777
777
|
inertia: { ixx: 1e-3, ixy: 0, ixz: 0, iyy: 1e-3, iyz: 0, izz: 1e-3 }
|
|
778
778
|
}
|
|
779
779
|
});
|
|
780
|
+
const groupPos = group.properties?.find((p) => p.key === "position")?.value;
|
|
781
|
+
const [gx, gy, gz] = Array.isArray(groupPos) ? groupPos : [0, 0, 0];
|
|
780
782
|
this.joints.push({
|
|
781
783
|
name: `${parentLink}_to_${groupLinkName}_joint`,
|
|
782
784
|
type: "fixed",
|
|
783
785
|
parent: parentLink,
|
|
784
|
-
child: groupLinkName
|
|
786
|
+
child: groupLinkName,
|
|
787
|
+
origin: {
|
|
788
|
+
xyz: [gx, gy, gz],
|
|
789
|
+
rpy: [0, 0, 0]
|
|
790
|
+
}
|
|
785
791
|
});
|
|
786
792
|
if (group.objects) {
|
|
787
793
|
for (const obj of group.objects) {
|
|
788
794
|
this.processObject(obj, groupLinkName, actuatedJoints);
|
|
789
795
|
}
|
|
790
796
|
}
|
|
797
|
+
if (group.groups) {
|
|
798
|
+
for (const sub of group.groups) {
|
|
799
|
+
this.processSpatialGroup(sub, groupLinkName, actuatedJoints);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
791
802
|
}
|
|
792
803
|
/** Process @sensor trait into sensor definition */
|
|
793
804
|
processSensorTrait(config, parentLink) {
|
|
@@ -1417,5 +1428,5 @@ exports.createURDFCompiler = createURDFCompiler;
|
|
|
1417
1428
|
exports.generateControllersYaml = generateControllersYaml;
|
|
1418
1429
|
exports.generateROS2LaunchFile = generateROS2LaunchFile;
|
|
1419
1430
|
exports.init_URDFCompiler = init_URDFCompiler;
|
|
1420
|
-
//# sourceMappingURL=chunk-
|
|
1421
|
-
//# sourceMappingURL=chunk-
|
|
1431
|
+
//# sourceMappingURL=chunk-B6JHTTMR.cjs.map
|
|
1432
|
+
//# sourceMappingURL=chunk-B6JHTTMR.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, physicsToURDF, compileMaterialBlock, materialToUSD } from './chunk-
|
|
2
|
-
import { init_CompilerBase, CompilerBase } from './chunk-
|
|
1
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, physicsToURDF, compileMaterialBlock, materialToUSD } from './chunk-TZQKJOPC.js';
|
|
2
|
+
import { init_CompilerBase, CompilerBase } from './chunk-YDSNDCV3.js';
|
|
3
3
|
import { ANSCapabilityPath } from '@holoscript/core-types/ans';
|
|
4
4
|
|
|
5
5
|
// src/compiler/USDPhysicsCompiler.ts
|
|
@@ -886,5 +886,5 @@ function compileForIsaacSim(composition, options) {
|
|
|
886
886
|
}
|
|
887
887
|
|
|
888
888
|
export { USDPhysicsCompiler, compileForIsaacSim, compileToUSDPhysics };
|
|
889
|
-
//# sourceMappingURL=chunk-
|
|
890
|
-
//# sourceMappingURL=chunk-
|
|
889
|
+
//# sourceMappingURL=chunk-BLCWQ225.js.map
|
|
890
|
+
//# sourceMappingURL=chunk-BLCWQ225.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ErrorRecovery, generateQuickFixes, enrichErrorWithSuggestions } from './chunk-
|
|
1
|
+
import { ErrorRecovery, generateQuickFixes, enrichErrorWithSuggestions, RUNTIME_DIRECTIVE_TRAITS } from './chunk-Z7NUL73U.js';
|
|
2
2
|
import { isBrainKeyword, isCognitiveVerb, nearestCognitiveVerb } from './chunk-UNMVGZVW.js';
|
|
3
|
-
import { LIFECYCLE_HOOKS, STRUCTURAL_DIRECTIVES } from './chunk-
|
|
3
|
+
import { LIFECYCLE_HOOKS, STRUCTURAL_DIRECTIVES } from './chunk-FWKEY4LD.js';
|
|
4
4
|
import { VR_TRAITS } from './chunk-2EGGAZT3.js';
|
|
5
5
|
import { isLocomotionReactionTrigger } from './chunk-63AUAIL6.js';
|
|
6
6
|
import * as crypto from 'crypto';
|
|
@@ -2969,7 +2969,7 @@ var HoloScriptPlusParser = class _HoloScriptPlusParser {
|
|
|
2969
2969
|
let body = "";
|
|
2970
2970
|
if (this.check("ARROW")) {
|
|
2971
2971
|
this.advance();
|
|
2972
|
-
body = this.parseInlineExpression();
|
|
2972
|
+
body = this.check("LBRACE") ? this.parseCodeBlock() : this.parseInlineExpression();
|
|
2973
2973
|
} else if (this.check("LBRACE")) {
|
|
2974
2974
|
body = this.parseCodeBlock();
|
|
2975
2975
|
}
|
|
@@ -3271,10 +3271,13 @@ var HoloScriptPlusParser = class _HoloScriptPlusParser {
|
|
|
3271
3271
|
const config2 = this.check("LBRACE") ? this.parseBlockContent() : this.parseTraitConfig();
|
|
3272
3272
|
return { ...config2, type: name, name: nodeName };
|
|
3273
3273
|
}
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3274
|
+
const isKnownRuntimeDirective = RUNTIME_DIRECTIVE_TRAITS.includes(name);
|
|
3275
|
+
if (!isKnownRuntimeDirective) {
|
|
3276
|
+
if (this.options.strict) {
|
|
3277
|
+
this.traitError(name);
|
|
3278
|
+
} else {
|
|
3279
|
+
this.warn(`Unknown directive @${name}`);
|
|
3280
|
+
}
|
|
3278
3281
|
}
|
|
3279
3282
|
let config = {};
|
|
3280
3283
|
let configStyle = "none";
|
|
@@ -3293,6 +3296,10 @@ var HoloScriptPlusParser = class _HoloScriptPlusParser {
|
|
|
3293
3296
|
config.body = this.parseCodeBlock();
|
|
3294
3297
|
}
|
|
3295
3298
|
}
|
|
3299
|
+
if (this.check("ARROW")) {
|
|
3300
|
+
this.advance();
|
|
3301
|
+
config.body = this.check("LBRACE") ? this.parseCodeBlock() : this.parseInlineExpression();
|
|
3302
|
+
}
|
|
3296
3303
|
const directive = { type: "trait", name, config };
|
|
3297
3304
|
if (configStyle === "block") {
|
|
3298
3305
|
this.markBlockConfigDirective(directive, nameToken);
|
|
@@ -6247,5 +6254,5 @@ function parse(source, options) {
|
|
|
6247
6254
|
}
|
|
6248
6255
|
|
|
6249
6256
|
export { ChunkBasedIncrementalParser, HSPLUS_ERROR_CODES, HoloScriptPlusParser, ParseCache, createKeywordError, createParser, createRichError, createTraitError, findSimilarKeyword, findSimilarTrait, formatRichError, formatRichErrors, getErrorCodeDocumentation, getSourceContext, globalParseCache, parse, parseIncrementalChunks };
|
|
6250
|
-
//# sourceMappingURL=chunk-
|
|
6251
|
-
//# sourceMappingURL=chunk-
|
|
6257
|
+
//# sourceMappingURL=chunk-C73GVAYC.js.map
|
|
6258
|
+
//# sourceMappingURL=chunk-C73GVAYC.js.map
|