Skip to content

Commit

Permalink
add symbols file for Macaulay2Web
Browse files Browse the repository at this point in the history
  • Loading branch information
pzinn authored and d-torrance committed Sep 12, 2024
1 parent 9d1e0c2 commit 415df96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions M2/Macaulay2/editors/Macaulay2Web/M2-symbols.ts.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default [@M2SYMBOLS@];
10 changes: 10 additions & 0 deletions M2/Macaulay2/editors/make-M2-symbols.m2
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ symbolsForTextMate = template -> (
output = replace("@M2CONSTANTS@", demark("|", CONSTANTS), output);
output)

symbolsForMacaulay2Web = template -> (
output := concatenate("// ", banner, newline, newline, template);
output = replace("@M2VERSION@", version#"VERSION", output);
output = replace("@M2SYMBOLS@", demark(",", format \ SYMBOLS), output);
output)

-------------------------------------------------------------------------------
-- Generate syntax files from templates in the same directory

Expand Down Expand Up @@ -187,6 +193,10 @@ generateGrammar("highlightjs/macaulay2.js", symbolsForHighlightJS)

generateGrammar("textmate/macaulay2.tmLanguage.json", symbolsForTextMate)

-- Macaulay2Web: Write M2-symbols.ts
generateGrammar("Macaulay2Web/M2-symbols.ts", symbolsForMacaulay2Web)


-- Local Variables:
-- compile-command: "make -C $M2BUILDDIR/Macaulay2/emacs M2-symbols "
-- End:

0 comments on commit 415df96

Please sign in to comment.