From ddc637c16120fb352183698f635fc93a68580f7b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 30 Dec 2017 15:22:40 +0300 Subject: Lexer: start numbers --- tests/data/lexer/0004_number.rs | 7 +++++ tests/data/lexer/0004_number.txt | 62 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 tests/data/lexer/0004_number.rs create mode 100644 tests/data/lexer/0004_number.txt (limited to 'tests/data/lexer') diff --git a/tests/data/lexer/0004_number.rs b/tests/data/lexer/0004_number.rs new file mode 100644 index 000000000..af53ff2cd --- /dev/null +++ b/tests/data/lexer/0004_number.rs @@ -0,0 +1,7 @@ +0 0b 0o 0x 00 0_ 0. 0e 0E 0z +01790 0b1790 0o1790 0x1790aAbBcCdDeEfF 001279 0_1279 0.1279 0e1279 0E1279 +0..2 +0.foo() +0e+1 +0.e+1 +0.0E-2 diff --git a/tests/data/lexer/0004_number.txt b/tests/data/lexer/0004_number.txt new file mode 100644 index 000000000..e9ad8410d --- /dev/null +++ b/tests/data/lexer/0004_number.txt @@ -0,0 +1,62 @@ +INT_NUMBER 1 +WHITESPACE 1 +INT_NUMBER 2 +WHITESPACE 1 +INT_NUMBER 2 +WHITESPACE 1 +INT_NUMBER 2 +WHITESPACE 1 +INT_NUMBER 2 +WHITESPACE 1 +INT_NUMBER 2 +WHITESPACE 1 +FLOAT_NUMBER 2 +WHITESPACE 1 +INT_NUMBER 2 +WHITESPACE 1 +INT_NUMBER 2 +WHITESPACE 1 +INT_NUMBER 1 +IDENT 1 +WHITESPACE 1 +INT_NUMBER 5 +WHITESPACE 1 +INT_NUMBER 6 +WHITESPACE 1 +INT_NUMBER 6 +WHITESPACE 1 +INT_NUMBER 18 +WHITESPACE 1 +INT_NUMBER 6 +WHITESPACE 1 +INT_NUMBER 6 +WHITESPACE 1 +FLOAT_NUMBER 6 +WHITESPACE 1 +INT_NUMBER 6 +WHITESPACE 1 +INT_NUMBER 6 +WHITESPACE 1 +INT_NUMBER 1 +ERROR 1 +ERROR 1 +INT_NUMBER 1 +WHITESPACE 1 +INT_NUMBER 1 +ERROR 1 +IDENT 3 +ERROR 1 +ERROR 1 +WHITESPACE 1 +INT_NUMBER 2 +ERROR 1 +INT_NUMBER 1 +WHITESPACE 1 +INT_NUMBER 1 +ERROR 1 +IDENT 1 +ERROR 1 +INT_NUMBER 1 +WHITESPACE 1 +FLOAT_NUMBER 6 +WHITESPACE 1 -- cgit v1.2.3