naomi
naomi copied to clipboard
[WIP] Naomi 5.0.0
Integration
- [x] API to enable external packages to use Naomi's compilers.
Build systems
- [x] Commands;
- [x] Keymaps;
- [x] Menus;
- [x] Preferences;
- [ ] Syntaxes:
- [x] Build a AST representation of the final syntax:
- [x] Visitor system to transform the AST.
- [x] Allow lists of words to be specified as an array instead of regex through the
match_wordsstatement. - [x] Allow function calls in match and variable patterns, e.g.:
match_wordsbecomes just a shortcut for thewordsfunction which accepts a list of words and returns an optimized regex string. - [x] Include files using:
- [x] Sublime's normal inclusion
Package/YourPackage/...; - [x] Relative paths
./path...; - [x] Relative to a
srcroot~/path...which will be calculated on a per package basis;
- [x] Sublime's normal inclusion
- [ ] Use the AST to predict and alert about recursion. It must not compile the syntax in those cases to prevent Sublime from freezing.
- [ ] Conditional inclusions using settings;
- [ ] Output:
- [ ] Generate code from the AST.
- [ ] Tree shaking;
- [ ] Add context statistics;
Watchers (Auto build on change)
- [x] Commands;
- [x] Keymaps;
- [x] Menus;
- [x] Preferences;
- [x] Syntaxes;
Testing system
- [ ] Syntax:
- [ ] Test individual syntax files;
- [ ] Test variables;
- [ ] Test final output;
I'm noticing this blocking a few other issues. Anything I can do to help move it along?
I got the build system for:
- Commands;
- Indentation preferences;
- Keymaps;
- Menus;
For the syntaxes I've been looking at how to implement it and optimization algorithms, I'll have something basic done this week:
- Parsing the yaml files, this is easy as I am using ruammel;
- Linking the references;
- Removing duplicated contexts;
- Output the final result;
I'll definitelly need help testing and debugging it because the syntaxes have 200+ files; To simplify testing I am also planning a way to test individual files and put tests near the source files like I do in Jest;
Thank you @borela for the work you've done and still do. Helps me everyday. :)
@kud You are welcomed :D I am trying to speed up the upgrade to solve the context issues, hopefully will merge it soon.
Wowowo, you're on fire! Can't wait to use this PR :)
When do you think we'll be able to enjoy all of these commits? :)
@kud The alpha version will be ready soon, probably begining of december, as I already did the parsing and construction of the AST. Now I am working on code generation(should be easy too), recursion check and tree shaking to eliminate duplicated contexts as it not only will fix the 25k recursion limit but will make the syntax lighter.
Now that my work schedule got lighter I am dedicating more time to finish this pull.
Coooooooooooooooooool! :)
Can I use this PR? I need JSX, style-components CSS, and PHP working together :zany_face:
I've moved to VS Code. I wasn't able to wait to much. 😬