summaryrefslogtreecommitdiff
path: root/syntaxes
diff options
context:
space:
mode:
authorbscan <10503608+bscan@users.noreply.github.com>2023-07-03 07:54:27 -0400
committerbscan <10503608+bscan@users.noreply.github.com>2023-07-03 07:54:27 -0400
commit9d7e02599d3b0a67ea9517305d0a1ae94799e0ae (patch)
tree92dbe8c9727e64a893394702bfd6afb9148f5e41 /syntaxes
parent569253de648376ebdd3c15f161dcfee0b7ed940f (diff)
downloadPerlNavigator-9d7e02599d3b0a67ea9517305d0a1ae94799e0ae.zip
Improvements to the new class syntax. Remove :isa for perlcritic, improve syntax highlighting, update default profile
Diffstat (limited to 'syntaxes')
-rw-r--r--syntaxes/object-pad.json24
1 files changed, 22 insertions, 2 deletions
diff --git a/syntaxes/object-pad.json b/syntaxes/object-pad.json
index 9d6ea33..0d8cef0 100644
--- a/syntaxes/object-pad.json
+++ b/syntaxes/object-pad.json
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"information_for_contributors": [
- "To modify the grammar, simply update the JSON run the extension. This file detects scope (e.g. is Moo active) and the individual files define the syntax of the scope"
+ "This file provides highlighting for Object::Pad and the new 5.38 feature class"
],
"name": "objectpad",
"scopeName": "source.perl.package.objectpad",
@@ -26,7 +26,27 @@
}
},
{
- "match": "\\b(class|role)\\s+([\\w:]+)\\b",
+ "match": "\\b(class)\\s+([\\w:]+)\\b(?:\\s+(\\d+(?:\\.\\d+)?))?(?:\\s+:(isa|does|repr)\\(\\s*([\\w:]+)\\s*\\))?",
+ "captures": {
+ "1": {
+ "name": "keyword.control.objectpad"
+ },
+ "2": {
+ "name": "entity.name.type.class.objectpad"
+ },
+ "3": {
+ "name": "constant.numeric.objectpad"
+ },
+ "4": {
+ "name": "constant.language.objectpad"
+ },
+ "5": {
+ "name": "entity.name.type.class.objectpad"
+ }
+ }
+ },
+ {
+ "match": "\\b(role)\\s+([\\w:]+)\\b",
"captures": {
"1": {
"name": "keyword.control.objectpad"