Comments (5)
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.
There's a forum for this kind of thing.
Language tests tend to test for parse structure. In-editor highlighting also requires highlight tags to be set up correctly. Do the names in your styleTags
call match the node names in the syntax tree? Are you actually using any of those styled nodes in your test editor?
from lang-example.
Do the names in your styleTags call match the node names in the syntax tree?
They do.
Are you actually using any of those styled nodes in your test editor?
Yes.
from lang-example.
In case someone else finds this, the problem was simple. CodeMirror only highlights the topmost, exposed rule.
Unfortunately, my language needs a superior rule to disambiguate between barewords and keywords, which in my highlighter is called "Chain," so I don't know how to highlight the things it's made from. If I assign a color to Chain
it works as expected. The problem was that I was trying to highlight String
, Atom
, Arrow
, and so on, and the editor isn't distinguishing those.
As far as I can tell, the things beneath the top level production aren't actually exposed, even if they're capitalized. I don't really understand how that can be the case; I would have expected it to highlight all the way down through the rule to its subordinate pieces, so that an expr could have strings and numbers inside, or what have you.
from lang-example.
Maybe the /...
notation in styleTags
is what you're looking for?
from lang-example.
Hm. It seems like it ought to be, but also, I'm not able to make that work out.
I did as you asked, and made a forum thread (although I see you responded there as well.) I'll consolidate there.
from lang-example.
Related Issues (10)
- Make this repo a template HOT 1
- Parser/runtime version mismatch HOT 2
- build script HOT 1
- .gitignore should not exclude package-lock.json HOT 1
- Use @rollup/plugin-typescript HOT 2
- Error: Unrecognized extension value in extension set ([object Object]) HOT 6
- Is this import correct? HOT 1
- [!] (plugin Typescript) TypeError: Cannot read properties of undefined (reading 'text') HOT 1
- TypeError: path.charCodeAt is not a function HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lang-example.