-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
241 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
false | ||
true | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["boolean", "false"], | ||
["boolean", "true"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for booleans. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(**) | ||
(* foo | ||
bar *) | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["comment", "(**)"], | ||
["comment", "(* foo\r\nbar *)"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for comments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#quit | ||
#load | ||
#load_rec | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["directive", "#quit"], | ||
["directive", "#load"], | ||
["directive", "#load_rec"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for directives. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
as | ||
assert | ||
begin | ||
class | ||
constraint | ||
do | ||
done | ||
downto | ||
else | ||
end | ||
exception | ||
external | ||
for | ||
fun | ||
function | ||
functor | ||
if | ||
in | ||
include | ||
inherit | ||
initializer | ||
lazy | ||
let | ||
match | ||
method | ||
module | ||
mutable | ||
new | ||
object | ||
of | ||
open | ||
prefix | ||
private | ||
rec | ||
then | ||
sig | ||
struct | ||
to | ||
try | ||
type | ||
val | ||
value | ||
virtual | ||
where | ||
while | ||
with | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "as"], | ||
["keyword", "assert"], | ||
["keyword", "begin"], | ||
["keyword", "class"], | ||
["keyword", "constraint"], | ||
["keyword", "do"], | ||
["keyword", "done"], | ||
["keyword", "downto"], | ||
["keyword", "else"], | ||
["keyword", "end"], | ||
["keyword", "exception"], | ||
["keyword", "external"], | ||
["keyword", "for"], | ||
["keyword", "fun"], | ||
["keyword", "function"], | ||
["keyword", "functor"], | ||
["keyword", "if"], | ||
["keyword", "in"], | ||
["keyword", "include"], | ||
["keyword", "inherit"], | ||
["keyword", "initializer"], | ||
["keyword", "lazy"], | ||
["keyword", "let"], | ||
["keyword", "match"], | ||
["keyword", "method"], | ||
["keyword", "module"], | ||
["keyword", "mutable"], | ||
["keyword", "new"], | ||
["keyword", "object"], | ||
["keyword", "of"], | ||
["keyword", "open"], | ||
["keyword", "prefix"], | ||
["keyword", "private"], | ||
["keyword", "rec"], | ||
["keyword", "then"], | ||
["keyword", "sig"], | ||
["keyword", "struct"], | ||
["keyword", "to"], | ||
["keyword", "try"], | ||
["keyword", "type"], | ||
["keyword", "val"], | ||
["keyword", "value"], | ||
["keyword", "virtual"], | ||
["keyword", "where"], | ||
["keyword", "while"], | ||
["keyword", "with"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for keywords. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
0xBad_Face | ||
0o754_672 | ||
0b1010_1111 | ||
42_000 | ||
3.14_15_9 | ||
3.2e8 | ||
6.1E-7 | ||
0.4e+12_415 | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["number", "0xBad_Face"], | ||
["number", "0o754_672"], | ||
["number", "0b1010_1111"], | ||
["number", "42_000"], | ||
["number", "3.14_15_9"], | ||
["number", "3.2e8"], | ||
["number", "6.1E-7"], | ||
["number", "0.4e+12_415"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for numbers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
and asr land | ||
lor lxor lsl lsr | ||
mod nor or | ||
|
||
:= | ||
= < > @ | ||
^ | & ~ | ||
+ - * / | ||
$ % ! ? | ||
|
||
~=~ | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["operator", "and"], ["operator", "asr"], ["operator", "land"], | ||
["operator", "lor"], ["operator", "lxor"], ["operator", "lsl"], ["operator", "lsr"], | ||
["operator", "mod"], ["operator", "nor"], ["operator", "or"], | ||
|
||
["operator", ":="], | ||
["operator", "="], ["operator", "<"], ["operator", ">"], ["operator", "@"], | ||
["operator", "^"], ["operator", "|"], ["operator", "&"], ["operator", "~"], | ||
["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], | ||
["operator", "$"], ["operator", "%"], ["operator", "!"], ["operator", "?"], | ||
|
||
["operator", "~=~"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for operators. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"" | ||
"Fo\"obar" | ||
'\'' | ||
'\123' | ||
'\xf4' | ||
`\`` | ||
`\123` | ||
`\xf4` | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["string", "\"\""], | ||
["string", "\"Fo\\\"obar\""], | ||
["string", "'\\''"], | ||
["string", "'\\123'"], | ||
["string", "'\\xf4'"], | ||
["string", "`\\``"], | ||
["string", "`\\123`"], | ||
["string", "`\\xf4`"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for strings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'Foo | ||
'bar_42 | ||
`Foo | ||
`bar_42 | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["type", "'Foo"], | ||
["type", "'bar_42"], | ||
["type", "`Foo"], | ||
["type", "`bar_42"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for types. |