Coming from C/C++, this is a very obvious mistake to make, and unfortunately the error reporting for it right now is very confusing. This should hopefully be a bit better. Also fixes some longstanding issues regarding how we convert tokens to strings.
$define MAGIC 69
print(MAGIC)
basic.pluto:1: '=' expected near '69'
1 | $define MAGIC 69
| ^^^^^^^^^^^^^^^^ here: this is invalid syntax.
$define MAGIC
print(MAGIC)
basic.pluto:2: '=' expected near 'print'
2 | print(MAGIC)
| ^^^^^^^^^^^^ here: this is invalid syntax.
Coming from C/C++, this is a very obvious mistake to make, and unfortunately the error reporting for it right now is very confusing. This should hopefully be a bit better. Also fixes some longstanding issues regarding how we convert tokens to strings.