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 committed Sep 12, 2024
1 parent 954e44c commit 1f8b46b
Show file tree
Hide file tree
Showing 2 changed files with 10 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@];
9 changes: 9 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,11 @@ symbolsForTextMate = template -> (
output = replace("@M2CONSTANTS@", demark("|", CONSTANTS), output);
output)

symbolsForMacaulay2Web = template -> (
output := replace("@M2BANNER@", banner, template);
output = replace("@M2SYMBOLS@", demark(",", format \ SYMBOLS), output);
output)

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

Expand Down Expand Up @@ -187,6 +192,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 1f8b46b

Please sign in to comment.