mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-22 05:10:04 -04:00
feat(fga): add FGA grammar
FGA is the DSL for [OpenFGA](https://openfga.dev/) authorization models - a zanzibar-like Role-Based Access Control system.
This commit is contained in:
parent
0d32ec3c3e
commit
5ca72f9b30
3 changed files with 59 additions and 0 deletions
50
runtime/queries/fga/highlights.scm
Normal file
50
runtime/queries/fga/highlights.scm
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
(call_expression
|
||||
function: (identifier) @function)
|
||||
|
||||
(call_expression
|
||||
function: (selector_expression
|
||||
field: (identifier) @function.method))
|
||||
|
||||
((type_identifier) @type.builtin
|
||||
(#match? @type.builtin "^(string|int|map|uint|list|timestamp|bool|duration|double|ipaddress)$"))
|
||||
|
||||
(condition_declaration
|
||||
name: (identifier) @function)
|
||||
|
||||
(version) @number
|
||||
|
||||
[
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
">>"
|
||||
"<<"
|
||||
"&"
|
||||
"&^"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"+"
|
||||
"-"
|
||||
"|"
|
||||
"^"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"or"
|
||||
"and"
|
||||
"but not"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"model"
|
||||
"schema"
|
||||
"type"
|
||||
"relations"
|
||||
"define"
|
||||
"from"
|
||||
] @keyword
|
||||
|
||||
"condition" @keyword.function
|
||||
|
||||
(comment) @comment
|
||||
Loading…
Add table
Add a link
Reference in a new issue