Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

Commit feac1d6

Browse files
committed
initial commit
0 parents  commit feac1d6

File tree

9 files changed

+253
-0
lines changed

9 files changed

+253
-0
lines changed

.github/auto-merge.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
requiredLabels:
2+
- merge
3+
reportStatus: true
4+
updateBranch: false
5+
deleteBranchAfterMerge: true
6+
mergeMethod: squash

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@master
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 13
16+
- name: Install vsce
17+
run: yarn global add vsce
18+
- name: Generate package
19+
run: vsce package
20+
- name: Publish
21+
run: vsce publish -p $PERSONAL_ACCESS_TOKEN
22+
env:
23+
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.tn

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// A launch configuration that launches the extension inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"runtimeExecutable": "${execPath}",
13+
"args": [
14+
"--extensionDevelopmentPath=${workspaceFolder}"
15+
]
16+
}
17+
]
18+
}

.vscodeignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.vscode/**
2+
.vscode-test/**
3+
.gitignore
4+
vsc-extension-quickstart.md
5+
6+
*.tn

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# vscode-tony
2+
3+
VS Code syntax highlighting for the Tony programming language.
4+
5+
---
6+
7+
## Release
8+
9+
1. Change the version in `package.json`.
10+
1. Create a pull request to merge the changes into `master`.
11+
1. After the pull request was merged, create a new release listing the commits on `master` since the last release.
12+
1. The release workflow will publish the package.

language-configuration.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"comments": {
3+
// symbol used for single line comment.
4+
"lineComment": "#"
5+
},
6+
// symbols used as brackets
7+
"brackets": [
8+
["{", "}"],
9+
["[", "]"],
10+
["(", ")"]
11+
],
12+
// symbols that are auto closed when typing
13+
"autoClosingPairs": [
14+
["{", "}"],
15+
["[", "]"],
16+
["(", ")"],
17+
["\"", "\""],
18+
["'", "'"],
19+
["`", "`"]
20+
],
21+
// symbols that can be used to surround a selection
22+
"surroundingPairs": [
23+
["{", "}"],
24+
["[", "]"],
25+
["(", ")"],
26+
["\"", "\""],
27+
["'", "'"],
28+
["`", "`"]
29+
]
30+
}

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "vscode-tony",
3+
"displayName": "Tony",
4+
"description": "Syntax highlighting for the Tony programming language",
5+
"version": "0.1.0",
6+
"engines": {
7+
"vscode": "^1.43.0"
8+
},
9+
"categories": [
10+
"Programming Languages"
11+
],
12+
"contributes": {
13+
"languages": [{
14+
"id": "tony",
15+
"aliases": ["Tony", "tony"],
16+
"extensions": [".tn"],
17+
"configuration": "./language-configuration.json"
18+
}],
19+
"grammars": [{
20+
"language": "tony",
21+
"scopeName": "source.tony",
22+
"path": "./syntaxes/tony.tmLanguage.json"
23+
}]
24+
}
25+
}

syntaxes/tony.tmLanguage.json

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "Tony",
4+
"patterns": [
5+
{
6+
"include": "#keywords"
7+
},
8+
{
9+
"include": "#punctuation"
10+
},
11+
{
12+
"include": "#operators"
13+
},
14+
{
15+
"include": "#identifiers"
16+
},
17+
{
18+
"include": "#booleans"
19+
},
20+
{
21+
"include": "#numbers"
22+
},
23+
{
24+
"include": "#strings"
25+
},
26+
{
27+
"include": "#comments"
28+
}
29+
],
30+
"repository": {
31+
"keywords": {
32+
"patterns": [{
33+
"name": "keyword",
34+
"match": "\\b(import|from|export|return|if|then|else|case|when|module|in)\\b"
35+
}]
36+
},
37+
"punctuation": {
38+
"name": "comment",
39+
"patterns": [
40+
{
41+
"name": "punctuation",
42+
"match": "\\.|\\||\\,|\\[|\\]|\\(|\\)|\\{|\\}"
43+
}
44+
]
45+
},
46+
"operators": {
47+
"patterns": [{
48+
"name": "keyword.operator",
49+
"match": "\\-\\>|\\:\\=|\\=\\>|\\?|\\="
50+
}]
51+
},
52+
"identifiers": {
53+
"patterns": [
54+
{
55+
"include": "#identifier_operators"
56+
},
57+
{
58+
"include": "#infix_operators"
59+
},
60+
{
61+
"include": "#regular_identifiers"
62+
}
63+
],
64+
"repository": {
65+
"identifier_operators": {
66+
"patterns": [{
67+
"name": "support.variable",
68+
"match": "(==|[!@$%^&*|<>~*\\\\\\-+\\/.]+)=*>?"
69+
}]
70+
},
71+
"infix_operators": {
72+
"name": "support.variable",
73+
"begin": "`",
74+
"end": "`"
75+
},
76+
"regular_identifiers": {
77+
"patterns": [{
78+
"name": "variable",
79+
"match": "[a-z_][a-z0-9_]*\\??"
80+
}]
81+
}
82+
}
83+
},
84+
"booleans": {
85+
"patterns": [{
86+
"name": "constant.language",
87+
"match": "\\b(true|false)\\b"
88+
}]
89+
},
90+
"numbers": {
91+
"patterns": [
92+
{
93+
"include": "#integers"
94+
},
95+
{
96+
"include": "#decimals"
97+
}
98+
],
99+
"repository": {
100+
"integers": {
101+
"patterns": [{
102+
"name": "constant.numeric",
103+
"match": "(0x(_?[A-Fa-f0-9]+)+)|(0o(_?[0-7]+)+)|(0b(_?[0-1]+)+)|(_?[0-9]+)+"
104+
}]
105+
},
106+
"decimals": {
107+
"patterns": [{
108+
"name": "constant.numeric",
109+
"match": "(_?[0-9]+\\._?[0-9]+(e-?_?[0-9]+)?)|(_?[0-9]+e-?_?[0-9]+)"
110+
}]
111+
}
112+
}
113+
},
114+
"strings": {
115+
"name": "string",
116+
"begin": "\"|'",
117+
"end": "\"|'",
118+
"patterns": [
119+
{
120+
"name": "constant.character.escape",
121+
"match": "\\\\."
122+
}
123+
]
124+
},
125+
"comments": {
126+
"name": "comment",
127+
"begin": "#",
128+
"end": "\n"
129+
}
130+
},
131+
"scopeName": "source.tony"
132+
}

0 commit comments

Comments
 (0)