Skip to content

Commit

Permalink
improve syntax grammar quality
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Azpillaga Aldalur committed Jun 8, 2024
1 parent aa7a108 commit bcdc36d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion language-server/src/main/resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"grammars":
[
{"language": "kuki", "scopeName": "main", "path": "./syntax.json"}
{"language": "kuki", "scopeName": "source.kuki", "path": "./syntax.json"}
]
},
"engines": {"vscode": "^1.52.0"},
Expand Down
19 changes: 11 additions & 8 deletions language-server/src/main/resources/syntax.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"scopeName": "main",
"scopeName": "source.kuki",
"patterns": [
{
"match": "\\b(INGREDIENTS|UTENSILS|STEPS)\\b",
"name": "keyword.control.kuki"
},
{
"match": "\\b(the|into|in|to|for|and)\\b",
"name": "keyword.letter.kuki"
"name": "entity.name.section"
},
{
"match": "\\b(Mix|Slice|Place|Add|Heat|Bake|Cook|Beat|Serve|Peel|Grate|Drain|Flip)\\b",
"name": "entity.name.function.kuki"
},
{
"match": "\\b(\\d+(\\.\\d+)?|seconds|minutes|hours|degrees|Farenheit|g|ml)\\b",
"name": "constant.numeric.kuki"
"match": "\\b(the|into|in|to|for|and)\\b",
"name": "keyword.other.kuki"
},
{
"match": "\\b(\\d+(\\.\\d+)?)( (seconds|minutes|hours|degrees|Farenheit|g|ml))?\\b",
"captures": {
"1": { "name": "constant.numeric.kuki"},
"4": { "name": "storage.type.kuki"}
}
},
{
"match": "(:|-|\\.)",
Expand Down

0 comments on commit bcdc36d

Please sign in to comment.