rust-analyzer/src/grammar.ron

162 lines
3.1 KiB
Text
Raw Normal View History

2017-12-28 22:21:54 +00:00
Grammar(
2018-07-30 14:46:50 +00:00
single_byte_tokens: [
[";", "SEMI"],
[",", "COMMA"],
["(", "L_PAREN"],
[")", "R_PAREN"],
["{", "L_CURLY"],
["}", "R_CURLY"],
["[", "L_BRACK"],
["]", "R_BRACK"],
["<", "L_ANGLE"],
[">", "R_ANGLE"],
["@", "AT"],
["#", "POUND"],
["~", "TILDE"],
["?", "QUESTION"],
["$", "DOLLAR"],
["&", "AMPERSAND"],
["|", "PIPE"],
["+", "PLUS"],
["*", "STAR"],
["/", "SLASH"],
["^", "CARET"],
["%", "PERCENT"],
],
multi_byte_tokens: [
[".", "DOT"],
["..", "DOTDOT"],
["...", "DOTDOTDOT"],
["..=", "DOTDOTEQ"],
[":", "COLON"],
["::", "COLONCOLON"],
["=", "EQ"],
["==", "EQEQ"],
["=>", "FAT_ARROW"],
["!", "EXCL"],
["!=", "NEQ"],
["-", "MINUS"],
["->", "THIN_ARROW"],
],
2018-01-01 15:58:46 +00:00
keywords: [
"use",
"fn",
"struct",
"enum",
"trait",
"impl",
2018-01-08 18:21:59 +00:00
"true",
"false",
2018-01-08 21:06:42 +00:00
"as",
"extern",
"crate",
2018-01-09 19:35:55 +00:00
"mod",
2018-01-12 19:05:46 +00:00
"pub",
"self",
"super",
2018-01-13 08:55:03 +00:00
"in",
2018-01-13 19:00:26 +00:00
"where",
2018-01-30 19:53:19 +00:00
"for",
"loop",
"while",
"if",
2018-02-02 20:30:17 +00:00
"match",
"const",
"static",
2018-02-02 20:45:15 +00:00
"mut",
2018-02-03 09:05:25 +00:00
"unsafe",
2018-02-10 09:35:40 +00:00
"type",
"ref",
"let",
2018-01-01 15:58:46 +00:00
],
2018-02-04 13:46:26 +00:00
contextual_keywords: [
"auto",
"default",
"union",
],
2017-12-31 20:27:36 +00:00
tokens: [
2017-12-29 21:48:47 +00:00
"ERROR",
2017-12-28 22:21:54 +00:00
"IDENT",
2017-12-29 21:48:47 +00:00
"UNDERSCORE",
2017-12-28 22:21:54 +00:00
"WHITESPACE",
2017-12-30 12:22:40 +00:00
"INT_NUMBER",
"FLOAT_NUMBER",
2017-12-31 07:41:42 +00:00
"LIFETIME",
2017-12-31 11:02:55 +00:00
"CHAR",
"BYTE",
"STRING",
"RAW_STRING",
"BYTE_STRING",
"RAW_BYTE_STRING",
2017-12-31 13:42:22 +00:00
"COMMENT",
"DOC_COMMENT",
"SHEBANG",
2017-12-31 20:27:36 +00:00
],
nodes: [
2018-01-01 15:58:46 +00:00
"FILE",
2018-02-02 19:08:14 +00:00
2018-01-06 14:16:00 +00:00
"STRUCT_ITEM",
2018-01-28 19:59:18 +00:00
"ENUM_ITEM",
2018-01-07 13:01:30 +00:00
"FN_ITEM",
2018-01-08 21:06:42 +00:00
"EXTERN_CRATE_ITEM",
2018-01-09 19:35:55 +00:00
"MOD_ITEM",
2018-01-09 20:32:18 +00:00
"USE_ITEM",
2018-02-02 20:45:15 +00:00
"STATIC_ITEM",
2018-02-03 09:05:25 +00:00
"CONST_ITEM",
2018-02-04 10:39:24 +00:00
"TRAIT_ITEM",
"IMPL_ITEM",
2018-02-10 09:35:40 +00:00
"TYPE_ITEM",
2018-02-02 19:08:14 +00:00
2018-02-10 21:46:17 +00:00
"PAREN_TYPE",
"TUPLE_TYPE",
"NEVER_TYPE",
"PATH_TYPE",
2018-02-11 08:19:54 +00:00
"POINTER_TYPE",
2018-02-11 08:37:08 +00:00
"ARRAY_TYPE",
"SLICE_TYPE",
2018-02-11 08:54:09 +00:00
"REFERENCE_TYPE",
2018-02-11 08:57:05 +00:00
"PLACEHOLDER_TYPE",
2018-02-11 09:51:09 +00:00
"FN_POINTER_TYPE",
2018-02-11 20:32:49 +00:00
"FOR_TYPE",
2018-02-10 21:46:17 +00:00
"REF_PAT",
"BIND_PAT",
"PLACEHOLDER_PAT",
"TUPLE_EXPR",
2018-07-30 14:02:51 +00:00
"PATH_EXPR",
2018-07-31 09:26:19 +00:00
"CALL_EXPR",
2018-07-31 09:51:00 +00:00
"REF_EXPR",
2018-02-02 19:08:14 +00:00
"EXTERN_BLOCK",
"ENUM_VARIANT",
"NAMED_FIELD",
"POS_FIELD",
"ATTR",
"META_ITEM", // not an item actually
2018-01-13 10:42:19 +00:00
"USE_TREE",
2018-01-09 20:32:18 +00:00
"PATH",
"PATH_SEGMENT",
2018-01-08 18:40:00 +00:00
"LITERAL",
2018-01-08 21:06:42 +00:00
"ALIAS",
2018-01-12 19:05:46 +00:00
"VISIBILITY",
2018-02-10 09:53:07 +00:00
"WHERE_CLAUSE",
2018-02-02 19:08:14 +00:00
"ABI",
2018-02-10 11:00:23 +00:00
"NAME",
"NAME_REF",
"VALUE_PARAMETER",
"BLOCK",
2018-07-31 09:59:52 +00:00
"LET_STMT",
2018-07-31 09:59:52 +00:00
"EXPR_STMT",
2018-07-30 14:02:51 +00:00
"TYPE_PARAM",
"LIFETIME_PARAM",
"TYPE_PARAM_LIST",
"TYPE_ARG_LIST",
2018-07-31 09:32:53 +00:00
"PARAM_LIST",
"ARG_LIST",
2017-12-28 22:21:54 +00:00
]
2018-01-28 15:53:53 +00:00
)