From 426b5a4eff31c291da505165b78a337f97d0711e Mon Sep 17 00:00:00 2001 From: Chinmay Dalal Date: Mon, 17 Aug 2020 05:32:28 +0530 Subject: [PATCH] [java] fix highlight for ":" after label, move operator to the end --- queries/java/highlights.scm | 86 +++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/queries/java/highlights.scm b/queries/java/highlights.scm index f3da9af31..aeb02f021 100644 --- a/queries/java/highlights.scm +++ b/queries/java/highlights.scm @@ -31,47 +31,6 @@ name: (identifier) @attribute) -; Operators - -[ -"@" -"+" -"?" -":" -"++" -"-" -"--" -"&" -"&&" -"|" -"||" -"!=" -"==" -"*" -"/" -"%" -"<" -"<=" -">" -">=" -"=" -"-=" -"+=" -"*=" -"/=" -"%=" -"->" -"^" -"^=" -"&=" -"|=" -"~" -">>" -">>>" -"<<" -"::" -] @operator - ; Types (interface_declaration @@ -205,6 +164,9 @@ "." "," ] @punctuation.delimiter +(labeled_statement + (identifier) + (":") @punctuation.delimiter) [ "[" @@ -216,5 +178,47 @@ ] @punctuation.bracket ; Labels + (labeled_statement (identifier) @label) + +; Operators + +[ +"@" +"+" +"?" +":" +"++" +"-" +"--" +"&" +"&&" +"|" +"||" +"!=" +"==" +"*" +"/" +"%" +"<" +"<=" +">" +">=" +"=" +"-=" +"+=" +"*=" +"/=" +"%=" +"->" +"^" +"^=" +"&=" +"|=" +"~" +">>" +">>>" +"<<" +"::" +] @operator