Special-case try macro to better support 2015 edition

This commit is contained in:
Aleksey Kladov 2020-04-30 14:17:14 +02:00
parent 36775ef0d0
commit c51c8bfb84
3 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,35 @@
SOURCE_FILE@0..27
FN_DEF@0..26
FN_KW@0..2 "fn"
WHITESPACE@2..3 " "
NAME@3..6
IDENT@3..6 "foo"
PARAM_LIST@6..8
L_PAREN@6..7 "("
R_PAREN@7..8 ")"
WHITESPACE@8..9 " "
BLOCK_EXPR@9..26
BLOCK@9..26
L_CURLY@9..10 "{"
WHITESPACE@10..11 " "
EXPR_STMT@11..24
MACRO_CALL@11..23
PATH@11..14
PATH_SEGMENT@11..14
NAME_REF@11..14
IDENT@11..14 "try"
BANG@14..15 "!"
TOKEN_TREE@15..23
L_PAREN@15..16 "("
IDENT@16..18 "Ok"
TOKEN_TREE@18..22
L_PAREN@18..19 "("
TOKEN_TREE@19..21
L_PAREN@19..20 "("
R_PAREN@20..21 ")"
R_PAREN@21..22 ")"
R_PAREN@22..23 ")"
SEMICOLON@23..24 ";"
WHITESPACE@24..25 " "
R_CURLY@25..26 "}"
WHITESPACE@26..27 "\n"

View file

@ -0,0 +1 @@
fn foo() { try!(Ok(())); }