Skip to content

Commit

Permalink
Working on a new feature, just na bozza ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleff-github committed Nov 6, 2024
1 parent e52eec5 commit 6c6016d
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 0 deletions.
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@
}
}
],
"grammars": [
{
"language": "duckyscript",
"scopeName": "source.duckyscript",
"path": "./syntaxes/duckyscript.tmLanguage.json"
}
],
"themes": [
{
"label": "DarkDuckyScript",
"uiTheme": "vs-dark",
"path": "./themes/DarkDuckyScript-color-theme.json"
},
{
"label": "LightDuckyScript",
"uiTheme": "vs",
"path": "./themes/LightDuckyScript-color-theme.json"
}
],
"commands": [
{
"command": "duckyscript.Cookbook",
Expand Down
90 changes: 90 additions & 0 deletions syntaxes/duckyscript.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "DuckyScript",
"patterns": [
{
"include": "#comments"
},
{
"include": "#keywords"
}
],
"repository": {
"comments": {
"patterns": [
{
"include": "#in_line_comment"
},
{
"include": "#multi_line_comment"
}
],
"repository": {
"in_line_comment": {
"patterns": [
{
"name": "comment.inline.duckyscript",
"match": "^REM\\s+.*$"
}
]
},
"multi_line_comment": {
"begin": "^REM_BLOCK(?:\\s.*)?$",
"end": "^.*END_REM",
"name": "comment.block.duckyscript"
}
}
},
"keywords": {
"patterns": [
{
"include": "#declaration_keywords"
},
{
"include": "#operator_keywords"
},
{
"include": "#statement_keywords"
},
{
"include": "#true_condition_keywords"
}
],
"repository": {
"declaration_keywords": {
"patterns": [
{
"name": "keyword.declaration.duckyscript",
"match": "(DEFINE|VAR)"
}
]
},
"operator_keywords": {
"patterns": [
{
"name": "keyword.operator.duckyscript",
"match": "(=|+|-|*|/|%|^)"
}
]
},
"statement_keywords": {
"patterns": [
{
"name": "keyword.statement.duckyscript",
"match": "(IF|ELSE|THEN|END_IF|WHILE|END_WHILE)"
}
]
},
"true_condition_keywords": {
"patterns": [
{
"name": "keyword.truecondition.duckyscript",
"match": "(TRUE|FALSE)"
}
]
}
}
}
},
"scopeName": "source.asp"
}
54 changes: 54 additions & 0 deletions themes/DarkDuckyScript-color-theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "DuckyScript",
"type": "dark",
"tokenColors": [
{
"name": "Comment",
"scope": [
"comment.inline.duckyscript",
"comment.block.duckyscript"
],
"settings": {
"fontStyle": "italic",
"foreground": "#7b9726"
}
},
{
"name": "Declaration Keyword",
"scope": [
"keyword.declaration.duckyscript"
],
"settings": {
"foreground": "#4A90E2"
}
},
{
"name": "Operator Keyword",
"scope": [
"keyword.operator.duckyscript"
],
"settings": {
"foreground": "#FF6A3D"
}
},
{
"name": "Statement Keyword",
"scope": [
"keyword.statement.duckyscript"
],
"settings": {
"foreground": "#ffc04b"
}
},
{
"name": "True Condition Keyword",
"scope": [
"keyword.truecondition.duckyscript"
],
"settings": {
"foreground": "#AB47BC"
}
}
],
"semanticHighlighting": true,
}
54 changes: 54 additions & 0 deletions themes/LightDuckyScript-color-theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "DuckyScript",
"type": "light",
"tokenColors": [
{
"name": "Comment",
"scope": [
"comment.inline.duckyscript",
"comment.block.duckyscript"
],
"settings": {
"fontStyle": "italic",
"foreground": "#6B8E23"
}
},
{
"name": "Declaration Keyword",
"scope": [
"keyword.declaration.duckyscript"
],
"settings": {
"foreground": "#1E90FF"
}
},
{
"name": "Operator Keyword",
"scope": [
"keyword.operator.duckyscript"
],
"settings": {
"foreground": "#D2691E"
}
},
{
"name": "Statement Keyword",
"scope": [
"keyword.statement.duckyscript"
],
"settings": {
"foreground": "#FF8C00"
}
},
{
"name": "True Condition Keyword",
"scope": [
"keyword.truecondition.duckyscript"
],
"settings": {
"foreground": "#8A2BE2"
}
}
],
"semanticHighlighting": true,
}

0 comments on commit 6c6016d

Please sign in to comment.