mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
feat(t32): add indent rules (#4782)
This commit is contained in:
parent
102f1b2f55
commit
16cce8df58
11 changed files with 291 additions and 5 deletions
49
tests/indent/t32/if_block.cmm
Normal file
49
tests/indent/t32/if_block.cmm
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
IF &a
|
||||
STOP
|
||||
|
||||
IF (TRUE())
|
||||
(
|
||||
BREAK
|
||||
)
|
||||
|
||||
IF (&b+CouNT())
|
||||
(
|
||||
continue
|
||||
)
|
||||
|
||||
IF FOUND()
|
||||
STOP
|
||||
ELSE
|
||||
CONTinue
|
||||
|
||||
IF &c
|
||||
CONTinue
|
||||
ELSE IF FALSE()
|
||||
Break
|
||||
ELSE
|
||||
stop
|
||||
|
||||
IF &d
|
||||
(
|
||||
STOP
|
||||
)
|
||||
ELSE IF &e
|
||||
; comment A
|
||||
(
|
||||
CONTINUE
|
||||
)
|
||||
ELSE
|
||||
; comment B
|
||||
(
|
||||
BREAK
|
||||
)
|
||||
|
||||
IF &f
|
||||
IF &g
|
||||
stop
|
||||
ELSE
|
||||
IF &h
|
||||
(
|
||||
continue
|
||||
)
|
||||
|
||||
27
tests/indent/t32/repeat_block.cmm
Normal file
27
tests/indent/t32/repeat_block.cmm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
RePeaT 10. PRINT "A"
|
||||
|
||||
RePeaT &a
|
||||
print
|
||||
|
||||
REPEAT 0xaAfF09
|
||||
(
|
||||
cont
|
||||
)
|
||||
|
||||
RPT
|
||||
(
|
||||
b
|
||||
)
|
||||
|
||||
rpt
|
||||
(
|
||||
s
|
||||
)
|
||||
WHILE &a
|
||||
|
||||
REPEAT TRUE()
|
||||
; comment
|
||||
(
|
||||
cont
|
||||
)
|
||||
|
||||
23
tests/indent/t32/subroutine_block.cmm
Normal file
23
tests/indent/t32/subroutine_block.cmm
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
printA:
|
||||
(
|
||||
PRINT "A"
|
||||
RETURN
|
||||
)
|
||||
|
||||
sUBROUtINE printB
|
||||
(
|
||||
ENTRY &in
|
||||
|
||||
PRINT "&in"
|
||||
RETURN
|
||||
)
|
||||
|
||||
SUBROUTINE printC
|
||||
// comment
|
||||
(
|
||||
PARAMETERS &a &b
|
||||
|
||||
PRINT "&a"+"&b"
|
||||
ENDDO
|
||||
)
|
||||
|
||||
14
tests/indent/t32/while_block.cmm
Normal file
14
tests/indent/t32/while_block.cmm
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
WHILE &a
|
||||
Step
|
||||
|
||||
WHILE (sYmbol.EXIT(main))
|
||||
(
|
||||
Step
|
||||
Break
|
||||
)
|
||||
|
||||
WHILE (FALSE())
|
||||
// comment
|
||||
(
|
||||
ECHO "test"
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue