@r_masseater/song-format 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/als-to-fumx.mjs +3 -3
  2. package/dist/als-to-fumx.mjs.map +1 -1
  3. package/dist/convert-als.mjs +1 -1
  4. package/dist/convert-als.mjs.map +1 -1
  5. package/dist/fumx-language-server.mjs +18 -2
  6. package/dist/fumx-language-server.mjs.map +1 -1
  7. package/dist/{fumx-module-CqxUe07y.mjs → fumx-module-BxN-liut.mjs} +27 -4
  8. package/dist/fumx-module-BxN-liut.mjs.map +1 -0
  9. package/dist/{fumx-module-CtXvLKU1.mjs → fumx-module-C1v5AGSG.mjs} +26 -3
  10. package/dist/fumx-module-C1v5AGSG.mjs.map +1 -0
  11. package/dist/index.mjs +1 -1
  12. package/dist/language.mjs +1 -1
  13. package/dist/mapper.mjs +1 -1
  14. package/dist/midi-to-fumx.mjs +2 -2
  15. package/dist/package-Ck3ET08d.mjs +37 -0
  16. package/dist/package-Ck3ET08d.mjs.map +1 -0
  17. package/dist/{read-song-BzqX5MuZ.mjs → read-song-C7MGcv8n.mjs} +11 -5
  18. package/dist/read-song-C7MGcv8n.mjs.map +1 -0
  19. package/dist/{read-song-CzMPm8u8.mjs → read-song-CmIfnGfX.mjs} +11 -5
  20. package/dist/read-song-CmIfnGfX.mjs.map +1 -0
  21. package/dist/{round-trip-Cz8iQlpW.mjs → round-trip-DIqLFW0h.mjs} +7 -7
  22. package/dist/round-trip-DIqLFW0h.mjs.map +1 -0
  23. package/dist/song-report.mjs +5 -5
  24. package/dist/song-report.mjs.map +1 -1
  25. package/dist/{transform-BoSDqqPW.mjs → transform-CEJ9wvbl.mjs} +2 -2
  26. package/dist/{transform-BoSDqqPW.mjs.map → transform-CEJ9wvbl.mjs.map} +1 -1
  27. package/dist/vite.mjs +2 -2
  28. package/package.json +3 -3
  29. package/dist/fumx-module-CqxUe07y.mjs.map +0 -1
  30. package/dist/fumx-module-CtXvLKU1.mjs.map +0 -1
  31. package/dist/read-song-BzqX5MuZ.mjs.map +0 -1
  32. package/dist/read-song-CzMPm8u8.mjs.map +0 -1
  33. package/dist/round-trip-Cz8iQlpW.mjs.map +0 -1
  34. package/dist/run-main-Bf32CgzU.mjs +0 -26
  35. package/dist/run-main-Bf32CgzU.mjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { $ as isWhile, A as isLet, B as isRepeat, C as isGateLength, D as isImportedSymbol, E as isImport, F as isPlayParam, G as isSong, H as isReturn, I as isPlugin, J as isTie, K as isSounding, L as isPluginEffect, M as isMaster, N as isNudge, O as isInstrument, P as isParam, Q as isVoiceLine, R as isPluginUse, S as isFor, T as isIf, U as isRole, V as isRest, W as isSample, X as isTypeRef, Y as isTrack, Z as isVelocity, _ as isEach, a as isAssign, b as isFade, c as isBend, d as isComputed, et as isWith, f as isControlHold, g as isDuck, h as isDelay, i as isArticulation, j as isLyric, k as isKit, l as isBinding, m as isDeclaration, n as FumxAstReflection, o as isAutomation, p as isControlLine, q as isTempoLine, s as isBar, t as FumxGrammar, u as isBus, v as isEvery, w as isGroove, x as isFn, y as isExpression, z as isReleaseVelocity } from "./grammar-86_uhiTo.mjs";
