1
Fork 0
mirror of https://github.com/Steffo99/riscv-plus.git synced 2024-11-25 01:24:24 +00:00
riscv-plus/syntaxes/riscv.tmLanguage.json

105 lines
2.2 KiB
JSON
Raw Normal View History

2019-05-13 17:16:03 +00:00
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "RISC-V Assembly",
"patterns": [
{
"include": "#structure"
},
{
"include": "#entities"
}
],
"repository": {
"structure": {
"patterns": [
{
"match": "\\b([A-Za-z0-9_]+)(:)",
"name": "meta.line.label.riscv",
"captures": {
"1": {
"name": "keyword.name.tag.riscv"
},
"2": {
"name": "punctuation.colon.riscv"
}
}
},
{
2019-05-19 14:25:03 +00:00
"match": "\\b([A-Za-z]+)\\s*([A-Za-z0-9_-]+)(,)\\s*([A-Za-z0-9_-]+)(\\()([A-Za-z0-9_-]+)(\\))",
2019-05-13 17:16:03 +00:00
"name": "meta.line.instruction.parenthesis.riscv",
"captures": {
"1": {
"name": "entity.name.function.riscv"
},
"2": {
"name": "variable.parameter.riscv"
},
"3": {
"name": "punctuation.comma.riscv"
},
"4": {
"name": "variable.parameter.riscv"
},
"5": {
"name": "punctuation.parenthesis.open.riscv"
},
"6": {
"name": "variable.parameter.riscv"
},
"7": {
"name": "punctuation.parenthesis.close.riscv"
}
}
},
{
2019-05-19 14:25:03 +00:00
"match": "\\b([A-Za-z]+)(?:\\s*([A-Za-z0-9_-]+))?(?:(,)\\s*([A-Za-z0-9_-]+))?(?:(,)\\s*([A-Za-z0-9_-]+))?\\b",
2019-05-13 17:16:03 +00:00
"name": "meta.line.instruction.riscv",
"captures": {
"1": {
"name": "entity.name.function.riscv"
},
"2": {
"name": "variable.parameter.riscv"
},
"3": {
"name": "punctuation.comma.riscv"
},
"4": {
"name": "variable.parameter.riscv"
},
"5": {
"name": "punctuation.comma.riscv"
},
"6": {
"name": "variable.parameter.riscv"
}
}
}
]
},
"entities": {
"patterns": [
{
"begin": "\"",
"end": "\"",
"name": "string.quoted.double.riscv",
"patterns": [
{
"match": "\\\\.",
"name": "constant.character.escape.riscv"
}
]
},
{
"match": "#.*",
2019-05-13 17:16:03 +00:00
"name": "comment.line.number-sign.riscv"
},
{
"match": "\\.[A-Za-z0-9_-]+",
"name": "constant.language.riscv"
}
]
}
},
"scopeName": "source.riscv"
}