Skip to content

Commit

Permalink
v0.1.0 complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcoph committed Jul 13, 2022
1 parent 635cd09 commit 263b597
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 76 deletions.
62 changes: 2 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,7 @@
# vscode-hexpat README

This is the README for your extension "vscode-hexpat". After writing up a brief description, we recommend including the following sections.
Language support for ImHex's pattern language

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

**Note:** 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) or `Cmd+Space` (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!**
Syntax hilighting
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"languages": [{
"id": "hexpat",
"aliases": ["Hexpat", "hexpat"],
"extensions": [".hexpat"],
"extensions": [".hexpat", ".pat"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
Expand Down
90 changes: 75 additions & 15 deletions syntaxes/hexpat.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
{"include": "#type"},
{"include": "#string"},
{"include": "#char"},
{"include": "#attribute"},
{"include": "#array"},
{"include": "#semicolon"},
{"include": "#coma"},
Expand All @@ -34,13 +35,15 @@
{"include": "#constant-numeric-double"},
{"include": "#constant-language-boolean"},
{"include": "#include-"},
{"include": "#directive"},
{"include": "#struct"},
{"include": "#operator"},
{"include": "#tpyeoperator"},
{"include": "#member-access"},
{"include": "#parent"},
{"include": "#this"},
{"include": "#dollar"}
{"include": "#dollar"},
{"include": "#namespace-operator"}
]
},
"keywords": {
Expand All @@ -58,7 +61,8 @@
"endCaptures": {
"0": { "name": "punctuation.end.bracket.round.hexpat" }
},
"name": "expression.group"
"name": "expression.group.hexpat",
"patterns": [{ "include": "#expression" }]
},
"scope": {
"begin": "{",
Expand All @@ -69,7 +73,7 @@
"endCaptures": {
"0": { "name": "punctuation.end.bracket.curly.hexpat" }
},
"name": "scope.group",
"name": "scope.group.hexpat",
"patterns": [{ "include": "#expression" }]
},
"type-unsigned": {
Expand Down Expand Up @@ -139,16 +143,29 @@
}
]
},
"attribute": {
"name": "meta.attribute.brackets.square.hexpat",
"begin": "\\[\\[",
"end": "\\]\\]",
"beginCaptures": {
"0": { "name": "punctuation.attribute.begin.brackets.square.hexpat" }
},
"endCaptures": {
"0": { "name": "punctuation.attribute.end.brackets.square.hexpat" }
},
"patterns": [{ "include": "#expression" }]
},
"array": {
"name": "punctuation.brackets.square.hexpat",
"begin": "\"",
"end": "\"",
"name": "meta.access.brackets.square.hexpat",
"begin": "\\[",
"end": "\\]",
"beginCaptures": {
"0": { "name": "punctuation.definition.begin.brackets.square.hexpat" }
"0": { "name": "punctuation.access.begin.brackets.square.hexpat" }
},
"endCaptures": {
"0": { "name": "punctuation.definition.end.brackets.square.hexpat" }
}
"0": { "name": "punctuation.access.end.brackets.square.hexpat" }
},
"patterns": [{ "include": "#expression" }]
},
"semicolon": {
"name": "punctuation.terminator.statement.hexpat",
Expand All @@ -164,15 +181,15 @@
},
"constant-numeric-hex": {
"name": "constant.numeric.hex.hexpat",
"match": "\\b0(x|X)\\d+\\b"
"match": "\\b0(x|X)[0-9a-fA-F]+\\b"
},
"constant-numeric-oct": {
"name": "constant.numeric.oct.hexpat",
"match": "\\b0(o|O)\\d+\\b"
"match": "\\b0(o|O)[0-7]+\\b"
},
"constant-numeric-bin": {
"name": "constant.numeric.bin.hexpat",
"match": "\\b0(b|B)\\d+\\b"
"match": "\\b0(b|B)[01]+\\b"
},
"constant-numeric-float": {
"name": "constant.numeric.float.hexpat",
Expand All @@ -187,16 +204,59 @@
"match": "\\b(true|false)\\b"
},
"include-": {
"name": "include.hexpat",
"match": "^#.*"
"name": "meta.preprocessor.directive.include.hexpat",
"begin": "^(#)(include)",
"end": "$",
"beginCaptures": {
"1": { "name": "punctuation.definition.directive.include.hexpat" },
"2": { "name": "keyword.control.directive.include.hexpat" }
},
"contentName": "keword.other.directive.include.hexpat",
"patterns": [
{
"name": "meta.definition.directive.include.parameter.bracket.angle.hexpat",
"begin": "<",
"end": ">",
"beginCaptures": {
"0": { "name": "punctuation.definition.directive.include.paramenter.begin.bracket.angle.hexpat" }
},
"endCaptures": {
"0": { "name": "punctuation.definition.directive.include.paramenter.end.bracket.angle.hexpat" }
}
},
{
"name": "meta.definition.directive.include.parameter.quote.double.hexpat",
"begin": "\"",
"end": "\"",
"beginCaptures": {
"0": { "name": "punctuation.definition.directive.include.paramenter.begin.quote.double.hexpat" }
},
"endCaptures": {
"0": { "name": "punctuation.definition.directive.include.paramenter.end.quote.double.end.hexpat" }
}
}
]
},
"directive": {
"name": "meta.preprocessor.directive.hexpat",
"begin": "^#",
"end": "$",
"beginCaptures": {
"0": { "name": "punctuation.definition.directive.hexpat" }
},
"contentName": "keword.other.directive.hexpat"
},
"struct": {
"name": "keyword.declaration.struct.hexpat",
"match": "\\bstruct\\b"
},
"operator": {
"name": "keyword.operator.hexpat",
"match": "(\\+|-|\\*|/|%|>>|<<|~|&|\\||\\^|==|!=|>|<|>=|<=|!|&&|\\|\\||\\^\\^|\\?|:)"
"match": "(\\+|-|\\*|/|%|>>|<<|~|&|\\||\\^|==|!=|>|<|>=|<=|!|&&|\\|\\||\\^\\^|=|@)"
},
"namespace-operator": {
"name": "keyword.operator.namespace.hexpat",
"match": "::"
},
"tpyeoperator": {
"name": "entity.name.function.hexpat",
Expand Down

0 comments on commit 263b597

Please sign in to comment.