naomi icon indicating copy to clipboard operation
naomi copied to clipboard

[WIP] Naomi 5.0.0

Open borela opened this issue 7 years ago • 10 comments

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_words statement.
    • [x] Allow function calls in match and variable patterns, e.g.: match_words becomes just a shortcut for the words function 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 src root ~/path... which will be calculated on a per package basis;
    • [ ] 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;

borela avatar Aug 22 '18 14:08 borela

I'm noticing this blocking a few other issues. Anything I can do to help move it along?

Whoaa512 avatar Sep 20 '18 03:09 Whoaa512

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;

borela avatar Sep 20 '18 12:09 borela

Thank you @borela for the work you've done and still do. Helps me everyday. :)

kud avatar Jul 30 '19 14:07 kud

@kud You are welcomed :D I am trying to speed up the upgrade to solve the context issues, hopefully will merge it soon.

borela avatar Jul 30 '19 15:07 borela

Wowowo, you're on fire! Can't wait to use this PR :)

kud avatar Nov 04 '19 08:11 kud

When do you think we'll be able to enjoy all of these commits? :)

kud avatar Nov 19 '19 21:11 kud

@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.

borela avatar Nov 21 '19 12:11 borela

Coooooooooooooooooool! :)

kud avatar Nov 21 '19 12:11 kud

Can I use this PR? I need JSX, style-components CSS, and PHP working together :zany_face:

boycce avatar Apr 25 '21 22:04 boycce

I've moved to VS Code. I wasn't able to wait to much. 😬

kud avatar Apr 25 '21 22:04 kud