-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax highlighting for Felix #188
Comments
I support vim. Others have done howl and emacs. You can try C++ at a pinch. If you know how to write highlights for your editor I can get you a starting list of "keywords". The main "IDE" is You really don't need an IDE with Felix. Other languages require a lot of boilerplate. Felix is very high level and most things can be expressed succinctly. My main searching tool is actually I would like a VScode plugin, but I haven't been able to find a quick way to make one (i.e. that doesn't take months learning what you need to know to get it to work). |
Just FYI: Felix has a novel thing called DSSLs, Domain Specific Sub-Languages. In a DSSL, you can design your own language, and just add it to Felix. For example in Felix you can write:
and the grammar for and semantics of that syntax is part of the regular definition DSSL. That syntax is NOT in the base Felix language. It is is the LIBRARY. Other language allow you to overload operators. Felix allows you add your own grammar (as long as it doesn't conflict with the base language: you can design a domain specific SUB language which is an extension of Felix). In fact, there is a small WHITE LIE above. There IS NO FELIX LANGUAGE. The WHOLE language is a defined in user space in the standard library. The ONLY hard coded syntax is the syntax of the grammar used to specify the syntax of grammars (i.e. as a bootstrap). Now why bring this up? How the heck could any of the lame IDE around possibly cope with a self-extending language? I'd really like VScode support. I think it's a pretty good system compared to the crap I use: |
Please give me the list of keywords. Thank you. |
You can look at `src/misc/vim/syntax/felix.vim. Extract below. A few are missing, and some are obsolete, Strings roughly follow Python: single and double quotes, and tripled single and double quotes. Comment as in C++ with // to end of line, and /*... */ as in C except that Felix allows nested C comments. The usual identifiers except single quotes are allowed at the end of an identifier like Note that lexicology is again user defined in the library. The parser is "scannerless" meaning
|
Geany syntax highlighting for Felix: https://github.com/tqo50396/felix.geany.syntaxcoloring |
You can add to
|
On 10 Dec 2023, at 01:33, tqo50396 ***@***.***> wrote:
@skaller What kind of statement is _?
syn keyword felixStatement _
It’s not a statement it’s a pattern without a name that matches anything i.e. a wildcard.
It just gets highlighted the same way. Example
match (1,2) with
| (1,_) => println$ “One in pos 0”;
| _ => println$ “No 1 in pos 0:;
endmatch;
—
John Skaller
***@***.***
|
I submitted the PR. I also deleted https://github.com/tqo50396/felix.geany.syntaxcoloring. |
Which text editors have syntax highlighting support for Felix? Does Felix have a recommended IDE?
The text was updated successfully, but these errors were encountered: