The Sol Programming Language!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lang_macro.sol 277B

1234567891011121314
  1. execfile("tests/_lib.sol")
  2. macro shitty_eval(x, y)
  3. --ast.print(x)
  4. return [x(), y()]
  5. end
  6. assert_eq(shitty_eval(3 + 2, 7 + 9), [5, 16], "macro 1")
  7. macro stupid(ex)
  8. return ex({this_var_does_not_exist = 77})
  9. end
  10. assert_eq(stupid(this_var_does_not_exist - 7), 70, "macro 2")