aboutsummaryrefslogtreecommitdiffstats
path: root/queries/soql
diff options
context:
space:
mode:
authorXi Xiao <xi.xiao007@gmail.com>2023-09-17 20:00:21 +0300
committerGitHub <noreply@github.com>2023-09-17 20:00:21 +0300
commit280cf6fddd09fbcdce659b24d0df9c3055977cd3 (patch)
tree966aaab4295fe6c6f1db6ee179b6bc789de142f0 /queries/soql
parentfix(dockerfile): bash injection on run instructions (diff)
downloadnvim-treesitter-280cf6fddd09fbcdce659b24d0df9c3055977cd3.tar
nvim-treesitter-280cf6fddd09fbcdce659b24d0df9c3055977cd3.tar.gz
nvim-treesitter-280cf6fddd09fbcdce659b24d0df9c3055977cd3.tar.bz2
nvim-treesitter-280cf6fddd09fbcdce659b24d0df9c3055977cd3.tar.lz
nvim-treesitter-280cf6fddd09fbcdce659b24d0df9c3055977cd3.tar.xz
nvim-treesitter-280cf6fddd09fbcdce659b24d0df9c3055977cd3.tar.zst
nvim-treesitter-280cf6fddd09fbcdce659b24d0df9c3055977cd3.zip
feat: add parsers and queries for apex, sosl, soql (#5396)
Diffstat (limited to 'queries/soql')
-rw-r--r--queries/soql/highlights.scm150
1 files changed, 150 insertions, 0 deletions
diff --git a/queries/soql/highlights.scm b/queries/soql/highlights.scm
new file mode 100644
index 000000000..907f3d891
--- /dev/null
+++ b/queries/soql/highlights.scm
@@ -0,0 +1,150 @@
+(field_identifier
+ (identifier) @property)
+
+(field_identifier
+ (dotted_identifier
+ (identifier) @property))
+
+(type_of_clause
+ (identifier) @property)
+
+(when_expression
+ (identifier) @type)
+
+(when_expression
+ (field_list
+ (identifier) @property))
+
+(when_expression
+ (field_list
+ (dotted_identifier
+ (identifier) @property )))
+
+(else_expression
+ (field_list
+ (identifier) @property ))
+
+(else_expression
+ (field_list
+ (dotted_identifier
+ (identifier) @property )))
+
+(alias_expression
+ (identifier) @label)
+
+(storage_identifier) @storageclass
+(function_name) @function
+(date_literal) @string.special
+
+[
+ ","
+ "."
+ ":"
+ "?"
+ "("
+ ")"
+] @punctuation.delimiter
+
+[
+ "AND"
+ "OR"
+ "NOT"
+ "LIKE"
+ "NOT_IN"
+ "INCLUDES"
+ "EXCLUDES"
+] @keyword.operator
+
+[
+ "="
+ "!="
+ "<="
+ ">="
+] @operator
+
+(value_comparison_operator [ "<" ">" ] @operator)
+
+(set_comparison_operator "IN" @keyword.operator)
+
+[
+ (int)
+ (decimal)
+ (currency_literal)
+] @number
+(string_literal) @string
+(date) @variable.readonly
+(date_time) @variable.readonly
+
+[
+ "TRUE"
+ "FALSE"
+] @boolean
+
+(null_literal) @constant.builtin
+
+[
+ "ABOVE"
+ "ABOVE_OR_BELOW"
+ "ALL_ROWS"
+ "ALL"
+ "AS"
+ "ASC"
+ "AT"
+ "BELOW"
+ "CUSTOM"
+ "DATA_CATEGORY"
+ "DESC"
+ "END"
+ "FIELDS"
+ "FOR"
+ "FROM"
+ "GROUP_BY"
+ "HAVING"
+ "LIMIT"
+ "NULLS_FIRST"
+ "NULLS_LAST"
+ "OFFSET"
+ "ORDER_BY"
+ "REFERENCE"
+ "SELECT"
+ "STANDARD"
+ "TRACKING"
+ "TYPEOF"
+ "UPDATE"
+ "USING_SCOPE"
+ "VIEW"
+ "VIEWSTAT"
+ "WITH"
+] @keyword
+
+[
+ "WHERE"
+ "WHEN"
+ "ELSE"
+ "THEN"
+] @conditional
+
+; Using Scope
+[
+ "delegated"
+ "everything"
+ "mine"
+ "mine_and_my_groups"
+ "my_territory"
+ "my_team_territory"
+ "team"
+] @keyword
+
+; With
+[
+ "maxDescriptorPerRecord"
+ "RecordVisibilityContext"
+ "Security_Enforced"
+ "supportsDomains"
+ "supportsDelegates"
+ "System_Mode"
+ "User_Mode"
+ "UserId"
+] @keyword
+
+