Skip to content

Commit bd77b11

Browse files
authored
Merge branch 'dev' into actions/add-coverage
2 parents 6a4b813 + a7980fa commit bd77b11

34 files changed

+360
-56
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ jobs:
2929
name: Test
3030
needs: [setup]
3131
runs-on: ubuntu-latest
32-
permissions:
33-
pull-requests: write
3432
steps:
3533
- name: Checkout repository
3634
uses: actions/checkout@v5

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# calvin-lang
1+
# encode
22

33
Personal project to make a C/JS-like programming language

apps/extension/.vscodeignore

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

apps/extension/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Change Log
2+
3+
All notable changes to the "encode" extension will be documented in this file.
4+
5+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6+
7+
## [Unreleased]
8+
9+
- Initial release

apps/extension/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# encode README
2+
3+
This is the README for your extension "encode". After writing up a brief description, we recommend including the following sections.
4+
5+
## Development
6+
7+
You will need to create a symbolic link in the vscode extensions folder to point to this folder.
8+
9+
On Linux:
10+
```sh
11+
cd ~/.vscode/extensions # this location depends on the system
12+
ln -s ~/repos/encode/apps/extension/ encode-lang.encode-alpha
13+
```
14+
15+
## Features
16+
17+
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
18+
19+
For example if there is an image subfolder under your extension project workspace:
20+
21+
\!\[feature X\]\(images/feature-x.png\)
22+
23+
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
24+
25+
## Requirements
26+
27+
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
28+
29+
## Extension Settings
30+
31+
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
32+
33+
For example:
34+
35+
This extension contributes the following settings:
36+
37+
* `myExtension.enable`: Enable/disable this extension.
38+
* `myExtension.thing`: Set to `blah` to do something.
39+
40+
## Known Issues
41+
42+
Calling out known issues can help limit users opening duplicate issues against your extension.
43+
44+
## Release Notes
45+
46+
Users appreciate release notes as you update your extension.
47+
48+
### 1.0.0
49+
50+
Initial release of ...
51+
52+
### 1.0.1
53+
54+
Fixed issue #.
55+
56+
### 1.1.0
57+
58+
Added features X, Y, and Z.
59+
60+
---
61+
62+
## Working with Markdown
63+
64+
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
65+
66+
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
67+
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
68+
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
69+
70+
## For more information
71+
72+
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
73+
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
74+
75+
**Enjoy!**

apps/extension/deno.jsonc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "@encode/extension",
3+
"version": "0.1.0",
4+
5+
"exports": {
6+
".": "./main.ts"
7+
},
8+
9+
"imports": {
10+
"@/": "./"
11+
}
12+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"comments": {
3+
// symbol used for single line comment. Remove this entry if your language does not support line comments
4+
"lineComment": "//",
5+
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
6+
"blockComment": ["/*", "*/"]
7+
},
8+
// symbols used as brackets
9+
"brackets": [["{", "}"], ["[", "]"], ["(", ")"]],
10+
// symbols that are auto closed when typing
11+
"autoClosingPairs": [["{", "}"], ["[", "]"], ["(", ")"], ["\"", "\""], ["'", "'"]],
12+
// symbols that can be used to surround a selection
13+
"surroundingPairs": [["{", "}"], ["[", "]"], ["(", ")"], ["\"", "\""], ["'", "'"]]
14+
}

apps/extension/main.ts

Whitespace-only changes.

