Skip to content
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

Uniform parenthesized syntax for abstraction and application #1299

Merged
merged 108 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
7d30d63
refactor only_core_type
let-def Apr 27, 2017
72f4bc6
refactor with menhir higher-order rules
let-def Apr 27, 2017
7a2830d
replace more recursions (attributes, lists) by higher-order rules
let-def Apr 27, 2017
6a0300b
introduce left-recursive equivalent of higher-order rules
let-def Apr 27, 2017
5d7c5fa
factor constructor declarations, tuple rules, ...
let-def Apr 27, 2017
8ccfa46
styling, refactor flags
let-def Apr 27, 2017
4829823
simple_expr_list -> simple_expr*
let-def Apr 28, 2017
d18a013
minor cleanup
let-def May 2, 2017
4a3cffc
replace mapper chain by a mapper composition
let-def Apr 20, 2017
9963ae9
optimise replace_string
let-def Apr 20, 2017
48a2f0d
replace custom string buffer implementation by stdlib
let-def Apr 20, 2017
ee2e573
refactor lexbuf copy
let-def Apr 21, 2017
db7b744
Implement decorators
SanderSpies Apr 1, 2017
cdd1475
inline item_attributes
let-def May 4, 2017
dda26f0
wip: introduce ES6_FUN token for ES6 arrow syntax
let-def Apr 18, 2017
8cd6ee0
proof of concept es6 arrows implementation
let-def Apr 18, 2017
9a56f61
fix lexing bug
let-def Apr 25, 2017
359c16b
pprinter
let-def Apr 25, 2017
68de5e9
fix lexer locations
let-def May 11, 2017
d388178
update testsuite
let-def Apr 25, 2017
7917303
implement js-like application for expressions and classes
let-def May 1, 2017
076766f
application syntax
let-def May 1, 2017
c54b723
make class type parameters optional
let-def May 2, 2017
3672775
WIP parser
let-def May 10, 2017
9006ec2
WIP parser
let-def May 10, 2017
aa7e567
WIP parser
let-def May 11, 2017
2a73e55
WIP tests
let-def May 11, 2017
57b4bde
WIP parser
let-def May 12, 2017
fbaae16
fix parser error
let-def May 12, 2017
5ff059f
REMOVE ME quick test
let-def May 12, 2017
aa34f32
reason_parser: fix es6_fun
let-def May 13, 2017
dbff83b
add (not)pretty-printer
let-def May 13, 2017
9204ae7
updates tests, FIXME
let-def May 13, 2017
bef5416
fix SHARPOP precedence
let-def May 15, 2017
dcc4c33
less parenthesis
let-def May 15, 2017
2282461
less parenthesis (2)
let-def May 15, 2017
87c0cef
sweet pretty print for patterns
let-def May 15, 2017
d8401fa
update tests
let-def May 15, 2017
32212f4
less parenthesis
let-def May 17, 2017
bbc8b98
add x => <expr> and {x,y} => <expr> syntax
let-def May 18, 2017
78cca8b
less parenthesis
let-def May 18, 2017
789303f
wip: lighter labelled arguments syntax
let-def May 18, 2017
a8ae482
label punning for constrained expr/pattern
let-def May 18, 2017
a6e7d31
wip
let-def May 22, 2017
5c5baea
WIP
let-def May 24, 2017
91ca052
multiple path application syntax
let-def May 24, 2017
7839fe4
WIP
let-def May 24, 2017
bcdd8b5
WIP: usable full grammar rework
let-def Jun 7, 2017
b5971d9
REMOVE ME update reason-parser/test
let-def Jun 15, 2017
1740efa
test ambiguity in printing of "module type with"
let-def Jun 15, 2017
5bc233c
implement and test module type extensions printing
let-def Jun 15, 2017
ac63afd
prettier printing
let-def Jun 21, 2017
84dc743
update tests
let-def Jun 21, 2017
e6179c5
put space after and not before : in type constraints
let-def Jun 21, 2017
0640e0d
enable support simple_type => t
let-def Jun 21, 2017
c25da40
skip parentheses when printing simple_type => core_type
let-def Jun 22, 2017
8143664
force ( or { around if/try/switch/while/for statements
let-def Jun 23, 2017
8dcd6cf
update tests
let-def Jun 23, 2017
95f1d95
simpler implementation of operator parsing
let-def Apr 15, 2017
657ef1c
lexer: keep a \ in front
let-def May 1, 2017
64db7ee
fix operators location
let-def Jun 21, 2017
842ae6c
change operators
let-def May 1, 2017
8da5661
wip test update
let-def Jun 22, 2017
6467053
make ! behave like unary -/+, fix printing ambiguities with ^
let-def Jun 29, 2017
8554318
make floating attributes disappear
let-def Jul 6, 2017
d605425
print floating attributes
let-def Jul 6, 2017
007f614
prepare item attributes disambiguation
let-def Jul 6, 2017
9a10d8e
WIP
let-def Jul 6, 2017
ca5e102
WIP
let-def Jul 6, 2017
4b9edf0
WIP: finished using CPS for and_type_declaration
let-def Jul 6, 2017
c2232c0
merge [@@ and [@: only [@ remains!
let-def Jul 6, 2017
c455bf6
update printing and tests
let-def Jul 6, 2017
24459ee
fix type declarations location
let-def Jul 6, 2017
3ba4fd2
fix unified attributes
let-def Jul 6, 2017
edfb824
WIP document
let-def Jul 6, 2017
926ae2a
document some parser design decisions
let-def Jul 6, 2017
c18670a
more flexible attributes for value constructor declaration
let-def Jul 7, 2017
43f8cf1
WIP: DOCSTRINGS again
let-def Jul 7, 2017
1ebbfae
improve handling of attributes
let-def Jul 14, 2017
52fa2a6
fix
let-def Jul 14, 2017
151ad3e
fix printing of item attributes on eval and extensions
let-def Jul 6, 2017
707b654
update pprint for doc comments
let-def Jul 14, 2017
aacf7a2
Merge branch 'es6_fun-3' of https://github.com/let-def/reason into le…
chenglou Jul 21, 2017
3d7b7e8
Fix bad merge
chenglou Jul 21, 2017
99ba385
More merge-related fixes
chenglou Jul 22, 2017
722e985
More fixes
chenglou Jul 22, 2017
4200e8f
Fix jsx tests
chenglou Jul 22, 2017
6efc0ee
fix printing of doc attributes
let-def Jul 28, 2017
e25a468
toolchain: with ocaml parser, filter doc comments from comment list i…
let-def Jul 28, 2017
e0eb1de
Update tests
let-def Jul 28, 2017
8f8390a
remove me
let-def Aug 1, 2017
e084b62
change syntax of polymorphic variants
let-def Aug 1, 2017
4d904ca
reason_pprint_ast: fix printing of polymorphic variants payload type …
let-def Aug 1, 2017
4f27543
reason_pprint_ast: fix printing of comments that could be confused wi…
let-def Aug 1, 2017
bc6f79b
wip update tests
let-def Aug 1, 2017
95ee958
fix printing of doc comments
let-def Aug 1, 2017
60f9ee0
fix printing of attributes on class
let-def Aug 1, 2017
7e6843e
tests: mark some doc strings as floatings
let-def Aug 1, 2017
ae339b5
fix build with other ocaml versions
let-def Aug 5, 2017
dea6605
Merge ae339b58efc8e1aa6a7716234a912721ded42b63 into 4bfb7a4dde697f069…
let-def Aug 10, 2017
8ad0793
Merge remote-tracking branch 'upstream/master' into HEAD
chenglou Aug 11, 2017
c6da4e3
Unsure
chenglou Aug 11, 2017
d375ce0
fix printing of (!)
let-def Aug 12, 2017
027fed7
update some test expectations
let-def Aug 12, 2017
ffdc760
change array access syntax from a.(x) to a[x]
let-def Aug 12, 2017
9aa3c94
print array[index]
let-def Aug 12, 2017
aa02e3b
update tests
let-def Aug 12, 2017
27005ec
remove one level of parentheses in switch ((1, 2)) { ... }
let-def Aug 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _tags
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
true: warn(@5@8@10@11@12@14@23-24@26@29@40), bin_annot, safe_string, debug
true: warn(@5@8@10@11@12@14@23-24@26@29@40), bin_annot, safe_string, debug, thread

<editorSupport/**>: -traverse
<node_modules/**>: -traverse
Expand Down
6 changes: 3 additions & 3 deletions formatTest/printerTests/input/moduletest.re
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module TestModule = {
type twostrings = (string, string);
let mkPair s => {
let mkPair(s) {
(s, s);
}
};

let twoStrings = TestModule.mkPair "hello";
let twoStrings = TestModule.mkPair("hello");
let () =
print_endline (TestModule.show_twostrings twoStrings);
print_endline(TestModule.show_twostrings(twoStrings));
6 changes: 3 additions & 3 deletions formatTest/printerTests/input/rectypetest.re
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
type mytype = Int of hello | Float of (list int) | String
type mytype = Int(hello) | Float(list(int)) | String
and hello = string;

let () =
print_endline (show_mytype (Int "five"));
print_endline (show_hello "aloha");
print_endline(show_mytype(Int("five")));
print_endline(show_hello("aloha"));
4 changes: 2 additions & 2 deletions formatTest/printerTests/input/typetest.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type mytype = Int of string | Float of (list int) | String;
type mytype = Int(string) | Float(list(int)) | String;

let () =
print_endline (show_mytype (Int "five"));
print_endline(show_mytype(Int("five")));
42 changes: 21 additions & 21 deletions formatTest/typeCheckedTests/expected_output/arityConversion.re
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
Some (1, 2, 3);
Some((1, 2, 3));

type bcd =
| TupleConstructor (int, int)
| MultiArgumentsConstructor int int;
| TupleConstructor((int, int))
| MultiArgumentsConstructor(int, int);

let a = TupleConstructor (1, 2);
let a = TupleConstructor((1, 2));

let b =
MultiArgumentsConstructor 1 2
[@implicit_arity];
[@implicit_arity]
MultiArgumentsConstructor(1, 2);

module Test = {
type a =
| And (int, int)
| Or (int, int);
| And((int, int))
| Or((int, int));
};

let _ = Test.And (1, 2);
let _ = Test.And((1, 2));

let _ = Test.Or (1, 2);
let _ = Test.Or((1, 2));

let _ = Some 1;
let _ = Some(1);

module M = {
type t =
| TupleConstructorInModule (int, int);
| TupleConstructorInModule((int, int));
type t2 =
| TupleConstructor2 (int, int);
| TupleConstructor2((int, int));
type t3 =
| TupleConstructor3 (int, int);
| TupleConstructor3((int, int));
};

type t2 =
| TupleConstructor2 (int, int);
| TupleConstructor2((int, int));

type t3 =
| TupleConstructor3 (int, int);
| TupleConstructor3((int, int));

let _ = M.TupleConstructorInModule (1, 2);
let _ = M.TupleConstructorInModule((1, 2));

let _ = M.TupleConstructor2 (1, 2);
let _ = M.TupleConstructor2((1, 2));

let _ = TupleConstructor2 (1, 2);
let _ = TupleConstructor2((1, 2));

let _ =
M.TupleConstructor3 1 2 [@implicit_arity];
[@implicit_arity] M.TupleConstructor3(1, 2);

let _ = TupleConstructor3 (1, 2);
let _ = TupleConstructor3((1, 2));
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ type bcd =
let a = TupleConstructor (1, 2);

let b =
MultiArgumentsConstructor 1 2
[@implicit_arity];
[@implicit_arity]
MultiArgumentsConstructor 1 2;

module Test = {
type a =
Expand Down Expand Up @@ -43,6 +43,6 @@ M.TupleConstructor2 (1, 2);

TupleConstructor2 (1, 2);

M.TupleConstructor3 1 2 [@implicit_arity];
[@implicit_arity] M.TupleConstructor3 1 2;

TupleConstructor3 (1, 2);
Loading