Add Alloy language (#541)

Alloy is an open source language and analyzer for software modeling.

Homepage: http://alloytools.org/
This commit is contained in:
Bruno Michel 2020-05-23 12:11:55 +02:00 committed by GitHub
parent ee19d28195
commit 156e7b7dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions

View File

@ -285,6 +285,7 @@ ActionScript
Ada
Agda
Alex
Alloy
Asn1
Asp
AspNet

View File

@ -24,6 +24,11 @@
"multi_line_comments": [["{-", "-}"]],
"extensions": ["agda"]
},
"Alloy": {
"line_comment": ["--", "//"],
"multi_line_comments": [["/*", "*/"]],
"extensions": ["als"]
},
"Arduino": {
"name": "Arduino C++",
"line_comment": ["//"],

18
tests/alloy.als Normal file
View File

@ -0,0 +1,18 @@
// 18 lines 10 code 3 comments 5 blanks
sig Node {
edge: set Node
}
------------------------------------------------------------------------
pred self_loop[n: Node] {
n in n.edge
}
pred all_self_loop {
all n: Node | self_loop[n]
}
/* Comments started by /* don't nest */
run all_self_loop