-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feature/link_all_to_vm
- Loading branch information
Showing
35 changed files
with
5,376 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
## The Syntax of Lobsterlang in Backus-Naur Form | ||
```bnf | ||
<declarator> ::= <direct-declarator> | ||
<parameter-type-list> ::= <parameter-list> | ||
| <parameter-list> , ... | ||
<parameter-list> ::= <parameter-declaration> | ||
| <parameter-list> , <parameter-declaration> | ||
<direct-declarator> ::= <identifier> | ||
| ( <declarator> ) | ||
| <direct-declarator> ( <parameter-type-list> ) | ||
| <direct-declarator> ( {<identifier>}* ) | ||
<constant-expression> ::= <conditional-expression> | ||
<logical-combinator-expression> ::= <logical-xor-expression> | ||
| <logical-combinator-expression> || <logical-xor-expression> | ||
<logical-xor-expression> ::= <logical-or-expression> | ||
| <logical-xor-expression> || <logical-or-expression> | ||
<logical-or-expression> ::= <logical-and-expression> | ||
| <logical-or-expression> || <logical-and-expression> | ||
<logical-and-expression> ::= <equality-or-expression> | ||
| <logical-and-expression> && <equality-or-expression> | ||
<equality-expression> ::= <relational-expression> | ||
| <equality-expression> == <relational-expression> | ||
| <equality-expression> != <relational-expression> | ||
<relational-expression> ::= <additive-expression> | ||
| <relational-expression> <= <additive-expression> | ||
| <relational-expression> >= <shift-expression> | ||
| <relational-expression> < <additive-expression> | ||
| <relational-expression> > <additive-expression> | ||
<additive-expression> ::= <multiplicative-expression> | ||
| <additive-expression> + <multiplicative-expression> | ||
| <additive-expression> - <multiplicative-expression> | ||
<multiplicative-expression> ::= <list-expression> | ||
| <multiplicative-expression> * <list-expression> | ||
| <multiplicative-expression> / <list-expression> | ||
| <multiplicative-expression> % <list-expression> | ||
<list-expression> ::= <unary-expression> | ||
| <list-expression> -- <unary-expression> | ||
| <list-expression> ++ <unary-expression> | ||
| <list-expression> !! <unary-expression> | ||
<unary-expression> ::= <postfix-expression> | ||
| <unary-operator> <unary-expression> | ||
<postfix-expression> ::= <primary-expression> | ||
| <postfix-expression> (| {<assignment-expression>}* |) | ||
<primary-expression> ::= <identifier> | ||
| <string> | ||
| (| <expression> |) | ||
<expression> ::= <assignment-expression> | ||
| <expression> , <assignment-expression> | ||
<constant> ::= <integer-constant> | ||
| <character-constant> | ||
<assignment-expression> ::= <conditional-expression> | ||
| <unary-expression> <assignment-operator> <assignment-expression> | ||
<assignment-operator> ::= = | ||
<unary-operator> ::= @ | ||
| ~ | ||
| ! | ||
<expression-statement> ::= {<expression>}? | ||
<init-declarator> ::= <declarator> | ||
| <declarator> = <initializer> | ||
<initializer> ::= <assignment-expression> | ||
| [| <initializer-list> |] | ||
| [| <initializer-list> , |] | ||
<initializer-list> ::= <initializer> | ||
| <initializer-list> , <initializer> | ||
<statement> ::= <expression-statement> | ||
| <selection-statement> | ||
<expression-statement> ::= {<expression>}? | ||
<selection-statement> ::= if (| <expression> |) <statement> | ||
| if (| <expression> |) <statement> else <statement> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,9 @@ cabal-version: 2.2 | |
-- see: https://github.com/sol/hpack | ||
|
||
name: LobsterLang | ||
version: 0.1.0.0 | ||
description: Please see the README on GitHub at <https://github.com/githubuser/LobsterLang#readme> | ||
homepage: https://github.com/githubuser/LobsterLang#readme | ||
version: 1.0 | ||
description: Please see the README on GitHub at <https://github.com/AxelHumeau/LobsterLang/blob/main/README.md> | ||
homepage: https://github.com/AxelHumeau/LobsterLang | ||
bug-reports: https://github.com/githubuser/LobsterLang/issues | ||
author: Author name here | ||
maintainer: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/** | ||
client/node_modules/** | ||
client/out/** | ||
server/node_modules/** | ||
server/out/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/**@type {import('eslint').Linter.Config} */ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: [ | ||
'@typescript-eslint', | ||
], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
rules: { | ||
'semi': [2, "always"], | ||
'@typescript-eslint/no-unused-vars': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'@typescript-eslint/explicit-module-boundary-types': 0, | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
out | ||
node_modules | ||
client/server | ||
.vscode-test | ||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.vscode/** | ||
**/*.ts | ||
**/*.map | ||
.gitignore | ||
**/tsconfig.json | ||
**/tsconfig.base.json | ||
contributing.md | ||
.travis.yml | ||
client/node_modules/** | ||
!client/node_modules/vscode-jsonrpc/** | ||
!client/node_modules/vscode-languageclient/** | ||
!client/node_modules/vscode-languageserver-protocol/** | ||
!client/node_modules/vscode-languageserver-types/** | ||
!client/node_modules/{minimatch,brace-expansion,concat-map,balanced-match}/** | ||
!client/node_modules/{semver,lru-cache,yallist}/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# LSP Example | ||
|
||
Heavily documented sample code for https://code.visualstudio.com/api/language-extensions/language-server-extension-guide | ||
|
||
## Functionality | ||
|
||
This Language Server works for plain text file. It has the following language features: | ||
- Completions | ||
- Diagnostics regenerated on each file change or configuration change | ||
|
||
It also includes an End-to-End test. | ||
|
||
## Structure | ||
|
||
``` | ||
. | ||
├── client // Language Client | ||
│ ├── src | ||
│ │ ├── test // End to End tests for Language Client / Server | ||
│ │ └── extension.ts // Language Client entry point | ||
├── package.json // The extension manifest. | ||
└── server // Language Server | ||
└── src | ||
└── server.ts // Language Server entry point | ||
``` | ||
|
||
## Running the Sample | ||
|
||
- Run `npm install` in this folder. This installs all necessary npm modules in both the client and server folder | ||
- Open VS Code on this folder. | ||
- Press Ctrl+Shift+B to start compiling the client and server in [watch mode](https://code.visualstudio.com/docs/editor/tasks#:~:text=The%20first%20entry%20executes,the%20HelloWorld.js%20file.). | ||
- Switch to the Run and Debug View in the Sidebar (Ctrl+Shift+D). | ||
- Select `Launch Client` from the drop down (if it is not already). | ||
- Press ▷ to run the launch config (F5). | ||
- In the [Extension Development Host](https://code.visualstudio.com/api/get-started/your-first-extension#:~:text=Then%2C%20inside%20the%20editor%2C%20press%20F5.%20This%20will%20compile%20and%20run%20the%20extension%20in%20a%20new%20Extension%20Development%20Host%20window.) instance of VSCode, open a document in 'plain text' language mode. | ||
- Type `j` or `t` to see `Javascript` and `TypeScript` completion. | ||
- Enter text content such as `AAA aaa BBB`. The extension will emit diagnostics for all words in all-uppercase. |
Oops, something went wrong.