apps/extension/package.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "encode-lang",
3+
"displayName": "Encode Language Support",
4+
"description": "",
5+
"version": "0.0.1",
6+
"engines": {
7+
"vscode": "^1.105.0"
8+
},
9+
"categories": [
10+
"Programming Languages"
11+
],
12+
"contributes": {
13+
"languages": [
14+
{
15+
"id": "encode",
16+
"aliases": [
17+
"Encode"
18+
],
19+
"extensions": [
20+
"ec"
21+
],
22+
"configuration": "./language-configuration.json"
23+
}
24+
],
25+
"grammars": [
26+
{
27+
"language": "encode",
28+
"scopeName": "source.encode",
29+
"path": "./syntaxes/encode.tmLanguage.json"
30+
}
31+
]
32+
}
33+
}
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "Encode",
4+
"patterns": [
5+
{
6+
"include": "#comments"
7+
},
8+
{
9+
"include": "#keywords"
10+
},
11+
{
12+
"include": "#operators"
13+
},
14+
{
15+
"include": "#strings"
16+
},
17+
{
18+
"include": "#types"
19+
},
20+
{
21+
"include": "#values"
22+
}
23+
],
24+
"repository": {
25+
"comments": {
26+
"patterns": [
27+
{
28+
"name": "comment.block.encode",
29+
"begin": "/\\*",
30+
"end": "\\*/"
31+
},
32+
{
33+
"name": "comment.line.double-slash.encode",
34+
"match": "//[^\n]*"
35+
}
36+
]
37+
},
38+
"keywords": {
39+
"patterns": [
40+
{
41+
"name": "keyword.control.encode",
42+
"match": "\\b(if|elif|else|do|while|finally|return|break|continue)\\b"
43+
},
44+
{
45+
"name": "keyword.other.encode",
46+
"match": "\\b(let)\\b"
47+
}
48+
]
49+
},
50+
"operators": {
51+
"patterns": [
52+
{
53+
"name": "keyword.logical.encode",
54+
"match": "\\b(and|or|not|in)\\b"
55+
},
56+
{
57+
"name": "keyword.operator.compound.encode",
58+
"match": "(\\+|-|\\*|\\/|%|~|&|\\||\\^|<<|>>|>>>|\\?\\?)="
59+
},
60+
{
61+
"name": "keyword.operator.encode",
62+
"match": "(\\+\\+|--|\\+|-|\\*|\\/|%|~|&|\\||\\^|<<|>>|>>>|\\?\\?|>=|<=|>|<|==|!=|=)"
63+
}
64+
]
65+
},
66+
"strings": {
67+
"patterns": [
68+
{
69+
"name": "string.quoted.double.encode",
70+
"begin": "\"",
71+
"end": "\"",
72+
"patterns": [
73+
{
74+
"name": "constant.character.escape.encode",
75+
"match": "\\\\."
76+
}
77+
]
78+
},
79+
{
80+
"name": "string.quoted.single.encode",
81+
"begin": "'",
82+
"end": "'",
83+
"patterns": [
84+
{
85+
"name": "constant.character.escape.encode",
86+
"match": "\\\\."
87+
}
88+
]
89+
}
90+
]
91+
},
92+
"types": {
93+
"patterns": [
94+
{
95+
"name": "support.type.encode",
96+
"match": "\\b(bool|(i|u|b)(8|16|32|64)|(r|x)(32|64)|string)\\b"
97+
}
98+
]
99+
},
100+
"values": {
101+
"patterns": [
102+
{
103+
"name": "constant.numeric.encode",
104+
"match": "\\b([0-9]+(\\.[0-9]+(i|I|j|J)?)?)\\b"
105+
},
106+
{
107+
"name": "constant.numeric.binary.encode",
108+
"match": "\\b(0b([01][01_]*[01]|[01]))\\b"
109+
},
110+
{
111+
"name": "constant.numeric.octal.encode",
112+
"match": "\\b(0o([0-7][0-7_]*[0-7]|[0-7]))\\b"
113+
},
114+
{
115+
"name": "constant.numeric.hex.encode",
116+
"match": "\\b(0x([0-9a-fA-F][0-9a-fA-F_]*[0-9a-fA-F]|[0-9a-fA-F]))\\b"
117+
},
118+
{
119+
"name": "constant.language.encode",
120+
"match": "\\b(true|false|(inf|NaN)(i|I|j|J)?)\\b"
121+
},
122+
{
123+
"name": "variable.encode",
124+
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"
125+
}
126+
]
127+
}
128+
},
129+
"scopeName": "source.encode"
130+
}

0 commit comments

Comments
 (0)