We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The Stringer-fct for asts basically mirrors the input - with some brackets for clarification.
In some cases, however, it is not readable any more.
expl:
>> let remainder = fn(x, y) { if(y > 0){let p = (x/y) * y; x - p}} let remainder = fn(x, y) if(y > 0) let p = ((x / y) * y);(x - p);
more general:
>> if(cond){a;b} ifcond ab >> if(cond){a}; b ifcond ab
it's also not always valid Monkey code:
>> let remainder = fn(x, y) { if(y > 0){let p = (x/y) * y; x - p}} let remainder = fn(x, y) if(y > 0) let p = ((x / y) * y);(x - p); >> let remainder = fn(x, y) if(y > 0) let p = ((x / y) * y);(x - p); __,__ .--. .-" "-. .--. / .. \/ .-. .-. \/ .. \ | | '| / Y \ |' | | | \ \ \ 0 | 0 / / / | \ '- ,\.-"""""""-./, -' / ''-' /_ ^ ^ _\ '-'' | \._ _./ | \ \ '~' / / '._ '-=-' _.' '-----' Woops! We ran into some monkey business here!
Test (in pseudocode):
let ast1 = result of parsing input let mirror = ast1.String() let ast2 = result of parsing mirror
Then we want: ast1 == ast2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The Stringer-fct for asts basically mirrors the input - with some brackets for clarification.
In some cases, however, it is not readable any more.
expl:
more general:
it's also not always valid Monkey code:
Test (in pseudocode):
let ast1 = result of parsing input
let mirror = ast1.String()
let ast2 = result of parsing mirror
Then we want: ast1 == ast2
The text was updated successfully, but these errors were encountered: