js-evaluator-for-android icon indicating copy to clipboard operation
js-evaluator-for-android copied to clipboard

request

Open theduskin opened this issue 3 years ago • 0 comments

please tell me someone has already used this Lib for a App that can handle this pseudo code:

var a1=numberfield(namestring, digits); var a2=numberfield(namestring, digits); var b=numberfield(namestring, digits); var result=textfield(whatever); function calc(){ if(a2>0)return (a1+a2)/2+b; else return something; }

well, not exacly that code. i know this is not the right place, please be gracious to me.

theduskin avatar Feb 26 '22 10:02 theduskin

I do not know the background on why #include was selected originally. I guess any proposal that easily could be integrated by existing tooling could be considered. There is by the way a tool vspec2yaml in vss-tools that flattens (expands #include) and expand instances and create a "flat" Yaml representation. do not know if first using that helps your use case.

erikbosch avatar Jan 02 '23 07:01 erikbosch

I came to to think about this issue when working on vss-tools code. There is a method yamilify_includes, currently at https://github.com/COVESA/vss-tools/blob/master/vspec/init.py#L665 that contains the following comment. So I assume it would be quite easy, if wanted, to change to that Yaml syntax if we would like to.


#
# Convert
#   #include door.vspec, body.door.front.left
# to
#   - $include$:
#     file: door.vspec
#     prefix: body.door.front.left
#
# This yaml version of the include directive will
# then be further processed to actually include
# the given file.
#

erikbosch avatar Feb 02 '23 08:02 erikbosch