project-langx / X

A placeholder language with shareable bytecode IR.
2 stars 0 forks source link

In 12 #13

Closed frankhart2018 closed 3 years ago

frankhart2018 commented 3 years ago

Closes #12

Implementation

  1. Add node classes for number, string and operator.
  2. Return number node and string node from number and string instead of the raw values.
  3. Do the same for expressions, instead of returning the raw expressions return the tree of operations from both mul and sum.
  4. This then represents the numbers and all operations on them as a tree like structure (which is ideal for an AST) rather than a raw string which is useless when it comes to executing the expression.