forked from janestreet/ocamlformat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support unboxed float literals (janestreet#25)
* Automatic changes to patch files This just happened when I hit `dune build`. Don't really know what's going on. Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com> * Updated the standard parsetree for unboxed literals Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com> * Support unboxed literals Testing story not complete yet; want advice. Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com> * Make parsetree changes separated Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com> * Checkpoint Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com> * Still not quite working, but done for tonight Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com> * Vendor in jane-syntax into standard Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com> * Separate out Jane Street stuff more Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com> * More tests, and a bugfix Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com> --------- Signed-off-by: Richard Eisenberg <reisenberg@janestreet.com>
- Loading branch information
1 parent
f581f28
commit 7b4d203
Showing
31 changed files
with
3,521 additions
and
1,198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ocamlformat: ignoring "tests/line_directives.ml" (syntax error) | ||
File "tests/line_directives.ml", line 1, characters 1-9: | ||
File "tests/line_directives.ml", line 1, characters 0-9: | ||
1 | #3 "f.ml" | ||
^^^^^^^^ | ||
^^^^^^^^^ | ||
Error: Invalid lexer directive "#3 \"f.ml\"": line directives are not supported |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
let x = #3l | ||
|
||
let x = #3L | ||
|
||
let x = #3n | ||
|
||
let x = -#3l | ||
|
||
let x = #3.0 | ||
|
||
let x = -#3.0 | ||
|
||
let x = #3.0 + #4.0 | ||
|
||
let x = #3.0 - #4.0 | ||
|
||
let x = (#3.0 [@attr]) | ||
|
||
let x = (#3.0 + #4.0) [@attr] | ||
|
||
let x = f #3.0 #4.0 #5.0 x y #0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(* this one is purposefully misformatted *) | ||
|
||
let x = +#3.14 | ||
let x = #3.14+#5.82 | ||
let x = #3l-#4n | ||
let x = #4n+ -#5.0 | ||
let x = f #3n#4l#5.0-#6L+-#7.0z#3n | ||
let x = f #3n#4l#5.0-#6L+-#7.0 z#3n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(* this one is purposefully misformatted *) | ||
|
||
let x = #3.14 | ||
|
||
let x = #3.14 + #5.82 | ||
|
||
let x = #3l - #4n | ||
|
||
let x = #4n + -#5.0 | ||
|
||
let x = f #3n #4l #5.0 - #6L +- #7.0z #3n | ||
|
||
let x = f #3n #4l #5.0 - #6L +- #7.0 z #3n |
Oops, something went wrong.