{"name":"WGSL","scopeName":"source.wgsl","patterns":[{"include":"#line_comments"},{"include":"#keywords"},{"include":"#functions"},{"include":"#function_calls"},{"include":"#constants"},{"include":"#types"},{"include":"#variables"},{"include":"#punctuation"}],"repository":{"constants":{"patterns":[{"name":"constant.numeric.float.wgsl","match":"(-?\\b[0-9][0-9]*\\.[0-9][0-9]*)([eE][+-]?[0-9]+)?\\b"},{"name":"constant.numeric.decimal.wgsl","match":"-?\\b0x[0-9a-fA-F]+\\b|\\b0\\b|-?\\b[1-9][0-9]*\\b"},{"name":"constant.numeric.decimal.wgsl","match":"\\b0x[0-9a-fA-F]+u\\b|\\b0u\\b|\\b[1-9][0-9]*u\\b"},{"name":"constant.language.boolean.wgsl","match":"\\b(true|false)\\b"}]},"function_calls":{"patterns":[{"name":"meta.function.call.wgsl","begin":"([A-Za-z0-9_]+)(\\()","end":"\\)","patterns":[{"include":"#line_comments"},{"include":"#keywords"},{"include":"#function_calls"},{"include":"#constants"},{"include":"#types"},{"include":"#variables"},{"include":"#punctuation"}],"beginCaptures":{"1":{"name":"entity.name.function.wgsl"},"2":{"name":"punctuation.brackets.round.wgsl"}},"endCaptures":{"0":{"name":"punctuation.brackets.round.wgsl"}}}]},"functions":{"patterns":[{"name":"meta.function.definition.wgsl","begin":"\\b(fn)\\s+([A-Za-z0-9_]+)((\\()|(\u003c))","end":"\\{","patterns":[{"include":"#line_comments"},{"include":"#keywords"},{"include":"#function_calls"},{"include":"#constants"},{"include":"#types"},{"include":"#variables"},{"include":"#punctuation"}],"beginCaptures":{"1":{"name":"keyword.other.fn.wgsl"},"2":{"name":"entity.name.function.wgsl"},"4":{"name":"punctuation.brackets.round.wgsl"}},"endCaptures":{"0":{"name":"punctuation.brackets.curly.wgsl"}}}]},"keywords":{"patterns":[{"name":"keyword.control.wgsl","match":"\\b(bitcast|block|break|case|continue|continuing|default|discard|else|elseif|enable|fallthrough|for|function|if|loop|override|private|read|read_write|return|storage|switch|uniform|while|workgroup|write)\\b"},{"name":"keyword.control.wgsl","match":"\\b(asm|const|do|enum|handle|mat|premerge|regardless|typedef|unless|using|vec|void)\\b"},{"name":"keyword.other.wgsl storage.type.wgsl","match":"\\b(let|var)\\b"},{"name":"keyword.declaration.type.wgsl storage.type.wgsl","match":"\\b(type)\\b"},{"name":"keyword.declaration.enum.wgsl storage.type.wgsl","match":"\\b(enum)\\b"},{"name":"keyword.declaration.struct.wgsl storage.type.wgsl","match":"\\b(struct)\\b"},{"name":"keyword.other.fn.wgsl","match":"\\bfn\\b"},{"name":"keyword.operator.logical.wgsl","match":"(\\^|\\||\\|\\||\u0026\u0026|\u003c\u003c|\u003e\u003e|!)(?!=)"},{"name":"keyword.operator.borrow.and.wgsl","match":"\u0026(?![\u0026=])"},{"name":"keyword.operator.assignment.wgsl","match":"(\\+=|-=|\\*=|/=|%=|\\^=|\u0026=|\\|=|\u003c\u003c=|\u003e\u003e=)"},{"name":"keyword.operator.assignment.equal.wgsl","match":"(?\u003c![\u003c\u003e])=(?!=|\u003e)"},{"name":"keyword.operator.comparison.wgsl","match":"(=(=)?(?!\u003e)|!=|\u003c=|(?\u003c!=)\u003e=)"},{"name":"keyword.operator.math.wgsl","match":"(([+%]|(\\*(?!\\w)))(?!=))|(-(?!\u003e))|(/(?!/))"},{"name":"keyword.operator.access.dot.wgsl","match":"\\.(?!\\.)"},{"name":"keyword.operator.arrow.skinny.wgsl","match":"-\u003e"}]},"line_comments":{"name":"comment.line.double-slash.wgsl","match":"\\s*//.*"},"punctuation":{"patterns":[{"name":"punctuation.comma.wgsl","match":","},{"name":"punctuation.brackets.curly.wgsl","match":"[{}]"},{"name":"punctuation.brackets.round.wgsl","match":"[()]"},{"name":"punctuation.semi.wgsl","match":";"},{"name":"punctuation.brackets.square.wgsl","match":"[\\[\\]]"},{"name":"punctuation.brackets.angle.wgsl","match":"(?\u003c!=)[\u003c\u003e]"}]},"types":{"name":"storage.type.wgsl","patterns":[{"name":"storage.type.wgsl","match":"\\b(bool|i32|u32|f32)\\b"},{"name":"storage.type.wgsl","match":"\\b(i64|u64|f64)\\b"},{"name":"storage.type.wgsl","match":"\\b(vec[2-4]|mat[2-4]x[2-4])\\b"},{"name":"storage.type.wgsl","match":"\\b(atomic)\\b"},{"name":"storage.type.wgsl","match":"\\b(array)\\b"},{"name":"entity.name.type.wgsl","match":"\\b([A-Z][A-Za-z0-9]*)\\b"}]},"variables":{"patterns":[{"name":"variable.other.wgsl","match":"\\b(?\u003c!(?\u003c!\\.)\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b"}]}}}
