Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ibx34 committed Dec 26, 2024
1 parent ad6977e commit 7bf526e
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 99 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ whatever.s
*.o
boot
whatever
.vscode
.vscode
*.vsix
66 changes: 1 addition & 65 deletions astir/README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1 @@
# astir README

This is the README for your extension "astir". After writing up a brief description, we recommend including the following sections.

## Features

Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.

For example if there is an image subfolder under your extension project workspace:

\!\[feature X\]\(images/feature-x.png\)

> 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.
## Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

## Extension Settings

Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.

For example:

This extension contributes the following settings:

* `myExtension.enable`: Enable/disable this extension.
* `myExtension.thing`: Set to `blah` to do something.

## Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

## Release Notes

Users appreciate release notes as you update your extension.

### 1.0.0

Initial release of ...

### 1.0.1

Fixed issue #.

### 1.1.0

Added features X, Y, and Z.

---

## Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.

## For more information

* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)

**Enjoy!**
# Astir Syntax Highlighting
2 changes: 1 addition & 1 deletion astir/language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// symbol used for single line comment. Remove this entry if your language does not support line comments
"lineComment": "//",
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": [ "/*", "*/" ]
"blockComment": [ ]
},
// symbols used as brackets
"brackets": [
Expand Down
2 changes: 1 addition & 1 deletion astir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}],
"grammars": [{
"language": "astir",
"scopeName": "",
"scopeName": "source.astir",
"path": "./syntaxes/astir.tmLanguage.json"
}]
}
Expand Down
93 changes: 64 additions & 29 deletions astir/syntaxes/astir.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,67 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"scopeName": "boot.dal",
"name": "Astir",
"scopeName": "source.astir",
"patterns": [
{
"include": "#keywords"
},
{
"include": "#strings"
}
{
"name": "comment.line.double-slash.astir",
"match": "//.*$"
},
{
"name": "keyword.declaration.astir",
"match": "\\bd'[A-Za-z_][A-Za-z0-9_]*\\b"
},
{
"name": "entity.name.function.astir",
"match": "\\b[A-Za-z_][A-Za-z0-9_]*\\\\"
},
{
"name": "variable.parameter.astir",
"match": "\\b[A-Za-z_][A-Za-z0-9_]*\\s+[A-Za-z_][A-Za-z0-9_]*\\b"
},
{
"name": "storage.type.astir",
"match": "::"
},
{
"name": "constant.numeric.astir",
"match": "\\b\\d+\\b"
},
{
"name": "keyword.control.arrow.astir",
"match": ""
},
{
"name": "string.quoted.double.astir",
"begin": "\\[\"",
"end": "\"\\]",
"patterns": [
{
"name": "constant.character.escape.astir",
"match": "\\\\."
}
]
},
{
"name": "Comment",
"scopeName": "comment.line.double-slash",
"patterns": [
{
"match": "//.*",
"name": "comment.line.double-slash"
}
]
},
{
"name": "meta.assembly.astir",
"begin": "asm \\[",
"end": "\\]",
"patterns": [
{
"name": "string.unquoted.astir",
"match": "\".*?\""
}
]
}
],
"repository": {
"keywords": {
"patterns": [{
"name": "keyword.control.astir",
"match": "\\b(if|while|for|return)\\b"
}]
},
"strings": {
"name": "string.quoted.double.astir",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.astir",
"match": "\\\\."
}
]
}
},
}
"repository": {}
}

3 changes: 1 addition & 2 deletions boot.dal
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
//take_int_and_add_2\ x int, y int :: int → x + y

print_hello_world\ :: () → asm ["mov X0, #1", "adr X1, helloworld", "mov X2, #13", "mov X16, #4", "svc 0", "ret"]
_start\ :: int → asm ["bl print_hello_world", "mov X0, #0", "mov X16, #1", "svc 0", "helloworld: .ascii \"Hello World!\""]

_start\ :: int → asm ["bl print_hello_world", "mov X0, #0", "mov X16, #1", "svc 0", "helloworld: .ascii \"Hello World!\""]

0 comments on commit 7bf526e

Please sign in to comment.