You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dave DeLong edited this page Sep 20, 2016
·
3 revisions
Creating an Expression
An Expression is simply created using the init(string:) initializer:
let expression = try Expression(string: "1 + 2")
In addition to the String parameter, you may optionally supply a set of operators to use, as well as custom token resolution options.
Specifying a custom set of operators allows you to control the behavior of the % operator, define your own operator, or add new ways to recognize existing operators.