From 0000f4f4f2f32c6ff67db6cbc27e3a49c85f4b99 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 2 Feb 2018 23:45:15 +0300 Subject: G: static items --- tests/data/parser/ok/0023_static_items.rs | 2 ++ tests/data/parser/ok/0023_static_items.txt | 31 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/data/parser/ok/0023_static_items.rs create mode 100644 tests/data/parser/ok/0023_static_items.txt (limited to 'tests/data/parser/ok') diff --git a/tests/data/parser/ok/0023_static_items.rs b/tests/data/parser/ok/0023_static_items.rs new file mode 100644 index 000000000..5fb92ce33 --- /dev/null +++ b/tests/data/parser/ok/0023_static_items.rs @@ -0,0 +1,2 @@ +static FOO: u32 = 1; +static mut BAR: i32 = 92; diff --git a/tests/data/parser/ok/0023_static_items.txt b/tests/data/parser/ok/0023_static_items.txt new file mode 100644 index 000000000..7cd2228fa --- /dev/null +++ b/tests/data/parser/ok/0023_static_items.txt @@ -0,0 +1,31 @@ +FILE@[0; 47) + STATIC_ITEM@[0; 21) + STATIC_KW@[0; 6) + WHITESPACE@[6; 7) + IDENT@[7; 10) "FOO" + COLON@[10; 11) + WHITESPACE@[11; 12) + IDENT@[12; 15) "u32" + WHITESPACE@[15; 16) + EQ@[16; 17) + LITERAL@[17; 19) + WHITESPACE@[17; 18) + INT_NUMBER@[18; 19) + SEMI@[19; 20) + WHITESPACE@[20; 21) + STATIC_ITEM@[21; 47) + STATIC_KW@[21; 27) + WHITESPACE@[27; 28) + MUT_KW@[28; 31) + WHITESPACE@[31; 32) + IDENT@[32; 35) "BAR" + COLON@[35; 36) + WHITESPACE@[36; 37) + IDENT@[37; 40) "i32" + WHITESPACE@[40; 41) + EQ@[41; 42) + LITERAL@[42; 45) + WHITESPACE@[42; 43) + INT_NUMBER@[43; 45) + SEMI@[45; 46) + WHITESPACE@[46; 47) -- cgit v1.2.3