Add Pyret support (#1032)

This commit is contained in:
András B Nagy 2024-08-30 00:56:54 -07:00 committed by GitHub
parent 8a19d10e62
commit 143a99aaa3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 31 additions and 1 deletions

View File

@ -373,7 +373,7 @@ CSharp
CShell
Css
Cuda
CUE
CUE
Cython
D
D2
@ -497,6 +497,7 @@ Protobuf
PRQL
PSL
PureScript
Pyret
Python
Qcl
Qml

View File

@ -1321,6 +1321,13 @@
"multi_line_comments": [["{-", "-}"]],
"extensions": ["purs"]
},
"Pyret": {
"line_comment": ["#"],
"multi_line_comments": [["#|", "|#"]],
"quotes": [["\\\"", "\\\""], ["'", "'"]],
"extensions": ["arr"],
"nested": true
},
"Python": {
"line_comment": ["#"],
"doc_quotes": [["\\\"\\\"\\\"", "\\\"\\\"\\\""], ["'''", "'''"]],

22
tests/data/pyret.arr Normal file
View File

@ -0,0 +1,22 @@
# 22 lines 9 code 8 comments 5 blanks
fun single-quote():
doc: "this is a documentation string"
'foo'
end
#|
Hello, this is a multiline message
|#
# This is a line message
fun double-quotes():
"bar"
end
nested = #|
doesn't start yet
or yet
|#
"nested"