60 lines
1.2 KiB
JSON
60 lines
1.2 KiB
JSON
{
|
|
"fileTypes": ["hack"],
|
|
"name": "Hack Machine Language",
|
|
"patterns": [
|
|
{
|
|
"include": "#a"
|
|
},
|
|
{
|
|
"include": "#c"
|
|
}
|
|
],
|
|
"repository": {
|
|
"a": {
|
|
"patterns": [
|
|
{
|
|
"comment": "0-value",
|
|
"begin": "\\b0",
|
|
"end": "\\b",
|
|
"name": "comment",
|
|
"patterns": [
|
|
{
|
|
"comment": "value",
|
|
"match": "[01]{15}\\b",
|
|
"name": "constant.numeric"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"c": {
|
|
"patterns": [
|
|
{
|
|
"comment": "1-??-a-comp-dest-jump",
|
|
"match": "\\b1[01]{2}([01]{1})([01]{6})([01]{3})([01]{3})\\b",
|
|
"name": "comment",
|
|
"captures": {
|
|
"1": {
|
|
"comment": "control",
|
|
"name": "keyword.control"
|
|
},
|
|
"2": {
|
|
"comment": "op",
|
|
"name": "keyword.operarator"
|
|
},
|
|
"3": {
|
|
"comment": "dest",
|
|
"name": "variable.language"
|
|
},
|
|
"4": {
|
|
"comment": "jump",
|
|
"name": "keyword.control"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"scopeName": "source.hack"
|
|
}
|