Skip to content

Commit

Permalink
fix: adding dashes and minus to indentifiers (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-jeffery authored Apr 12, 2024
1 parent 1af3ce0 commit 65663e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tools/prism/language-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ export const languageDefinition = {
lookbehind: true,
},
[OpenFgaDslThemeTokenType.TYPE]: {
pattern: /(\btype\s+)\w+/i,
pattern: /(\btype\s+)[\w_-]+/i,
lookbehind: true,
},
[OpenFgaDslThemeTokenType.EXTEND]: {
pattern: /(\bextend type\s+)\w+/i,
pattern: /(\bextend type\s+)[\w_-]+/i,
lookbehind: true,
},
[OpenFgaDslThemeTokenType.RELATION]: {
pattern: /(\bdefine\s+)\w+/i,
pattern: /(\bdefine\s+)[\w_-]+/i,
lookbehind: true,
},
[OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE]: /\[.*]|self/,
[OpenFgaDslThemeTokenType.CONDITION]: {
pattern: /(\bcondition\s+)\w+/i,
pattern: /(\bcondition\s+)[\w_-]+/i,
lookbehind: true,
},
"condition-params": {
pattern: /\(.*\)\s*{/,
inside: {
"condition-param": /\b(\w+)\s*:/i,
"condition-param": /\b([\w_-]+)\s*:/i,
"condition-param-type": /\b(string|int|map|uint|list|timestamp|bool|duration|double|ipaddress)\b/,
},
},
Expand Down

0 comments on commit 65663e3

Please sign in to comment.