-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Insert builtin#asm into asm! expansion
- Loading branch information
Showing
13 changed files
with
146 additions
and
6 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
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
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
105 changes: 105 additions & 0 deletions
105
crates/parser/test_data/parser/inline/ok/0207_builtin_expr.rast
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,105 @@ | ||
SOURCE_FILE | ||
FN | ||
FN_KW "fn" | ||
WHITESPACE " " | ||
NAME | ||
IDENT "foo" | ||
PARAM_LIST | ||
L_PAREN "(" | ||
R_PAREN ")" | ||
WHITESPACE " " | ||
BLOCK_EXPR | ||
STMT_LIST | ||
L_CURLY "{" | ||
WHITESPACE "\n " | ||
EXPR_STMT | ||
ASM_EXPR | ||
BUILTIN_KW "builtin" | ||
POUND "#" | ||
ASM_KW "asm" | ||
L_PAREN "(" | ||
LITERAL | ||
INT_NUMBER "0" | ||
R_PAREN ")" | ||
SEMICOLON ";" | ||
WHITESPACE "\n " | ||
EXPR_STMT | ||
FORMAT_ARGS_EXPR | ||
BUILTIN_KW "builtin" | ||
POUND "#" | ||
FORMAT_ARGS_KW "format_args" | ||
L_PAREN "(" | ||
LITERAL | ||
STRING "\"\"" | ||
COMMA "," | ||
WHITESPACE " " | ||
FORMAT_ARGS_ARG | ||
LITERAL | ||
INT_NUMBER "0" | ||
COMMA "," | ||
WHITESPACE " " | ||
FORMAT_ARGS_ARG | ||
LITERAL | ||
INT_NUMBER "1" | ||
COMMA "," | ||
WHITESPACE " " | ||
FORMAT_ARGS_ARG | ||
NAME | ||
IDENT "a" | ||
WHITESPACE " " | ||
EQ "=" | ||
WHITESPACE " " | ||
BIN_EXPR | ||
LITERAL | ||
INT_NUMBER "2" | ||
WHITESPACE " " | ||
PLUS "+" | ||
WHITESPACE " " | ||
LITERAL | ||
INT_NUMBER "3" | ||
COMMA "," | ||
WHITESPACE " " | ||
FORMAT_ARGS_ARG | ||
BIN_EXPR | ||
PATH_EXPR | ||
PATH | ||
PATH_SEGMENT | ||
NAME_REF | ||
IDENT "a" | ||
WHITESPACE " " | ||
PLUS "+" | ||
WHITESPACE " " | ||
PATH_EXPR | ||
PATH | ||
PATH_SEGMENT | ||
NAME_REF | ||
IDENT "b" | ||
R_PAREN ")" | ||
SEMICOLON ";" | ||
WHITESPACE "\n " | ||
EXPR_STMT | ||
OFFSET_OF_EXPR | ||
BUILTIN_KW "builtin" | ||
POUND "#" | ||
OFFSET_OF_KW "offset_of" | ||
L_PAREN "(" | ||
PATH_TYPE | ||
PATH | ||
PATH_SEGMENT | ||
NAME_REF | ||
IDENT "Foo" | ||
COMMA "," | ||
WHITESPACE " " | ||
NAME_REF | ||
IDENT "bar" | ||
DOT "." | ||
NAME_REF | ||
IDENT "baz" | ||
DOT "." | ||
NAME_REF | ||
INT_NUMBER "0" | ||
R_PAREN ")" | ||
SEMICOLON ";" | ||
WHITESPACE "\n" | ||
R_CURLY "}" | ||
WHITESPACE "\n" |
5 changes: 5 additions & 0 deletions
5
crates/parser/test_data/parser/inline/ok/0207_builtin_expr.rs
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,5 @@ | ||
fn foo() { | ||
builtin#asm(0); | ||
builtin#format_args(0); | ||
builtin#offset_of(Foo, bar.baz.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
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