NFun icon indicating copy to clipboard operation
NFun copied to clipboard

Allow to use '=' instead of '== ' in single line anonymous expression

Open tmteam opened this issue 2 years ago • 0 comments

var a = Funny.SingleEqualOp.Calc("if(now().day = 1 and now().month = 1) 'happy new year' else 'go to job'")

The problem is to distinguish equality check and field assignment

var a = Funny.SingleEqualOp.Calc( 
"""
    if(now().day = 1 and now().month = 1) 
       { msg =  'happy new year' }
    else 
      { msg =  'go to job' }
"""
)

tmteam avatar Jan 25 '23 14:01 tmteam