paulk-asert commented on code in PR #2263:
URL: https://github.com/apache/groovy/pull/2263#discussion_r2202316790


##########
subprojects/groovy-groovysh/src/main/resources/nanorc/groovy.nanorc:
##########
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+syntax "Groovy" "\.(groovy|gradle)$"
+
+TYPE:        
"\<(boolean|byte|char|def|double|float|int|it|long|new|short|this|transient|var|void)\>"
+KEYWORD:     
"\<(case|catch|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
+KEYWORD:     
"\<(abstract|class|extends|final|implements|import|instanceof|interface|native|non-sealed|package)\>"
+KEYWORD:     
"\<(permits|private|protected|public|record|sealed|static|strictfp|super|synchronized|throws|trait|volatile)\>"
+PACKAGE:     "(([a-z0-9]{2,}[.]{1}){2,10}([a-z0-9]{2,}){0,1})"
+
+CLASS:       "\<[A-Z]{0,2}([A-Z]{1}[a-z0-9]+){1,}\>"
+# Annotation
+VARIABLE:    "@[A-Za-z]+"
+
+FUNCTION:    "\<(assert|print|println|sleep|from|where|select|as|in)\>"

Review Comment:
   In some cases I moved certain words to the group which looked nicest when 
testing with a particular theme. I think a review of all words could be done. 
Also, I made the regex expressions in other places know about additional 
characters that can be in methods but haven't relooked at the how that change 
affects syntax files.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@groovy.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to