From 8c52ada07a8ef55ec9d20c81f4b0b7b2797dc9e0 Mon Sep 17 00:00:00 2001 From: Sergey Prokhorov Date: Wed, 13 May 2020 23:32:12 +0200 Subject: [PATCH] (erlang) numeric literals underscore separators - add tests --- CHANGES.md | 2 ++ test/markup/erlang/numbers.expect.txt | 14 ++++++++++++++ test/markup/erlang/numbers.txt | 14 ++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 test/markup/erlang/numbers.expect.txt create mode 100644 test/markup/erlang/numbers.txt diff --git a/CHANGES.md b/CHANGES.md index 03e90acb8e..a631b26860 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -34,6 +34,7 @@ Language Improvements: - fix(yaml) Fix tags to include non-word characters (#2486) [Peter Plantinga][] - fix(swift) `@objcMembers` was being partially highlighted (#2543) [Nick Randall][] - enh(dart) Add `late` and `required` keywords, and `Never` built-in type (#2550) [Sam Rawlins][] +- enh(erlang) Add underscore separators to numeric literals (#2554) [Sergey Prokhorov][] [Josh Goebel]: https://github.com/yyyc514 [Peter Plantinga]: https://github.com/pplantinga @@ -42,6 +43,7 @@ Language Improvements: [Hankun Lin]: https://github.com/Linhk1606 [Nick Randall]: https://github.com/nicked [Sam Rawlins]: https://github.com/srawlins +[Sergey Prokhorov]: https://github.com/seriyps ## Version 10.0.2 diff --git a/test/markup/erlang/numbers.expect.txt b/test/markup/erlang/numbers.expect.txt new file mode 100644 index 0000000000..178bebaa91 --- /dev/null +++ b/test/markup/erlang/numbers.expect.txt @@ -0,0 +1,14 @@ +Integer = 1234 +BigInteger = 1_234_000 +NegInteger = -20_000 +Float = 2.34 +BigFloat = 3_333.14159_26535_89793 +SciFloat = 2.4e23 +PlusSciFloat = 2.4e+23 +SmallSciFloat = 2.4e-23 +Binary = 2#1010 +StrangeBinary = 2#1010_1010_1010 +Octal = 8#777 +StrangeOctal = 8#777_666_555 +Hex = 0x1ABEF +StrangeHex = 16#1234_D0GE_FACE diff --git a/test/markup/erlang/numbers.txt b/test/markup/erlang/numbers.txt new file mode 100644 index 0000000000..3dd580b736 --- /dev/null +++ b/test/markup/erlang/numbers.txt @@ -0,0 +1,14 @@ +Integer = 1234 +BigInteger = 1_234_000 +NegInteger = -20_000 +Float = 2.34 +BigFloat = 3_333.14159_26535_89793 +SciFloat = 2.4e23 +PlusSciFloat = 2.4e+23 +SmallSciFloat = 2.4e-23 +Binary = 2#1010 +StrangeBinary = 2#1010_1010_1010 +Octal = 8#777 +StrangeOctal = 8#777_666_555 +Hex = 16#1ABEF +StrangeHex = 16#1234_D0GE_FACE