@@ -239,6 +239,7 @@ export default function registerDSLanguage(monaco: typeof monacoEditor) {
239239 [ / a n y / , { token : "keyword.any" , next : "@arrowopen" } ] ,
240240 [ / a l l / , { token : "keyword.all" , next : "@arrowopen" } ] ,
241241 [ / n i l / , { token : "keyword.nil" } ] ,
242+ [ / s e l f / , { token : "keyword.self" } ] ,
242243 [ / \w + / , { token : "identifier.relorperm" } ] ,
243244 { include : "@whitespace" } ,
244245 ] ,
@@ -503,6 +504,9 @@ export default function registerDSLanguage(monaco: typeof monacoEditor) {
503504
504505 case "expression" :
505506 if ( resolved . resolvedRelationOrPermission === undefined ) {
507+ if ( resolved . reference . relationName === "self" ) {
508+ break ;
509+ }
506510 appendData (
507511 lineNumber ,
508512 colPosition ,
@@ -577,6 +581,7 @@ export default function registerDSLanguage(monaco: typeof monacoEditor) {
577581 { token : "keyword.definition" , foreground : "4242ff" } ,
578582 { token : "keyword.caveat" , foreground : "ff4271" } ,
579583 { token : "keyword.nil" , foreground : "999999" } ,
584+ { token : "keyword.self" , foreground : "999999" } ,
580585 { token : "keyword.any" , foreground : "23974d" } ,
581586 { token : "keyword.all" , foreground : "972323" } ,
582587
@@ -623,6 +628,7 @@ export default function registerDSLanguage(monaco: typeof monacoEditor) {
623628 { token : "keyword.definition" , foreground : "8787ff" } ,
624629 { token : "keyword.caveat" , foreground : "ff87a6" } ,
625630 { token : "keyword.nil" , foreground : "cccccc" } ,
631+ { token : "keyword.self" , foreground : "cccccc" } ,
626632 { token : "keyword.any" , foreground : "abe5ff" } ,
627633 { token : "keyword.all" , foreground : "ffabab" } ,
628634
0 commit comments