vassilych / cscs

CSCS: Customized Scripting in C#
MIT License
166 stars 47 forks source link

How to customize Merging Variables step #36

Open gmiseria opened 1 year ago

gmiseria commented 1 year ago

First of all, the job you have done is really fantastic.

For a proof of concept, I'm trying to extend your code to work with other types of Variables like series but the same question is valid for other Variable too.

If I develop a new function to create a new Series Variable I can do a script like this a=CreateSeries(value1, value2 ecc.) and the "a" variable is of type Series.

Now if I try to execute a script like b=a+1 the interpreter try to merge a and 1 but the Merge between Series and Number does not exist in the Parser.cs

Is there a method to extend the Merge capabilities as we do with the functions and modules?

I know that I could develop a new function like AddSeriesAndNumber with two parameters Serie and a Number but use the standard operator like + / ecc. would be very useful

thanks again for the great job