Comments (9)
Actually, I seem to have misread the documentation. All that would be needed for me to use this repo in an Atom grammar is for it to be available on npm. Now, I can't find it there. So the request changes to: Publish this package on npm :).
from tree-sitter-fennel.
FWIW, I think npm also supports dependences specified via git urls: https://docs.npmjs.com/files/package.json#git-urls-as-dependencies
I've been using this approach for things in development.
Here's a concrete example: https://github.com/sogaiu/vscode-clojure-defs/blob/557b8e4c5546a6d057c8095f10b00c5416f19701/package.json#L33
from tree-sitter-fennel.
On a side note, here's an example .cson: https://github.com/sogaiu/language-clojure/blob/e9f720c1f4a793322b103b8b4ce646d11b35d726/grammars/tree-sitter-clojure.cson
In case someone wants to make an attempt :)
from tree-sitter-fennel.
@sogaiu I just remembered that you can actually just push the package to GitHub, as GitHub now supports packages (see sidebar right). But since GitHub now own npm, I guess they'll eventually converge.
from tree-sitter-fennel.
@turbo You may be right :)
BTW, as the author of a grammar for another lisp-like language, I want to mention that it has turned out to be unusually tricky to get things to work well. Especially once one begins testing on real-world code certain things may start turning up that may motivate one to want to modify one's grammar and in some cases forgo supporting certain constructs for the sake of correctly supporting more important constructs.
I don't know what TravonteD's take on the current situation is, but in the few grammars I worked on this was the recurring pattern. So this is an attempt at a "please don't be surprised if things change" statement :)
from tree-sitter-fennel.
Debugging tree-sitter grammars is a bit outside of my parsing comfort zone, but the tests look somewhat comprehensive. I'm probably going to work on PEG or ST4 grammars because those are ones I can use, in editors I use ;).
from tree-sitter-fennel.
@turbo I haven't used SublimeText though I keep hearing good things about it (I presume ST4 means SublimeText 4). I think I saw an extensive thread in tree-sitter's repository issues with a disucssion that was way over my head that discussed SublimeText's approach (I guess there have been multiple).
I've been a happy user of PEGs though especially in the Janet programming language.
Regarding testing, I ended up not using the built-in system for Clojure because I didn't find it to be helpful enough (ofc, better to have some testing than none!) and it was awkward to use at scale.
For the 3 grammars I've worked on I have each parser work on as many real-world samples as I can find.
You can see a sample invocation here: #5
On a side note I'm currently writing property-based tests for a Clojure grammar using the hypothesis testing framework and the py-tree-sitter bindings: https://github.com/sogaiu/prop-test-ts-clj
This approach is helping me to observe certain things about the grammar that I had failed to see (and I've made some modifications as a result). I think this is partly because I'm now a user of the grammar in a programmatic context -- dogfooding FTW!
I hope TravonteD will forgive these "extra" comments :)
from tree-sitter-fennel.
@sogaiu Long story short about ST4 and the new sublime-syntax format is that it's now able to parse pretty much all advanced constructs other next-gen systems like tree-sitter can parse. There was heated discussion because the tree-sitter creator said some questionable things about the ST4 parser capabilities. I'm just happy there are now more next-gen options.
PEGs are used extensively in TextAdept grammars, even the Rust one is fairly simple: https://github.com/leafo/lua-syntaxhighlight/blob/master/syntaxhighlight/textadept/rust.lua
from tree-sitter-fennel.
@turbo Thanks for the elaboration.
I agree it's nice that there are significantly better options than before.
Thanks for the concrete example -- I only recognize things like Cmt
because Janet borrowed them :)
from tree-sitter-fennel.
Related Issues (20)
- fucntion values in tables HOT 5
- Can't use `:` as delimiter HOT 3
- Missing license HOT 2
- Comments can cause Fennel nodes to end early HOT 3
- Update to 0.19.2 HOT 3
- Fix CI
- Does not recognize doted names as function names HOT 3
- Make `>` and `<` valid function/symbol names HOT 2
- Parentheses inside let breaks syntax highlight HOT 1
- Errors when using non-ascii identifiers in Fennel HOT 6
- Treat comprehension and accumulation macros like `each` or `for`
- Integrate Aniseed macros as part of grammar HOT 1
- Create separate rule for `:keyword` style strings? HOT 2
- ?. macro produces an error
- Support for Threading Macros HOT 2
- symbols in quoted expressions are not highlighted like function symbols in non-quoted expressions
- Operators are missing
- lambda HOT 2
- doesn't ignore shebang
- Fuzzing HOT 2
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 tree-sitter-fennel.