2
2
  import { a as groupsOf, i as ticksOf, n as fractionOf, r as partsOf, t as TICKS_PER_WHOLE } from "./ticks-CXehHP2w.mjs";
3
3
  import { Array, Match, Option, Predicate, Record, String as String$1, pipe } from "effect";
4
- import { AstUtils, DefaultScopeProvider, EmptyFileSystem, StreamScope, UriUtils, createDefaultCoreModule, createDefaultSharedCoreModule, inject, isReference } from "langium";
4
+ import { AstUtils, DefaultLexerErrorMessageProvider, DefaultScopeProvider, EmptyFileSystem, LangiumParserErrorMessageProvider, StreamScope, UriUtils, createDefaultCoreModule, createDefaultSharedCoreModule, inject, isReference } from "langium";
5
5
  import { Note } from "tonal";
6
6
  // generated/langium/module.ts
7
7
  const FumxLanguageMetaData = {
@@ -2605,6 +2605,29 @@ const compileSong = (song) => {
2605
2605
  ]
2606
2606
  };
2607
2607
  };
2608
+ // src/features/read-song/model/syntax-messages.ts
2609
+ const unexpected = (actual) => pipe(Array.head(actual), Option.map((token) => token.image), Option.filter(String$1.isNonEmpty), Option.match({
2610
+ onNone: () => "Unexpected end of file.",
2611
+ onSome: (image) => `Unexpected \`${image}\`.`
2612
+ }));
2613
+ const SyntaxMessagesModule = { parser: {
2614
+ ParserErrorMessageProvider: () => {
2615
+ const langium = new LangiumParserErrorMessageProvider();
2616
+ return {
2617
+ buildMismatchTokenMessage: (options) => langium.buildMismatchTokenMessage(options),
2618
+ buildNotAllInputParsedMessage: (options) => langium.buildNotAllInputParsedMessage(options),
2619
+ buildNoViableAltMessage: ({ actual }) => unexpected(actual),
2620
+ buildEarlyExitMessage: ({ actual }) => unexpected(actual)
2621
+ };
2622
+ },
2623
+ LexerErrorMessageProvider: () => {
2624
+ const langium = new DefaultLexerErrorMessageProvider();
2625
+ return {
2626
+ buildUnexpectedCharactersMessage: (fullText, startOffset, length) => `Unexpected character \`${String$1.slice(startOffset, startOffset + length)(fullText)}\`.`,
2627
+ buildUnableToPopLexerModeMessage: (token) => langium.buildUnableToPopLexerModeMessage(token)
2628
+ };
2629
+ }
2630
+ } };
2608
2631
  // src/features/read-song/model/fumx-module.ts
2609
2632
  const FumxModule = { references: { ScopeProvider: scopeProviderOf } };
2610
2633
  const registerChecks = (fumx) => {
@@ -2619,7 +2642,7 @@ const registerChecks = (fumx) => {
2619
2642
  };
2620
2643
  const createFumxServices = () => {
2621
2644
  const shared = inject(createDefaultSharedCoreModule(EmptyFileSystem), FumxGeneratedSharedModule);
2622
- const fumx = inject(createDefaultCoreModule({ shared }), FumxGeneratedModule, FumxModule);
2645
+ const fumx = inject(createDefaultCoreModule({ shared }), FumxGeneratedModule, FumxModule, SyntaxMessagesModule);
2623
2646
  shared.ServiceRegistry.register(fumx);
2624
2647
  registerChecks(fumx);
2625
2648
  return {
@@ -2629,4 +2652,4 @@ const createFumxServices = () => {
2629
2652
  };
2630
2653
  export { importedUriOf as a, FumxGeneratedSharedModule as c, compileSong as i, FumxLanguageMetaData as l, createFumxServices as n, isNamed as o, registerChecks as r, FumxGeneratedModule as s, FumxModule as t };
2631
2654
 
2632
- //# sourceMappingURL=fumx-module-CtXvLKU1.mjs.map
2655
+ //# sourceMappingURL=fumx-module-C1v5AGSG.mjs.map