ev3dev-lang icon indicating copy to clipboard operation
ev3dev-lang copied to clipboard

Notes on possible functionality improvements to autogen

Open WasabiFan opened this issue 10 years ago • 3 comments

Here's a quick list of features I think it might be worth adding (for a TODO list / general discussion if needed):

  • [ ] ~~Ability to mark sections of code to be templated inline for sections that aren't worth a new template file. This would allow you to do something like this (although probably with slightly different syntax)~~:
doAThing();
//~autogen
doOtherImportantThing({{myClass.myProp}});
//~autogen
  • [ ] Ability to include templates in other templates (mark a template to be re-evaluated after initially being inserted)

WasabiFan avatar Nov 26 '15 05:11 WasabiFan

Ability to mark sections of code to be templated inline

What will happen to this after the first generator run? The liquid code will be replaced by normal code, right? So the code has no special meaning to autogen system, and subsequent generator runs won't be able to update the code?

ddemidov avatar Nov 26 '15 05:11 ddemidov

That's my "slightly different syntax" note :wink: I'm still thinking about it -- do you have any ideas there? My hope was that it would be autocompleted and syntax highlighted by an IDE normally, so it couldn't just be in a comment... hmmmm :confused:

WasabiFan avatar Nov 26 '15 06:11 WasabiFan

I have no ideas. I don't see how we can make same code to be accepted both by compiler/interpreter and autogen unless its in a comment.

ddemidov avatar Nov 26 '15 06:11 ddemidov