Parse builtin# syntax

This commit is contained in:
Lukas Wirth 2023-09-05 10:36:35 +02:00
parent db4684ef6c
commit 9b8eb807a3
17 changed files with 264 additions and 88 deletions

View file

@ -70,7 +70,19 @@ pub(crate) const KINDS_SRC: KindsSrc<'_> = KindsSrc {
"match", "mod", "move", "mut", "pub", "ref", "return", "self", "Self", "static", "struct",
"super", "trait", "true", "try", "type", "unsafe", "use", "where", "while", "yield",
],
contextual_keywords: &["auto", "default", "existential", "union", "raw", "macro_rules", "yeet"],
contextual_keywords: &[
"auto",
"builtin",
"default",
"existential",
"union",
"raw",
"macro_rules",
"yeet",
"offset_of",
"asm",
"format_args",
],
literals: &["INT_NUMBER", "FLOAT_NUMBER", "CHAR", "BYTE", "STRING", "BYTE_STRING", "C_STRING"],
tokens: &["ERROR", "IDENT", "WHITESPACE", "LIFETIME_IDENT", "COMMENT", "SHEBANG"],
nodes: &[
@ -154,7 +166,9 @@ pub(crate) const KINDS_SRC: KindsSrc<'_> = KindsSrc {
"RECORD_EXPR",
"RECORD_EXPR_FIELD_LIST",
"RECORD_EXPR_FIELD",
"BOX_EXPR",
"OFFSET_OF_EXPR",
"ASM_EXPR",
"FORMAT_ARGS_EXPR",
// postfix
"CALL_EXPR",
"INDEX_EXPR",