feat(parsers): Add objectscript

This commit is contained in:
Dave McCaldon 2025-11-04 06:20:54 -05:00
commit b8085c5aec
No known key found for this signature in database
GPG key ID: 9A28A772F21A6342
7 changed files with 444 additions and 0 deletions

View file

@ -0,0 +1,35 @@
; Indentation rules for ObjectScript UDL (nvim-treesitter)
; --- Class Definition ---
(class_body
"{" @indent.begin
"}" @indent.end)
; --- Block-style commands with braces ---
(command_while
"{" @indent.begin
"}" @indent.end)
(command_for
"{" @indent.begin
"}" @indent.end)
(command_if
"{" @indent.begin
"}" @indent.end)
(elseif_block
"{" @indent.begin
"}" @indent.end)
(else_block
"{" @indent.begin
"}" @indent.end)
; --- Generic brace and parenthesis handling ---
"{" @indent.begin
"}" @indent.end
("(" @indent.align
(#set! indent.open_delimiter "(")
(#set! indent.close_delimiter ")"))