I'm trying to create an FSL language plugin for CodeMirror.
I have a decent set of test cases that cover the basic common sense first steps of the language. It appears to parse happily, and the way that I expect.
> mocha test/test.js
cases
✔ Simple arrow statements between atoms
✔ Simple arrow statements between strings
✔ Simple arrow statements mixed between atoms and strings
✔ Simple arrow statements using list spread
✔ Simple arrow statements over various arrow types
✔ Simple arrow chains
✔ Left Actions
✔ Right Actions
✔ Both Actions
✔ Empty state claim
✔ Active state claim
✔ Line Comment
✔ Machine Author attribute
✔ Machine Contributor attribute
✔ Machine Comment attribute
✔ Machine Definition attribute
✔ Machine Name attribute
✔ Machine Reference attribute
✔ Machine Version attribute
✔ Machine License attribute
✔ Machine Language attribute
✔ FSL Version attribute
✔ Theme attribute
✔ Hooks attribute
✔ DOT Preamble attribute
✔ Real program
26 passing (20ms)
I was trying to add a demo editor. The editor itself works: it has the characteristic CodeMirror appearance, the line highlight moves with the cursor, braces and parentheses match, et cetera.
However, it's treating the text as if it was plain text. The language itself isn't being invoked.
I do not believe that it's a question of the language being recognized and going unstyled. In the browser inspector, in j mode, there are spans in common sense places to apply styling. There are none where I'd expect for my language; only rows.
I believe the editor invocation is correct because if I install the j language plugin and switch to that, J code highlights as expected.
It's not clear to me what I could do wrong, that the test cases would pass, but a working editor would not adopt my language plugin.
I've done my best to stay within the vanilla guidelines of your lang example. Most of the code is unchanged, and the grammar is currently very simple.
There are no errors in the console.
All three of these breakpoints land:
I was hoping to ask for help? I can't find a discord or an irc channel, and I'm not sure what to do next.