1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002
|
let x = 6 // This is single line comment
let c: char = 'A'; /* comment with link https://example and - = */
let respond_no_content = reqd => {
Reqd.respond_with_string(reqd, Response.create(`No_content), "");
};
let to_meth =
fun
| `GET => `GET
| `POST => `POST
| `HEAD => `HEAD
| `DELETE => `DELETE
| `PUT => `PUT
| `OPTIONS => `OPTIONS
| `TRACE => `TRACE
| `CONNECT => `CONNECT
| `Other(w) => failwithf("%s is not supported", w, ());
let ignore: 'a => unit = _ => ();
/* **** comment */
/*** comment */
/** docstring */;
/* comment */
/** docstring */;
/*** comment */
/**** comment */
/***** comment */
/*** */
/**** */
/***/
/****/
/* (** comment *) */
/* (*** comment *) */
/* *(*** comment *) */
/* comment **/
/* comment ***/
/* comment ****/
/* comment *****/
// A single line comment
let testingNotQuiteEndOfLineComments = [
"Item 1" /* Comment For First Item */,
"Item 2" /* Comment For Second Item */,
"Item 3" /* Comment For Third Item */,
"Item 4" /* Comment For Fourth Item - but no semi */
/* Comment after last item in list. */
]; /* Comment after list bracket */
let testingEndOfLineComments = [
"Item 1", /* Comment For First Item */
"Item 2", /* Comment For Second Item */
"Item 3", /* Comment For Third Item */
"Item 4" /* Comment For Fourth Item - but before semi */,
/* Comment after last item in list. */
]; /* Comment after list bracket */
/* This time no space between bracket and comment */
let testingEndOfLineComments = []; /* Comment after list bracket */
type t = (int, int); /* End of line on t */
type t22 =
/* End of t22 line on type t22 = */
(int, int);
type variant =
/* Comment above X */
| X(int) /* End of line on X */
/* Comment above Y */
| Y(int); /* End of line on Y */
/* Comment on entire type def for variant */
type x = {
/* not attached *above* x */
fieldOne: int,
} /* Attached end of line after x */
and y = {
/* not attached *above* y */
fieldTwo: int,
}; /* Attached end of line after y */
let result =
switch (X(3)) {
| X(x) =>
/* Where does this comment go? */
let tmp = x;
x + tmp;
| Y(x) =>
/* How about this one */
let tmp = x;
x + tmp;
};
let result =
switch (None) {
| Some({fieldOne: 20}) =>
/* Where does this comment go? */
let tmp = 0;
2 + tmp;
| Some({fieldOne: n}) =>
/* How about this one */
let tmp = n;
n + tmp;
| None => 20
};
type pointWithManyKindsOfComments = {
/* Line before x */
x: string, /* x field */
/* Line before y */
y: string /* y field */
/* Final row of record */
};
type typeParamPointWithComments('a) = {
/* Line before x */
x: 'a, /* x field */
/* Line before y */
y: 'a /* y field */
/* Final row of record */
};
let name_equal = (x, y) => x == y;
let equal = (i1, i2) =>
i1.contents === i2.contents && true; /* most unlikely first */
let equal = (i1, i2) =>
compare(compare(0, 0), compare(1, 1)); /* END OF LINE HERE */
module Temp = {
let v = true;
let logIt = (str, ()) => print_string(str);
};
let store_attributes = arg => {
let attributes_file = "test";
let proc_name = attributes_file ++ ".proc";
let should_write =
/* only overwrite defined procedures */
Temp.v || !Temp.v;
if (should_write) {
Temp.logIt(proc_name, ());
};
};
let run = () => {
TestUtils.printSection("Basic Structures");
};
while (something) {
print_string("You're in a while loop");
print_newline();
};
for (i in 0 to 5) {
print_int(i);
print_newline();
for (i in 10 downto 0) {
print_string(
"Counting in reverse direction",
);
print_newline();
};
};
for (i in
0 to
endOfRangeMustBeSimple(expr, soWrap)) {
print_int(i);
print_newline();
for (i in
theSame(isTrue, ofThe, startOfRange) downto
0) {
print_string(
"Counting in reverse direction",
);
print_newline();
};
};
let x = foo^ ^.bar^;
let x = foo.bar^;
let x = foo#bar^;
let x = foo^.bar^;
let x = (foo^)#bar^;
/* Prefix operators:
* ! followed by zero or more appropriate_operator_suffix_chars (see the
* lexer).
* ? or ~ followed by at least one appropriate_operator_suffix_chars.
*/
let x = !(!(!foo)).bar;
let x = !foo.bar;
let x = !foo#bar;
let x = !(!foo).bar;
let x = !(!foo)#bar;
let x = !(!foo.bar);
let x = ?!(!foo.bar);
let x = ! ?!foo.bar;
let x = ~!(!foo.bar);
let x = ! ~!foo.bar;
let x = ~! ~!foo.bar;
let x = !!foo.bar;
let x = !!foo#bar;
let x = !~foo.bar;
let x = !~foo#bar;
let noParensNeeded = !blah.foo.bar;
let parensNeededAroundFirst = (!blah).foo.bar;
let parensNeededAroundSecond = (!blah.foo).bar;
let noParensNeeded = !blah#foo#bar;
let parensNeededAroundFirst = (!blah)#foo#bar;
let parensNeededAroundSecond = (!blah#foo)#bar;
let parensWithSpaceNeededAroundFirst =
(!(!blah))#foo#bar;
let parensWithSpaceNeededAroundSecond =
(!(!blah#foo))#bar;
let parensWithSpaceNeededAroundFirst =
(?!(+ blah))#foo#bar;
let parensWithSpaceNeededAroundSecond =
(?!(+ blah#foo))#bar;
let x = !(!foo.bar);
let x = !(!foo#bar);
let x = (-10);
let x = (-5.0);
let x = Some(-10);
let x = Some(-5.0);
let lazy x = 10;
let lazy (x: int) = 10;
let lazy [] = 10;
let lazy true = 10;
let lazy #x = 10;
let lazy `Variant = 10;
let lazy `variant = 10;
let lazy '0'..'9' = 10;
let lazy (lazy true) = 10;
let lazy [%extend] = 10;
/* Test precedence on access sugar */
let x = arr^[0];
let x = arr^[0];
let x = str^.[0];
let x = str^.[0];
let x = arr^[0] = 1;
let x = arr^[0] = 1;
/* Comments */
/*Below is an empty comment*/
/**/;
/** IF
*============================================================================
*/;
let (/++) = (+); /* // indicates the start of a comment, not an infix op */
let something =
if (self.ext.logSuccess) {
print_string("Did tap");
print_newline();
};
let logTapSuccess = self =>
if (self.ext.logSuccess) {
print_string("Did tap");
print_newline();
} else {
();
};
let logTapSuccess = self =>
if (self.ext.logSuccess) {
print_string("Did tap");
print_newline();
};
(!data).field = true;
(!data).field1.field2 = true;
(!data.field1).field2 = true;
(!data).field1.field2 = true;
(!data.field1).field2 = true;
let loop = (appTime, frameTime) => {
if (hasSetup.contents) {
setupScene();
renderIntoTop();
hasSetup.contents = true;
};
process(appTime, frameTime);
};
/* These parens should be kept around the entire last if/then/else */
if (something) {
if (somethingElse) {()} else {"blah"};
};
/* These parens should be kept around just the last if/then*/
if (something) {
if (somethingElse) {()} else {"blah"};
};
/* Parens should be generated to wrap the entire final if then else.
* To test that it's being parsed correclty, should print "one". */
if (true) {
if (true) {
print_string("one");
} else {
print_string("two");
};
};
/* Should print two */
if (true) {
if (false) {
print_string("one");
} else {
print_string("two");
};
};
/* Should not print */
if (false) {
if (true) {
print_string("one");
} else {
print_string("two");
};
};
/* Should wrap (if a > b then a else b).
* printer(
*/
let printIfFirstArgGreater = true;
let result =
if (printIfFirstArgGreater) {
(a, b) =>
if (a > b) {
print_string("a > b");
} else {
print_string("b >= a");
};
} else if ({
(a, b) =>
if (a > b) {
print_string("b < a");
} else {
print_string("a <= b");
};
}) {
print_string(
"That could never possibly type check",
);
print_newline();
};
let myRecord = {
nestedRecord: {
anotherNestedRecord:
(instaComp, displayRect) =>
if (Graphics.cgRectIntersectsWithSlop(
defaultCompositeTimerRectSlop,
instaComp.relativeRect,
displayRect,
)) {
IoEligible;
} else {
IoInelibleButTryComposition;
},
},
};
if (printIfFirstArgGreater) {
(a, b) =>
if (a > b) {
print_string("a > b");
};
} else {
(a, b) =>
if (a > b) {
print_string("b < a");
};
};
/* Should Be Parsed As: Cleary a type error, but at least the parsing makes that clear */
if (printIfFirstArgGreater) {
(a, b) =>
if (a > b) {
print_string("a > b");
} else {
(a, b) =>
if (a > b) {
print_string("b < a");
};
};
};
(a, b) =>
if (a > b) {
print_string("a > b");
};
/* What you probably wanted was: */
if (printIfFirstArgGreater) {
(a, b) =>
if (a > b) {
print_string("a > b");
};
} else {
(a, b) =>
if (a > b) {
print_string("b < a");
};
};
/* Mutative if statement: Not used to evaluate to something. */
if (10 < 100) {
let msg = "If there was any doubt, 10 is in fact less than 100.";
print_string(msg);
} else {
let msg = "All bets are off.";
print_string(msg);
};
if (10 < 100) {
print_string(
"If there was any doubt, 10 is in fact less than 100.",
);
} else {
print_string("All bets are off.");
};
/** TYPE CONSTRAINTS
*============================================================================
*/;
let x: int = 10;
let x: int = 10;
let x: int = 10;
let x: int = (10: int);
/* let (x:int) = (10:string); */
/* let (x:string) = ("hello":int); */
/** TUPLES
*============================================================================
*/;
/* In Reason, types look like the data they model! Tuples are no exception. */
type pairOfInts = (int, int);
let letBindingWithTypeConstraint: int = 10;
let (tupleItem: int, withTypeConstraint: int) = (
10,
20,
);
/* To make sure that tuple field annotations are annotating the entire field */
let _dummyFunc = x => 10;
let annotatingFuncApplication = (
_dummyFunc("a"): int,
_dummyFunc("a"): int,
);
/* Pretty printer might stick the [int] at the label. */
let annotatingSingleFuncApplication: int =
_dummyFunc("a");
/* So lets try a place where it won't */
let annotatingSingleFuncApplication = {
/* Commenting a let binding. */
let a = 100;
/* Commenting another let binding. */
let int = 200;
/*
* This demonstrates why named arguments cannot simply have the form (func
* arg:val) - it is indistinguishable from a type constraint.
*/
2 + (_dummyFunc(a): int);
};
let (
tupleItem: int,
constrainedWithoutGrouping: int,
) = (
10,
20,
);
let (tupleItem, withOutsideTypeConstraint): (
int,
int,
) = (
10,
20,
);
/* Trailing commas */
let trailingCommaAccepted = (1, 2);
let moreTrailing = (1, 2, 3, 4, 5, 7);
/** Immutable Lists
* ============================================================================
*/;
/* Anatomy: -Head- --------- Tail--------- nil: You can't see nil */
let x: list(int) = [1, 2, 3, 4, 5, 6, 7, 8, 9];
let hd = "appendedToHead";
let tl = ["listTo", "append", "to"];
/* To push *one* and only *one* item to the front of a list - use [hd, ...tl] */
let result: list(string) = [hd, ...tl];
/* Is the same as writing */
let result: list(string) = [
"appendedToHead",
"listTo",
"append",
"to",
];
/* To operate on lists, use pattern matching */
let rec size =
fun
| [] => 0
| [hd, ...tl] => 1 + size(tl);
/* Optimize for tail recursion */
let rec size = (soFar, lst) =>
switch (lst) {
| [] => 0
| [hd, ...tl] => size(soFar + 1, tl)
};
let nestedMatch = lstLst =>
switch (lstLst) {
| [hd, ...tl] when false => 10
| [hd, ...tl] =>
switch (tl) {
| [] => 0 + 0
| [tlHd, ...tlTl] => 0 + 1
}
| [] => 0
};
let nestedMatchWithWhen = lstLst =>
switch (lstLst) {
| [hd, ...tl] when false => 10
| [hd, ...tl] when true =>
switch (tl) {
| [] when false => 0 + 0
| [] when true => 0 + 0
| [tlHd, ...tlTl] => 0 + 1
}
| [] => 0
};
/**
* Aliasing with "as" during matches.
*/;
type mine =
| MyThing(int)
| YourThing(int);
/*
* Reason parses "as" aliases differently than OCaml.
*/
let ppp =
switch (MyThing(20)) {
| MyThing(x) as ppp
| YourThing(x) as ppp => ppp
};
let MyThing(_) as ppp | YourThing(_) as ppp = ppp;
/*
* in order to achieve the previous example in ocaml, you would have to group
* as:
*/
let ppp =
switch (MyThing(20)) {
| MyThing(x) as ppp
| YourThing(x) as ppp => ppp
};
let MyThing(_) as ppp | YourThing(_) as ppp = ppp;
/*
* But this isn't needed in Reason because OR patterns have much lower
* precedence - they should be pretty printed in the same way.
*/
/* TODO: */
/* let rec nestedMatch lstLst => match lstLst with { */
/* hd::tl: match tl with { */
/* []: 0 + 0, */
/* tlHd::tlTl: 0 + 1, */
/* }, */
/* []: 0 */
/* }; */
/* */
/** ARRAYS
* ============================================================================
* Arrays are weird looking. Usually you want lists because they support pattern
* matching - that's why they have nicer syntax - to entice you. But if you want
* random access and better control over memory layout, use arrays.
*/;
let emptyArray = [||];
let arrayWithOne = [|10|];
let arrayWithTwo = [|10, 10|];
let secondItem = arrayWithTwo[1];
/* Getting And Setting: Yeah, we should really change this */
/* Get an array item at index 1 */
let secondItem = arrayWithTwo[1];
/* Set an array item at index 1 */
arrayWithTwo[1] = 300;
/**
* STRINGS
* ============================================================================
* The language supports mutating strings, but that should not be depended upon.
*/;
let myString = "asdf";
myString.[2] = '9'; /* Replacing a character: I could do without this sugar */
/* FUNCTIONS
*=============================================================================
*/
/* TYPE ANNOTATIONS
* =============================================================================
*/
let one = 900;
let two = 10000;
/* Tuple expressions can be annotated without additional paren wrapping */
let myTuple = (one: int, two: int);
type myTupleType = (int, int);
let myTuple: myTupleType = myTuple;
/* Anything *outside* of a tuple, must still be annotated within parens. */
let myTuple: myTupleType = (one: int, two: int);
/* Now functions that accept a single argument being a tuple look familiar */
let addValues = (a: int, b: int) => {
a + b;
};
let addValues = (a: int, b: int) => {
a + b;
};
let myFunction = (a: int, b: int): int => a + b;
let functionReturnValueType =
(i: int, s: string): (int => int) =>
x => x + 1;
let curriedFormOne = (i: int, s: string) =>
s ++ string_of_int(i);
let curriedFormTwo =
(i: int, x: int): (int, int) => (
i,
x,
);
/* let nonCurriedFormTwo = fun (i:int, x:int) (:(int, int)) => (i, x); */
let curriedFormThree =
(i: int, (a: int, b: int): (int, int))
: (int, int, int) => (
i,
a,
b,
);
/* let nonCurriedFormThree = fun (i:int, (a:int, b:int):(int, int)) (:(int, int, int)) => (i, a, b); */
/** TODO: But this, however doesn't work.
* let (myCurriedFunc: int => int) a => a;
* Note: This is likely because only "simple patterns" are accepted as constraints
* in let bindings - that may be easy to change.
*/;
type myFuncType = (int, int) => int;
let myFunc: myFuncType = (a, b) => a + b;
let funcWithTypeLocallyAbstractTypes =
(
type atype,
type btype,
a,
b,
c: (atype, btype) => unit,
) =>
c(a, b);
/* Checks that function types aren't unnecessary wrapped */
type a = unit => unit;
type b =
| Foo(unit => unit)
| Bar(unit => unit, unit => unit, (a, b) => c)
| Baz(
unit => unit,
unit => unit,
(a, b) => c,
);
type c =
| Foo((a, b) => unit)
| Bar((a, b) => unit);
type d = [> | `Foo(unit => unit)];
/**
* Records:
*=============================================================================
*/;
type withThreeFields = {
name: string,
age: int,
occupation: string,
};
let testRecord = {
name: "joe",
age: 20,
occupation: "engineer",
};
let anotherRecord = {
...testRecord,
name: "joe++",
age: testRecord.age + 10,
};
let makeRecordBase = () => {
name: "Joe",
age: 30,
occupation: "Engineer",
};
let anotherRecord = {
/* These parens should be evaporated. */
...makeRecordBase(),
name: "joe++",
age: testRecord.age + 10,
};
let anotherRecord = {
/* Comments should be correctly placed before ... expression */
...makeRecordBase(),
/* Comment after record extension */
name: "joe++",
age: testRecord.age + 10,
};
let anotherRecord = {
/* Currently, type annotations must be wrapped in parens - that's easy to improve */
...(makeRecordBase(): withThreeFields),
name: "joe++",
age: testRecord.age + 10,
};
let anotherRecord = {
/* This is meaningless, sure */
...someArray.[0] = 20,
name: "joe++",
age: testRecord.age + 10,
};
let anotherRecord = {
...
SomeReally.longFunctionCall({
passingRecordField: 0,
andThisOtherRecordField: 10,
}),
name: "joe++",
age: testRecord.age + 10,
};
let anotherRecord = {
...
SomeReally.longFunctionCall(
withArguments,
thatWrap: bool,
),
name: "joe++",
age: testRecord.age + 10,
};
let anotherRecord = {
...
SomeReally.longFunctionCall(
withArg,
[
"and",
"final",
"list",
"that",
"should",
"break",
],
),
name: "joe++",
age: testRecord.age + 10,
};
/* Record type punning */
type props = {title: string};
type state = unit;
type component = {props};
type component2 = {
props,
state,
updater: unit,
};
type component3 = {
props: M.props,
state,
};
type mutableComponent = {mutable props};
type mutabeleComponent2 = {
mutable props,
mutable state,
style: int,
};
/* Don't pun parameterized types */
type description('props) = {
element: string,
tag: tag('props),
};
/* Don't pun types from other modules */
module Foo = {
type bar = {foo: Baz.foo};
};
/* Don't pun field names that aren't "simple" */
type foo = {
bar: Baz.bar,
qux,
fooo: Fooo.fooo,
};
let moreFoo = {
bar: Baz.bar,
qux,
fooo: Fooo.fooo,
};
/* record value punning */
let props = {title: "hi"};
/* no punning available for a single field. Can't tell the difference with a scope + expression */
let componentA = {props: props};
/* pun for real */
let componentB = {props, state: ()};
/* pun fields with module prefix too */
let foo = {Foo.foo: foo};
let bar = {Foo.foo, bar: 1};
let bar = {bar: 1, Foo.foo};
let bar = {Foo.foo, Bar.bar};
({M.x, y}) => 1;
switch (foo) {
| {y: 1, M.x} => 2
};
/* Requested in #566 */
let break_after_equal =
no_break_from_here(some_call(to_here));
/* Pexp_letexception */
let () = {
exception E;
raise(E);
};
/* # 1587: don't print fun keyword when printing Pexp_fun in a record expression */
{contents: () => ((): unit)};
/* #1556: Always break nested record/obj */
let z = {
a: {
b: c,
d: e,
},
f: g,
};
let z = {
a: {
"b": c,
"d": e,
},
f: g,
};
let z = {
a: {
pub b = c;
pub d = e
},
f: g,
};
let z = {
"a": {
"b": c,
"d": e,
},
"f": g,
};
let z = {
"a": {
b: c,
d: e,
},
"f": g,
};
let z = {
"a": {
pub b = c;
pub d = e
},
"f": g,
};
/**
* Unnecessary parens should be removed.
*/
let unitLambda = () => ();
let identifierLambda = a => ();
let underscoreLambda = _ => ();
it("should remove parens", a => {
print_string("did it work?");
print_string("did it work?");
});
foo(preserveBraces => {inCallback});
foo(preserveBraces => {inFirstPos}, secondArg);
foo(
oneArg,
preserveBraces => {inFirstPos},
secondArg,
);
|