{
	"name": "Rust",
	"scopeName": "source.rune",
	"patterns": [
		{
			"comment": "boxed slice literal",
			"begin": "(<)(\\[)",
			"beginCaptures": {
				"1": {
					"name": "punctuation.brackets.angle.rune"
				},
				"2": {
					"name": "punctuation.brackets.square.rune"
				}
			},
			"end": ">",
			"endCaptures": {
				"0": {
					"name": "punctuation.brackets.angle.rune"
				}
			},
			"patterns": [
				{
					"include": "#block-comments"
				},
				{
					"include": "#comments"
				},
				{
					"include": "#gtypes"
				},
				{
					"include": "#lvariables"
				},
				{
					"include": "#lifetimes"
				},
				{
					"include": "#punctuation"
				},
				{
					"include": "#types"
				}
			]
		},
		{
			"comment": "macro type metavariables",
			"name": "meta.macro.metavariable.type.rune",
			"match": "(\\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?",
			"captures": {
				"1": {
					"name": "keyword.operator.macro.dollar.rune"
				},
				"3": {
					"name": "keyword.other.crate.rune"
				},
				"4": {
					"name": "entity.name.type.metavariable.rune"
				},
				"6": {
					"name": "keyword.operator.key-value.rune"
				},
				"7": {
					"name": "variable.other.metavariable.specifier.rune"
				}
			},
			"patterns": [
				{
					"include": "#keywords"
				}
			]
		},
		{
			"comment": "macro metavariables",
			"name": "meta.macro.metavariable.rune",
			"match": "(\\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?",
			"captures": {
				"1": {
					"name": "keyword.operator.macro.dollar.rune"
				},
				"2": {
					"name": "variable.other.metavariable.name.rune"
				},
				"4": {
					"name": "keyword.operator.key-value.rune"
				},
				"5": {
					"name": "variable.other.metavariable.specifier.rune"
				}
			},
			"patterns": [
				{
					"include": "#keywords"
				}
			]
		},
		{
			"comment": "macro rules",
			"name": "meta.macro.rules.rune",
			"match": "\\b(macro_rules!)\\s+(([a-z0-9_]+)|([A-Z][a-z0-9_]*))\\s+(\\{)",
			"captures": {
				"1": {
					"name": "entity.name.function.macro.rules.rune"
				},
				"3": {
					"name": "entity.name.function.macro.rune"
				},
				"4": {
					"name": "entity.name.type.macro.rune"
				},
				"5": {
					"name": "punctuation.brackets.curly.rune"
				}
			}
		},
		{
			"comment": "attributes",
			"name": "meta.attribute.rune",
			"begin": "(#)(\\!?)(\\[)",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.attribute.rune"
				},
				"2": {
					"name": "keyword.operator.attribute.inner.rune"
				},
				"3": {
					"name": "punctuation.brackets.attribute.rune"
				}
			},
			"end": "\\]",
			"endCaptures": {
				"0": {
					"name": "punctuation.brackets.attribute.rune"
				}
			},
			"patterns": [
				{
					"include": "#block-comments"
				},
				{
					"include": "#comments"
				},
				{
					"include": "#keywords"
				},
				{
					"include": "#lifetimes"
				},
				{
					"include": "#punctuation"
				},
				{
					"include": "#strings"
				},
				{
					"include": "#gtypes"
				},
				{
					"include": "#types"
				}
			]
		},
		{
			"comment": "modules",
			"match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)",
			"captures": {
				"1": {
					"name": "storage.type.rune"
				},
				"2": {
					"name": "entity.name.module.rune"
				}
			}
		},
		{
			"comment": "external crate imports",
			"name": "meta.import.rune",
			"begin": "\\b(extern)\\s+(crate)",
			"beginCaptures": {
				"1": {
					"name": "storage.type.rune"
				},
				"2": {
					"name": "keyword.other.crate.rune"
				}
			},
			"end": ";",
			"endCaptures": {
				"0": {
					"name": "punctuation.semi.rune"
				}
			},
			"patterns": [
				{
					"include": "#block-comments"
				},
				{
					"include": "#comments"
				},
				{
					"include": "#keywords"
				},
				{
					"include": "#punctuation"
				}
			]
		},
		{
			"comment": "use statements",
			"name": "meta.use.rune",
			"begin": "\\b(use)\\s",
			"beginCaptures": {
				"1": {
					"name": "keyword.other.rune"
				}
			},
			"end": ";",
			"endCaptures": {
				"0": {
					"name": "punctuation.semi.rune"
				}
			},
			"patterns": [
				{
					"include": "#block-comments"
				},
				{
					"include": "#comments"
				},
				{
					"include": "#keywords"
				},
				{
					"include": "#namespaces"
				},
				{
					"include": "#punctuation"
				},
				{
					"include": "#types"
				},
				{
					"include": "#lvariables"
				}
			]
		},
		{
			"include": "#block-comments"
		},
		{
			"include": "#comments"
		},
		{
			"include": "#lvariables"
		},
		{
			"include": "#constants"
		},
		{
			"include": "#gtypes"
		},
		{
			"include": "#functions"
		},
		{
			"include": "#types"
		},
		{
			"include": "#keywords"
		},
		{
			"include": "#lifetimes"
		},
		{
			"include": "#macros"
		},
		{
			"include": "#namespaces"
		},
		{
			"include": "#punctuation"
		},
		{
			"include": "#strings"
		},
		{
			"include": "#variables"
		}
	],
	"repository": {
		"comments": {
			"patterns": [
				{
					"comment": "documentation comments",
					"name": "comment.line.documentation.rune",
					"match": "^\\s*///.*"
				},
				{
					"comment": "line comments",
					"name": "comment.line.double-slash.rune",
					"match": "\\s*//.*"
				}
			]
		},
		"block-comments": {
			"patterns": [
				{
					"comment": "empty block comments",
					"name": "comment.block.rune",
					"match": "/\\*\\*/"
				},
				{
					"comment": "block documentation comments",
					"name": "comment.block.documentation.rune",
					"begin": "/\\*\\*",
					"end": "\\*/",
					"patterns": [
						{
							"include": "#block-comments"
						}
					]
				},
				{
					"comment": "block comments",
					"name": "comment.block.rune",
					"begin": "/\\*(?!\\*)",
					"end": "\\*/",
					"patterns": [
						{
							"include": "#block-comments"
						}
					]
				}
			]
		},
		"constants": {
			"patterns": [
				{
					"comment": "ALL CAPS constants",
					"name": "constant.other.caps.rune",
					"match": "\\b[A-Z]{2}[A-Z0-9_]*\\b"
				},
				{
					"comment": "constant declarations",
					"match": "\\b(const)\\s+([A-Z][A-Za-z0-9_]*)\\b",
					"captures": {
						"1": {
							"name": "storage.type.rune"
						},
						"2": {
							"name": "constant.other.caps.rune"
						}
					}
				},
				{
					"comment": "decimal integers and floats",
					"name": "constant.numeric.decimal.rune",
					"match": "\\b\\d[\\d_]*(\\.?)[\\d_]*(?:(E)([+-])([\\d_]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
					"captures": {
						"1": {
							"name": "punctuation.separator.dot.decimal.rune"
						},
						"2": {
							"name": "keyword.operator.exponent.rune"
						},
						"3": {
							"name": "keyword.operator.exponent.sign.rune"
						},
						"4": {
							"name": "constant.numeric.decimal.exponent.mantissa.rune"
						},
						"5": {
							"name": "entity.name.type.numeric.rune"
						}
					}
				},
				{
					"comment": "hexadecimal integers",
					"name": "constant.numeric.hex.rune",
					"match": "\\b0x[\\da-fA-F_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
					"captures": {
						"1": {
							"name": "entity.name.type.numeric.rune"
						}
					}
				},
				{
					"comment": "octal integers",
					"name": "constant.numeric.oct.rune",
					"match": "\\b0o[0-7_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
					"captures": {
						"1": {
							"name": "entity.name.type.numeric.rune"
						}
					}
				},
				{
					"comment": "binary integers",
					"name": "constant.numeric.bin.rune",
					"match": "\\b0b[01_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
					"captures": {
						"1": {
							"name": "entity.name.type.numeric.rune"
						}
					}
				},
				{
					"comment": "booleans",
					"name": "constant.language.bool.rune",
					"match": "\\b(true|false)\\b"
				}
			]
		},
		"escapes": {
			"comment": "escapes: ASCII, byte, Unicode, quote, regex",
			"name": "constant.character.escape.rune",
			"match": "(\\\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
			"captures": {
				"1": {
					"name": "constant.character.escape.backslash.rune"
				},
				"2": {
					"name": "constant.character.escape.bit.rune"
				},
				"3": {
					"name": "constant.character.escape.unicode.rune"
				},
				"4": {
					"name": "constant.character.escape.unicode.punctuation.rune"
				},
				"5": {
					"name": "constant.character.escape.unicode.punctuation.rune"
				}
			}
		},
		"functions": {
			"patterns": [
				{
					"comment": "pub as a function",
					"match": "\\b(pub)(\\()",
					"captures": {
						"1": {
							"name": "keyword.other.rune"
						},
						"2": {
							"name": "punctuation.brackets.round.rune"
						}
					}
				},
				{
					"comment": "function definition",
					"name": "meta.function.definition.rune",
					"begin": "\\b(fn)\\s+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\\()|(<))",
					"beginCaptures": {
						"1": {
							"name": "keyword.other.fn.rune"
						},
						"2": {
							"name": "entity.name.function.rune"
						},
						"4": {
							"name": "punctuation.brackets.round.rune"
						},
						"5": {
							"name": "punctuation.brackets.angle.rune"
						}
					},
					"end": "\\{|;",
					"endCaptures": {
						"0": {
							"name": "punctuation.brackets.curly.rune"
						}
					},
					"patterns": [
						{
							"include": "#block-comments"
						},
						{
							"include": "#comments"
						},
						{
							"include": "#keywords"
						},
						{
							"include": "#lvariables"
						},
						{
							"include": "#constants"
						},
						{
							"include": "#gtypes"
						},
						{
							"include": "#functions"
						},
						{
							"include": "#lifetimes"
						},
						{
							"include": "#macros"
						},
						{
							"include": "#namespaces"
						},
						{
							"include": "#punctuation"
						},
						{
							"include": "#strings"
						},
						{
							"include": "#types"
						},
						{
							"include": "#variables"
						}
					]
				},
				{
					"comment": "function/method calls, chaining",
					"name": "meta.function.call.rune",
					"begin": "((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(\\()",
					"beginCaptures": {
						"1": {
							"name": "entity.name.function.rune"
						},
						"2": {
							"name": "punctuation.brackets.round.rune"
						}
					},
					"end": "\\)",
					"endCaptures": {
						"0": {
							"name": "punctuation.brackets.round.rune"
						}
					},
					"patterns": [
						{
							"include": "#block-comments"
						},
						{
							"include": "#comments"
						},
						{
							"include": "#keywords"
						},
						{
							"include": "#lvariables"
						},
						{
							"include": "#constants"
						},
						{
							"include": "#gtypes"
						},
						{
							"include": "#functions"
						},
						{
							"include": "#lifetimes"
						},
						{
							"include": "#macros"
						},
						{
							"include": "#namespaces"
						},
						{
							"include": "#punctuation"
						},
						{
							"include": "#strings"
						},
						{
							"include": "#types"
						},
						{
							"include": "#variables"
						}
					]
				},
				{
					"comment": "function/method calls with turbofish",
					"name": "meta.function.call.rune",
					"begin": "((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(?=::<.*>\\()",
					"beginCaptures": {
						"1": {
							"name": "entity.name.function.rune"
						}
					},
					"end": "\\)",
					"endCaptures": {
						"0": {
							"name": "punctuation.brackets.round.rune"
						}
					},
					"patterns": [
						{
							"include": "#block-comments"
						},
						{
							"include": "#comments"
						},
						{
							"include": "#keywords"
						},
						{
							"include": "#lvariables"
						},
						{
							"include": "#constants"
						},
						{
							"include": "#gtypes"
						},
						{
							"include": "#functions"
						},
						{
							"include": "#lifetimes"
						},
						{
							"include": "#macros"
						},
						{
							"include": "#namespaces"
						},
						{
							"include": "#punctuation"
						},
						{
							"include": "#strings"
						},
						{
							"include": "#types"
						},
						{
							"include": "#variables"
						}
					]
				}
			]
		},
		"keywords": {
			"patterns": [
				{
					"comment": "control flow keywords",
					"name": "keyword.control.rune",
					"match": "\\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield|select)\\b"
				},
				{
					"comment": "storage keywords",
					"name": "keyword.other.rune storage.type.rune",
					"match": "\\b(extern|let|macro|mod)\\b"
				},
				{
					"comment": "const keyword",
					"name": "storage.modifier.rune",
					"match": "\\b(const)\\b"
				},
				{
					"comment": "type keyword",
					"name": "keyword.declaration.type.rune storage.type.rune",
					"match": "\\b(type)\\b"
				},
				{
					"comment": "enum keyword",
					"name": "keyword.declaration.enum.rune storage.type.rune",
					"match": "\\b(enum)\\b"
				},
				{
					"comment": "trait keyword",
					"name": "keyword.declaration.trait.rune storage.type.rune",
					"match": "\\b(trait)\\b"
				},
				{
					"comment": "struct keyword",
					"name": "keyword.declaration.struct.rune storage.type.rune",
					"match": "\\b(struct)\\b"
				},
				{
					"comment": "storage modifiers",
					"name": "storage.modifier.rune",
					"match": "\\b(abstract|static)\\b"
				},
				{
					"comment": "other keywords",
					"name": "keyword.other.rune",
					"match": "\\b(as|async|become|box|dyn|move|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\b"
				},
				{
					"comment": "fn",
					"name": "keyword.other.fn.rune",
					"match": "\\bfn\\b"
				},
				{
					"comment": "crate",
					"name": "keyword.other.crate.rune",
					"match": "\\bcrate\\b"
				},
				{
					"comment": "mut",
					"name": "storage.modifier.mut.rune",
					"match": "\\bmut\\b"
				},
				{
					"comment": "logical operators",
					"name": "keyword.operator.logical.rune",
					"match": "(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)"
				},
				{
					"comment": "logical AND, borrow references",
					"name": "keyword.operator.borrow.and.rune",
					"match": "&(?![&=])"
				},
				{
					"comment": "assignment operators",
					"name": "keyword.operator.assignment.rune",
					"match": "(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)"
				},
				{
					"comment": "single equal",
					"name": "keyword.operator.assignment.equal.rune",
					"match": "(?<![<>])=(?!=|>)"
				},
				{
					"comment": "comparison operators",
					"name": "keyword.operator.comparison.rune",
					"match": "(=(=)?(?!>)|!=|<=|(?<!=)>=)"
				},
				{
					"comment": "math operators",
					"name": "keyword.operator.math.rune",
					"match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))"
				},
				{
					"comment": "less than, greater than (special case)",
					"match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))",
					"captures": {
						"1": {
							"name": "punctuation.brackets.round.rune"
						},
						"2": {
							"name": "punctuation.brackets.square.rune"
						},
						"3": {
							"name": "punctuation.brackets.curly.rune"
						},
						"4": {
							"name": "keyword.operator.comparison.rune"
						},
						"5": {
							"name": "punctuation.brackets.round.rune"
						},
						"6": {
							"name": "punctuation.brackets.square.rune"
						},
						"7": {
							"name": "punctuation.brackets.curly.rune"
						}
					}
				},
				{
					"comment": "namespace operator",
					"name": "keyword.operator.namespace.rune",
					"match": "::"
				},
				{
					"comment": "dereference asterisk",
					"match": "(\\*)(?=\\w+)",
					"captures": {
						"1": {
							"name": "keyword.operator.dereference.rune"
						}
					}
				},
				{
					"comment": "subpattern binding",
					"name": "keyword.operator.subpattern.rune",
					"match": "@"
				},
				{
					"comment": "dot access",
					"name": "keyword.operator.access.dot.rune",
					"match": "\\.(?!\\.)"
				},
				{
					"comment": "ranges, range patterns",
					"name": "keyword.operator.range.rune",
					"match": "\\.{2}(=|\\.)?"
				},
				{
					"comment": "colon",
					"name": "keyword.operator.key-value.rune",
					"match": ":(?!:)"
				},
				{
					"comment": "dashrocket, skinny arrow",
					"name": "keyword.operator.arrow.skinny.rune",
					"match": "->"
				},
				{
					"comment": "hashrocket, fat arrow",
					"name": "keyword.operator.arrow.fat.rune",
					"match": "=>"
				},
				{
					"comment": "dollar macros",
					"name": "keyword.operator.macro.dollar.rune",
					"match": "\\$"
				},
				{
					"comment": "question mark operator, questionably sized, macro kleene matcher",
					"name": "keyword.operator.question.rune",
					"match": "\\?"
				}
			]
		},
		"interpolations": {
			"comment": "curly brace interpolations",
			"name": "meta.interpolation.rune",
			"match": "({)[^\"{}]*(})",
			"captures": {
				"1": {
					"name": "punctuation.definition.interpolation.rune"
				},
				"2": {
					"name": "punctuation.definition.interpolation.rune"
				}
			}
		},
		"templateinterpolations": {
			"comment": "template interpolations",
			"name": "meta.templateinterpolation.rune",
			"match": "([$]{)[^`{}]*(})",
			"captures": {
				"1": {
					"name": "punctuation.definition.templateinterpolation.rune"
				},
				"2": {
					"name": "punctuation.definition.templateinterpolation.rune"
				}
			}
		},
		"lifetimes": {
			"patterns": [
				{
					"comment": "named lifetime parameters",
					"match": "(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b",
					"captures": {
						"1": {
							"name": "punctuation.definition.lifetime.rune"
						},
						"2": {
							"name": "entity.name.type.lifetime.rune"
						}
					}
				},
				{
					"comment": "borrowing references to named lifetimes",
					"match": "(\\&)(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b",
					"captures": {
						"1": {
							"name": "keyword.operator.borrow.rune"
						},
						"2": {
							"name": "punctuation.definition.lifetime.rune"
						},
						"3": {
							"name": "entity.name.type.lifetime.rune"
						}
					}
				}
			]
		},
		"macros": {
			"patterns": [
				{
					"comment": "macros",
					"name": "meta.macro.rune",
					"match": "(([a-z_][A-Za-z0-9_]*!)|([A-Z_][A-Za-z0-9_]*!))",
					"captures": {
						"2": {
							"name": "entity.name.function.macro.rune"
						},
						"3": {
							"name": "entity.name.type.macro.rune"
						}
					}
				}
			]
		},
		"namespaces": {
			"patterns": [
				{
					"comment": "namespace (non-type, non-function path segment)",
					"match": "(?<![A-Za-z0-9_])([a-z0-9_]+)((?<!super|self)::)",
					"captures": {
						"1": {
							"name": "entity.name.namespace.rune"
						},
						"2": {
							"name": "keyword.operator.namespace.rune"
						}
					}
				}
			]
		},
		"types": {
			"patterns": [
				{
					"comment": "numeric types",
					"match": "(?<![A-Za-z])(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)\\b",
					"captures": {
						"1": {
							"name": "entity.name.type.numeric.rune"
						}
					}
				},
				{
					"comment": "parameterized types",
					"begin": "\\b([A-Z][A-Za-z0-9]*)(<)",
					"beginCaptures": {
						"1": {
							"name": "entity.name.type.rune"
						},
						"2": {
							"name": "punctuation.brackets.angle.rune"
						}
					},
					"end": ">",
					"endCaptures": {
						"0": {
							"name": "punctuation.brackets.angle.rune"
						}
					},
					"patterns": [
						{
							"include": "#block-comments"
						},
						{
							"include": "#comments"
						},
						{
							"include": "#keywords"
						},
						{
							"include": "#lvariables"
						},
						{
							"include": "#lifetimes"
						},
						{
							"include": "#punctuation"
						},
						{
							"include": "#types"
						},
						{
							"include": "#variables"
						}
					]
				},
				{
					"comment": "primitive types",
					"name": "entity.name.type.primitive.rune",
					"match": "\\b(bool|char|str)\\b"
				},
				{
					"comment": "trait declarations",
					"match": "\\b(trait)\\s+([A-Z][A-Za-z0-9]*)\\b",
					"captures": {
						"1": {
							"name": "keyword.declaration.trait.rune storage.type.rune"
						},
						"2": {
							"name": "entity.name.type.trait.rune"
						}
					}
				},
				{
					"comment": "struct declarations",
					"match": "\\b(struct)\\s+([A-Z][A-Za-z0-9]*)\\b",
					"captures": {
						"1": {
							"name": "keyword.declaration.struct.rune storage.type.rune"
						},
						"2": {
							"name": "entity.name.type.struct.rune"
						}
					}
				},
				{
					"comment": "enum declarations",
					"match": "\\b(enum)\\s+([A-Z][A-Za-z0-9_]*)\\b",
					"captures": {
						"1": {
							"name": "keyword.declaration.enum.rune storage.type.rune"
						},
						"2": {
							"name": "entity.name.type.enum.rune"
						}
					}
				},
				{
					"comment": "type declarations",
					"match": "\\b(type)\\s+([A-Z][A-Za-z0-9_]*)\\b",
					"captures": {
						"1": {
							"name": "keyword.declaration.type.rune storage.type.rune"
						},
						"2": {
							"name": "entity.name.type.declaration.rune"
						}
					}
				},
				{
					"comment": "types",
					"name": "entity.name.type.rune",
					"match": "\\b[A-Z][A-Za-z0-9]*\\b(?!!)"
				}
			]
		},
		"gtypes": {
			"patterns": [
				{
					"comment": "option types",
					"name": "entity.name.type.option.rune",
					"match": "\\b(Some|None)\\b"
				},
				{
					"comment": "result types",
					"name": "entity.name.type.result.rune",
					"match": "\\b(Ok|Err)\\b"
				}
			]
		},
		"punctuation": {
			"patterns": [
				{
					"comment": "comma",
					"name": "punctuation.comma.rune",
					"match": ","
				},
				{
					"comment": "curly braces",
					"name": "punctuation.brackets.curly.rune",
					"match": "[{}]"
				},
				{
					"comment": "parentheses, round brackets",
					"name": "punctuation.brackets.round.rune",
					"match": "[()]"
				},
				{
					"comment": "semicolon",
					"name": "punctuation.semi.rune",
					"match": ";"
				},
				{
					"comment": "square brackets",
					"name": "punctuation.brackets.square.rune",
					"match": "[\\[\\]]"
				},
				{
					"comment": "angle brackets",
					"name": "punctuation.brackets.angle.rune",
					"match": "(?<!=)[<>]"
				}
			]
		},
		"strings": {
			"patterns": [
				{
					"comment": "double-quoted strings and byte strings",
					"name": "string.quoted.double.rune",
					"begin": "(b?)(\")",
					"beginCaptures": {
						"1": {
							"name": "string.quoted.byte.raw.rune"
						},
						"2": {
							"name": "punctuation.definition.string.rune"
						}
					},
					"end": "\"",
					"endCaptures": {
						"0": {
							"name": "punctuation.definition.string.rune"
						}
					},
					"patterns": [
						{
							"include": "#escapes"
						},
						{
							"include": "#interpolations"
						}
					]
				},
				{
					"comment": "double-quoted raw strings and raw byte strings",
					"name": "string.quoted.double.rune",
					"begin": "(b?r)(#*)(\")",
					"beginCaptures": {
						"1": {
							"name": "string.quoted.byte.raw.rune"
						},
						"2": {
							"name": "punctuation.definition.string.raw.rune"
						},
						"3": {
							"name": "punctuation.definition.string.rune"
						}
					},
					"end": "(\")(\\2)",
					"endCaptures": {
						"1": {
							"name": "punctuation.definition.string.rune"
						},
						"2": {
							"name": "punctuation.definition.string.raw.rune"
						}
					}
				},
				{
					"comment": "template strings",
					"name": "string.quoted.template.rune",
					"begin": "b?`",
					"beginCaptures": {
						"0": {
							"name": "punctuation.definition.template.rune"
						}
					},
					"end": "`",
					"endCaptures": {
						"0": {
							"name": "punctuation.definition.template.rune"
						}
					},
					"patterns": [
						{
							"include": "#escapes"
						},
						{
							"include": "#templateinterpolations"
						}
					]
				},
				{
					"comment": "characters and bytes",
					"name": "string.quoted.single.char.rune",
					"begin": "(b)?(')",
					"beginCaptures": {
						"1": {
							"name": "string.quoted.byte.raw.rune"
						},
						"2": {
							"name": "punctuation.definition.char.rune"
						}
					},
					"end": "'",
					"endCaptures": {
						"0": {
							"name": "punctuation.definition.char.rune"
						}
					},
					"patterns": [
						{
							"include": "#escapes"
						}
					]
				}
			]
		},
		"lvariables": {
			"patterns": [
				{
					"comment": "self",
					"name": "variable.language.self.rune",
					"match": "\\b[Ss]elf\\b"
				},
				{
					"comment": "super",
					"name": "variable.language.super.rune",
					"match": "\\bsuper\\b"
				}
			]
		},
		"variables": {
			"patterns": [
				{
					"comment": "variables",
					"name": "variable.other.rune",
					"match": "\\b(?<!(?<!\\.)\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b"
				}
			]
		}
	}
}
