Skip to content

Commit

Permalink
Finishing up the very early version of the Expression object.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Alger committed Jun 23, 2014
1 parent e5faf43 commit 59dcb02
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions coffeequate/src/Expression.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,16 @@ define ["parse", "nodes"], (parse, nodes) ->
toString: ->
@expr.toString()

solve: (variable) ->
# TODO: Equivalencies.
@expr.solve(variable)

sub: (substitutions) ->
# TODO: Uncertainties, equivalencies, options.
# TODO: Seems that the way I implemented substituting expressions was different last time for no real reason. Fix.
@expr.sub(substitutions, null, null).simplify()

simplify: ->
@expr.simplify()

return Expression

0 comments on commit 59dcb02

Please sign in to comment.