diff options
Diffstat (limited to 'runtime/queries/nim/indents.scm')
-rw-r--r-- | runtime/queries/nim/indents.scm | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/runtime/queries/nim/indents.scm b/runtime/queries/nim/indents.scm new file mode 100644 index 00000000..67743540 --- /dev/null +++ b/runtime/queries/nim/indents.scm @@ -0,0 +1,54 @@ +[ + (typeDef) + (ifStmt) + (whenStmt) + (elifStmt) + (elseStmt) + (ofBranch) ; note: not caseStmt + (whileStmt) + (tryStmt) + (tryExceptStmt) + (tryFinallyStmt) + (forStmt) + (blockStmt) + (staticStmt) + (deferStmt) + (asmStmt) + ; exprStmt? +] @indent +;; increase the indentation level + +[ + (ifStmt) + (whenStmt) + (elifStmt) + (elseStmt) + (ofBranch) ; note: not caseStmt + (whileStmt) + (tryStmt) + (tryExceptStmt) + (tryFinallyStmt) + (forStmt) + (blockStmt) + (staticStmt) + (deferStmt) + (asmStmt) + ; exprStmt? +] @extend +;; ??? + +[ + (returnStmt) + (raiseStmt) + (yieldStmt) + (breakStmt) + (continueStmt) +] @extend.prevent-once +;; end a level of indentation while staying indented + +[ + ")" ; tuples + "]" ; arrays, seqs + "}" ; sets +] @outdent +;; end a level of indentation and unindent the line |