@@ -223,6 +223,7 @@ export default function registerDSLanguage(monaco: typeof monacoEditor) {
223223 [ / a n y / , { token : "keyword.any" , next : "@arrowopen" } ] ,
224224 [ / a l l / , { token : "keyword.all" , next : "@arrowopen" } ] ,
225225 [ / n i l / , { token : "keyword.nil" } ] ,
226+ [ / s e l f / , { token : "keyword.self" } ] ,
226227 [ / \w + / , { token : "identifier.relorperm" } ] ,
227228 { include : "@whitespace" } ,
228229 ] ,
@@ -487,6 +488,9 @@ export default function registerDSLanguage(monaco: typeof monacoEditor) {
487488
488489 case "expression" :
489490 if ( resolved . resolvedRelationOrPermission === undefined ) {
491+ if ( resolved . reference . relationName === "self" ) {
492+ break ;
493+ }
490494 appendData (
491495 lineNumber ,
492496 colPosition ,
@@ -561,6 +565,7 @@ export default function registerDSLanguage(monaco: typeof monacoEditor) {
561565 { token : "keyword.definition" , foreground : "4242ff" } ,
562566 { token : "keyword.caveat" , foreground : "ff4271" } ,
563567 { token : "keyword.nil" , foreground : "999999" } ,
568+ { token : "keyword.self" , foreground : "999999" } ,
564569 { token : "keyword.any" , foreground : "23974d" } ,
565570 { token : "keyword.all" , foreground : "972323" } ,
566571
@@ -607,6 +612,7 @@ export default function registerDSLanguage(monaco: typeof monacoEditor) {
607612 { token : "keyword.definition" , foreground : "8787ff" } ,
608613 { token : "keyword.caveat" , foreground : "ff87a6" } ,
609614 { token : "keyword.nil" , foreground : "cccccc" } ,
615+ { token : "keyword.self" , foreground : "cccccc" } ,
610616 { token : "keyword.any" , foreground : "abe5ff" } ,
611617 { token : "keyword.all" , foreground : "ffabab" } ,
612618
0 commit comments