-
-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent significant spaces #792
Comments
the testing suite uses intentionally forgiving spacing because they were specifically made to test an incomplete implementation. the readme and examples are the source of truth |
you are under the wrong impression of how the grouping works and you have just discovered one of the reasons why building a dreamberd compiler is incredibly hard |
Can you elaborate on how it works and what I got wrong? My concern is that if it allows to much freedom, it might make ambiguous syntax that can’t be resolved. |
Also, how are statements affected by spaces? if (true) {
const const a = 1 *
1 + 2! // what do we do with spaces on this line here?
} I would like clear rules on what is supposed to work, and what doesn’t. |
Are these expressions equivalent and valid? (add (3, (add (5, 6))))!
(add (3, (add (5, 6))))!
·add··3,··add··5,·6····!
·add··3,··add··5,··6····! function add(a, b) => a + b!
function add(a, b) => a + b!
function add ( a, b) => a + b!
function add(a, b) => a + b!
function add(a, b ) => a + b!
function add(a, b) => a + b! a·+·b··*··c
a·+b··*c |
yes of course |
I found some inconsistencies with significant whitespace and functions in code containing parentheses.
Here are some examples from the README, but inconsistencies and errors are also present in the examples and the testing suite.
(some spaces are marked with '•︎' to make them easier to see)
Most spaces are fine and look like this:
But sometimes, we have something that breaks the pattern.
And function declaration often don’t work.
So, what is the intended way of marking function calls and declaration? Are there more than 1 valid way?
The text was updated successfully, but these errors were encountered: