Awesome
NOTE This repository is now archived in favor of https://github.com/Nsidorenco/tree-sitter-fsharp - @Nsidorenco's parser is much more capable and is where the bulk of community contribution should go!
tree-sitter-fsharp (archived)
===========================
F# grammar for tree-sitter based on the language spec
Requirements
- Nodejs
- a C compiler
See the tree-sitter getting started for details on these.
Development
Install dependencies
npm install
Generate the grammar
npm run generate
Run the tests
npm test
References
- Docs on tree-sitter grammar
Progress (based on language spec sections)
- whitespace
- comments
- conditional compilation
- identifiers and keywords
- [o] strings and characters
- verbatim strings
- triple-quote strings
- verbatim bytearrays
- symbolic keywords
- symbolic operators
- numeric literals
- line directives
- hidden tokens
- identifier replacements
- operator names
- long idents
- constants
- operators and precedence
- types and type constraints
- expressions
- patterns
- type definitions
- units of measure
- namespaces and modules
- namespace and module signatures
- lexical filtering (maybe not necessary?)