Skip to content

Commit 0c1f091

Browse files
committed
TechScript v1.0.3: Comprehensive Standard Library & VM Optimization
0 parents  commit 0c1f091

193 files changed

Lines changed: 46742 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Publishing TechScript to the VS Code Marketplace
2+
3+
To make the TechScript extension searchable and downloadable inside VS Code, Cursor, and other compatible editors, it needs to be published to the **Visual Studio Marketplace**.
4+
5+
Because this requires a Microsoft Account and an Azure DevOps organization, you will need to do a few steps manually first. Once you have a **Personal Access Token (PAT)**, I can run the final command to publish it for you.
6+
7+
## Step 1: Create a Publisher Account
8+
1. Go to the [Visual Studio Marketplace Management Page](https://marketplace.visualstudio.com/manage).
9+
2. Sign in with your Microsoft account.
10+
3. Click on **Create publisher**.
11+
4. Choose an ID (e.g., `techscript-team` or your own username). We are currently using `techscript-team` in the `package.json`, so if you pick a different ID, let me know so I can update the file!
12+
13+
## Step 2: Get a Personal Access Token (PAT)
14+
VS Code extensions are published via Azure DevOps.
15+
1. Go to your [Azure DevOps Profile](https://dev.azure.com/).
16+
2. Click on the **User settings** icon (top right, next to your profile picture) -> **Personal access tokens**.
17+
3. Click **New Token**.
18+
4. Set the following:
19+
- **Name**: "VS Code Publishing"
20+
- **Organization**: `All accessible organizations`
21+
- **Expiration**: 1 year
22+
- **Scopes**: Click "Show all scopes" at the bottom, find **Marketplace**, and select **Acquire** and **Manage**.
23+
5. Click **Create** and **Copy the token**. Keep this token safe!
24+
25+
## Step 3: Publish!
26+
Once you have your **Publisher ID** created and your **Personal Access Token** copied, you can tell me:
27+
28+
_"My publisher ID is `<your-id>`. Use this token: `<your-token>`"_
29+
30+
And I will run the command to securely publish the extension to the world!
31+
*(If you prefer to do it yourself to avoid sharing the token, you can open PowerShell in the `vscode-extension` folder and run `npx @vscode/vsce publish -p <your-token>`)*
3.72 KB
Loading
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"hidesExplorerArrows": false,
3+
"file": "_file",
4+
"folder": "_folder",
5+
"folderExpanded": "_folder_open",
6+
"fileExtensions": {
7+
"txs": "_techscript",
8+
"tx": "_techscript"
9+
},
10+
"fileNames": {},
11+
"languageIds": {
12+
"techscript": "_techscript"
13+
},
14+
"iconDefinitions": {
15+
"_file": {
16+
"iconPath": "./default-file.png"
17+
},
18+
"_folder": {
19+
"iconPath": "./default-folder.png"
20+
},
21+
"_folder_open": {
22+
"iconPath": "./default-folder-open.png"
23+
},
24+
"_techscript": {
25+
"iconPath": "./techscript-file.png"
26+
}
27+
}
28+
}
42 KB
Loading
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"comments": {
3+
"lineComment": "#",
4+
"blockComment": ["#[", "]#"]
5+
},
6+
"brackets": [
7+
["{", "}"],
8+
["[", "]"],
9+
["(", ")"]
10+
],
11+
"autoClosingPairs": [
12+
{ "open": "{", "close": "}" },
13+
{ "open": "[", "close": "]" },
14+
{ "open": "(", "close": ")" },
15+
{ "open": "\"", "close": "\"" },
16+
{ "open": "'", "close": "'" }
17+
],
18+
"surroundingPairs": [
19+
{ "open": "{", "close": "}" },
20+
{ "open": "[", "close": "]" },
21+
{ "open": "(", "close": ")" },
22+
{ "open": "\"", "close": "\"" },
23+
{ "open": "'", "close": "'" }
24+
],
25+
"indentationRules": {
26+
"increaseIndentPattern": "^\\s*(if|elif|else|for|while|until|unless|fn|class|try|catch|finally|match|case|guard|with|do)\\b.*:\\s*$",
27+
"decreaseIndentPattern": "^\\s*(elif|else|catch|finally)\\b"
28+
},
29+
"folding": {
30+
"offSide": true
31+
}
32+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "techscript",
3+
"displayName": "TechScript Language",
4+
"description": "Syntax highlighting, snippets, and file icons for TechScript (.txs)",
5+
"version": "1.0.0",
6+
"publisher": "techscript-team",
7+
"license": "MIT",
8+
"engines": {
9+
"vscode": "^1.70.0"
10+
},
11+
"categories": ["Programming Languages", "Themes"],
12+
"icon": "icons/techscript-logo.png",
13+
"contributes": {
14+
"languages": [
15+
{
16+
"id": "techscript",
17+
"aliases": ["TechScript", "txs"],
18+
"extensions": [".txs", ".tx"],
19+
"configuration": "./language-configuration.json",
20+
"icon": {
21+
"light": "./icons/techscript-file.png",
22+
"dark": "./icons/techscript-file.png"
23+
}
24+
}
25+
],
26+
"grammars": [
27+
{
28+
"language": "techscript",
29+
"scopeName": "source.techscript",
30+
"path": "./syntaxes/techscript.tmLanguage.json"
31+
}
32+
],
33+
"snippets": [
34+
{
35+
"language": "techscript",
36+
"path": "./snippets/techscript.json"
37+
}
38+
]
39+
}
40+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"Say Statement": {
3+
"prefix": "say",
4+
"body": ["say \"${1:message}\""],
5+
"description": "Print output"
6+
},
7+
"Set Variable": {
8+
"prefix": "set",
9+
"body": ["set ${1:name} = ${2:value}"],
10+
"description": "Declare a variable"
11+
},
12+
"Function": {
13+
"prefix": "fn",
14+
"body": ["fn ${1:name}(${2:params}):", " ${3:pass}"],
15+
"description": "Define a function"
16+
},
17+
"Class": {
18+
"prefix": "class",
19+
"body": ["class ${1:Name}:", " fn init(self, ${2:args}):", " ${3:pass}"],
20+
"description": "Define a class"
21+
},
22+
"If-Else": {
23+
"prefix": "if",
24+
"body": ["if ${1:condition}:", " ${2:pass}", "else:", " ${3:pass}"],
25+
"description": "If-else block"
26+
},
27+
"For Loop": {
28+
"prefix": "for",
29+
"body": ["for ${1:item} in ${2:items}:", " ${3:pass}"],
30+
"description": "For loop"
31+
},
32+
"While Loop": {
33+
"prefix": "while",
34+
"body": ["while ${1:condition}:", " ${2:pass}"],
35+
"description": "While loop"
36+
},
37+
"Try-Catch": {
38+
"prefix": "try",
39+
"body": ["try:", " ${1:pass}", "catch ${2:err}:", " ${3:say err}"],
40+
"description": "Try-catch error handling"
41+
},
42+
"Match": {
43+
"prefix": "match",
44+
"body": ["match ${1:value}:", " case ${2:pattern}:", " ${3:pass}"],
45+
"description": "Pattern matching"
46+
},
47+
"Lambda": {
48+
"prefix": "lambda",
49+
"body": ["(${1:x}) => ${2:x}"],
50+
"description": "Arrow / lambda function"
51+
}
52+
}
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "TechScript",
4+
"scopeName": "source.techscript",
5+
"patterns": [
6+
{ "include": "#comments" },
7+
{ "include": "#strings" },
8+
{ "include": "#fstrings" },
9+
{ "include": "#numbers" },
10+
{ "include": "#keywords" },
11+
{ "include": "#builtins" },
12+
{ "include": "#constants" },
13+
{ "include": "#operators" },
14+
{ "include": "#functions" },
15+
{ "include": "#classes" },
16+
{ "include": "#identifiers" }
17+
],
18+
"repository": {
19+
"comments": {
20+
"patterns": [
21+
{
22+
"name": "comment.block.techscript",
23+
"begin": "#\\[",
24+
"end": "\\]#"
25+
},
26+
{
27+
"name": "comment.line.number-sign.techscript",
28+
"match": "#.*$"
29+
}
30+
]
31+
},
32+
"strings": {
33+
"patterns": [
34+
{
35+
"name": "string.quoted.triple.techscript",
36+
"begin": "(\"\"\")|'''",
37+
"end": "(\"\"\")|'''"
38+
},
39+
{
40+
"name": "string.quoted.double.techscript",
41+
"begin": "\"",
42+
"end": "\"",
43+
"patterns": [
44+
{
45+
"name": "constant.character.escape.techscript",
46+
"match": "\\\\."
47+
}
48+
]
49+
},
50+
{
51+
"name": "string.quoted.single.techscript",
52+
"begin": "'",
53+
"end": "'",
54+
"patterns": [
55+
{
56+
"name": "constant.character.escape.techscript",
57+
"match": "\\\\."
58+
}
59+
]
60+
}
61+
]
62+
},
63+
"fstrings": {
64+
"patterns": [
65+
{
66+
"name": "string.interpolated.techscript",
67+
"begin": "f\"",
68+
"end": "\"",
69+
"patterns": [
70+
{
71+
"name": "meta.embedded.expression.techscript",
72+
"begin": "\\{",
73+
"end": "\\}",
74+
"patterns": [{ "include": "$self" }]
75+
},
76+
{
77+
"name": "constant.character.escape.techscript",
78+
"match": "\\\\."
79+
}
80+
]
81+
}
82+
]
83+
},
84+
"numbers": {
85+
"patterns": [
86+
{
87+
"name": "constant.numeric.hex.techscript",
88+
"match": "\\b0[xX][0-9a-fA-F_]+\\b"
89+
},
90+
{
91+
"name": "constant.numeric.binary.techscript",
92+
"match": "\\b0[bB][01_]+\\b"
93+
},
94+
{
95+
"name": "constant.numeric.octal.techscript",
96+
"match": "\\b0[oO][0-7_]+\\b"
97+
},
98+
{
99+
"name": "constant.numeric.float.techscript",
100+
"match": "\\b[0-9][0-9_]*\\.[0-9][0-9_]*([eE][+-]?[0-9]+)?\\b"
101+
},
102+
{
103+
"name": "constant.numeric.integer.techscript",
104+
"match": "\\b[0-9][0-9_]*\\b"
105+
}
106+
]
107+
},
108+
"keywords": {
109+
"patterns": [
110+
{
111+
"name": "keyword.control.techscript",
112+
"match": "\\b(if|elif|else|for|while|until|unless|match|case|try|catch|finally|throw|break|skip|pass|return|guard|with|do|defer)\\b"
113+
},
114+
{
115+
"name": "keyword.declaration.techscript",
116+
"match": "\\b(fn|class|set|const|mut|del|global|export|import|from|as|new)\\b"
117+
},
118+
{
119+
"name": "keyword.operator.logical.techscript",
120+
"match": "\\b(and|or|not|is|has|in|typeof)\\b"
121+
},
122+
{
123+
"name": "keyword.other.techscript",
124+
"match": "\\b(say|ask|self|super|async|await|yield|each)\\b"
125+
}
126+
]
127+
},
128+
"constants": {
129+
"patterns": [
130+
{
131+
"name": "constant.language.boolean.true.techscript",
132+
"match": "\\btrue\\b"
133+
},
134+
{
135+
"name": "constant.language.boolean.false.techscript",
136+
"match": "\\bfalse\\b"
137+
},
138+
{
139+
"name": "constant.language.none.techscript",
140+
"match": "\\bnone\\b"
141+
}
142+
]
143+
},
144+
"builtins": {
145+
"patterns": [
146+
{
147+
"name": "support.function.builtin.techscript",
148+
"match": "\\b(abs|round|ceil|floor|min|max|sum|sqrt|pow|clamp|sign|len|size|range|enumerate|zip|sorted|reversed|map|filter|to_int|to_float|to_str|to_bool|to_list|is_int|is_float|is_str|is_list|is_map|is_none|is_bool|is_even|is_odd|typeof|write|debug|log|warn|error|clear|format|read_file|write_file|append_file|read_lines|read_json|write_json|file_exists|list_dir|make_dir|delete_file|split|join|replace|contains|starts_with|ends_with|upper|lower|trim|chars|repeat|capitalize|index_of|flat|unique|take|drop|push|pop|keys|values|entries|merge|has_key|random|randint|choice|shuffle|sleep|exit|assert|hash|gcd|title|count)\\b"
149+
}
150+
]
151+
},
152+
"operators": {
153+
"patterns": [
154+
{
155+
"name": "keyword.operator.pipe.techscript",
156+
"match": "\\|>"
157+
},
158+
{
159+
"name": "keyword.operator.arrow.techscript",
160+
"match": "=>"
161+
},
162+
{
163+
"name": "keyword.operator.range.techscript",
164+
"match": "\\.\\.(=)?"
165+
},
166+
{
167+
"name": "keyword.operator.spread.techscript",
168+
"match": "\\.\\.\\."
169+
},
170+
{
171+
"name": "keyword.operator.comparison.techscript",
172+
"match": "(==|!=|<=|>=|<|>)"
173+
},
174+
{
175+
"name": "keyword.operator.assignment.techscript",
176+
"match": "(\\+=|-=|\\*=|/=|=)"
177+
},
178+
{
179+
"name": "keyword.operator.arithmetic.techscript",
180+
"match": "(\\*\\*|\\+|-|\\*|//|/|%)"
181+
}
182+
]
183+
},
184+
"functions": {
185+
"patterns": [
186+
{
187+
"name": "entity.name.function.techscript",
188+
"match": "(?<=fn\\s)[a-zA-Z_][a-zA-Z0-9_]*"
189+
}
190+
]
191+
},
192+
"classes": {
193+
"patterns": [
194+
{
195+
"name": "entity.name.class.techscript",
196+
"match": "(?<=class\\s)[a-zA-Z_][a-zA-Z0-9_]*"
197+
}
198+
]
199+
},
200+
"identifiers": {
201+
"patterns": [
202+
{
203+
"name": "variable.other.techscript",
204+
"match": "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
205+
}
206+
]
207+
}
208+
}
209+
}
Binary file not shown.

0 commit comments

Comments
 (0)