Skip to content
Open

Dev #10

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ out
node_modules
client/server
.vscode-test
*.vsix
*.vsix
.DS_Store
2,258 changes: 2,247 additions & 11 deletions client/package-lock.json

Large diffs are not rendered by default.

27 changes: 0 additions & 27 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,5 @@
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"vsce": "1.74.0"
},
"activationEvents": [
"onLanguage:tibbo-basic"
],
"contributes": {
"languages": [
{
"id": "tibbo-basic",
"aliases": [
"Tibbo Basic"
],
"extensions": [
".tbs",
".tbh",
".tph",
".tpr"
],
"configuration": "./out/tibbo-basic-language-configuration.json"
}
],
"grammars": [
{
"language": "tibbo-basic",
"scopeName": "source.tibbo-basic",
"path": "./out/tibbo-basic.tmLanguage.json"
}
]
}
}
4 changes: 2 additions & 2 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
LanguageClientOptions,
ServerOptions,
TransportKind
} from 'vscode-languageclient';
} from 'vscode-languageclient/node';

let client: LanguageClient;
let platformsPath: string | undefined = '';
const TIDEOutput = vscode.window.createOutputChannel("Tibbo Basic");
const TIDEOutput = vscode.window.createOutputChannel("Tibbo");

export async function activate(context: vscode.ExtensionContext): Promise<void> {
TIDEOutput.show();
Expand Down
1 change: 1 addition & 0 deletions client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"rootDir": "src",
"preserveConstEnums": true,
"strictNullChecks": true,
"skipLibCheck": true,
"noUnusedParameters": false
},
"include": ["src/**/*"],
Expand Down
6,904 changes: 3,959 additions & 2,945 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 24 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
{
"name": "@tibbo/tibbo-basic",
"name": "tibbo-basic",
"displayName": "Tibbo Basic Language",
"description": "Tibbo Basic Language Support",
"author": {
"name": "Jimmy Hu",
"email": "jimmy.hu@tibbo.com"
},
"license": "MIT",
"version": "1.0.16",
"version": "1.1.2",
"repository": {
"type": "git",
"url": "https://github.com/tibbotech/tibbo-basic.git"
},
"bugs": {
"url": "https://github.com/tibbotech/tibbo-basic/issues",
"email": "jimmy.hu@tibbo.com"
},
"publisher": "tibbotech",
"categories": [],
"categories": [
"Programming Languages"
],
"keywords": [
"tibbo-basic"
],
"engines": {
"vscode": "^1.43.0"
"vscode": "^1.75.0"
},
"activationEvents": [
"onLanguage:tibbo-basic",
"workspaceContains:*.tpr"
"workspaceContains:*.tpr",
"workspaceContains:*.tbs"
],
"icon": "images/icon.png",
"main": "./server/lib/index.js",
"main": "./client/out/extension.js",
"scripts": {
"postinstall": "cd server && npm install",
"compile": "tsc -b",
"build": "tsc -b",
"watch": "tsc -b -w",
"webpack": "webpack --mode production --config ./client/webpack.config.js && webpack --mode production --config ./server/webpack.config.js",
"webpack": "NODE_OPTIONS=--openssl-legacy-provider webpack --mode production --config ./client/webpack.config.js && webpack --mode production --config ./server/webpack.config.js",
"vscode:prepublish": "npm run webpack",
"package": "vsce package",
"test": "cd server && npm run test"
Expand Down Expand Up @@ -61,13 +69,17 @@
},
"devDependencies": {
"@types/node": "^12.12.0",
"eslint": "^6.4.0",
"@types/vscode": "^1.75.1",
"@typescript-eslint/parser": "^2.3.0",
"typescript": "^4.0.2",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"eslint": "^6.4.0",
"merge-options": "^3.0.4",
"ts-loader": "^7.0.5",
"ts-node": "^8.4.1"
"ts-node": "^8.4.1",
"typescript": "4.3",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
},
"dependencies": {
"vscode-languageclient": "^9.0.1"
}
}
21 changes: 3 additions & 18 deletions server/language/TibboBasic/TibboBasicParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ jumpStmt
goToStmt : GOTO IDENTIFIER;

ifThenElseStmt
: IF expression THEN (statement | jumpStmt) (ELSE (statement | jumpStmt))? NEWLINE # inlineIfThenElse
| IF expression THEN NEWLINE+ block (ELSEIF ifConditionStmt THEN block)* (ELSE block)? END_IF # blockIfThenElse
: IF expression THEN statement (ELSE statement)? NEWLINE # inlineIfThenElse
| IF expression THEN NEWLINE* block (ELSEIF ifConditionStmt THEN block)* (ELSE block)? END_IF # blockIfThenElse
;

ifConditionStmt : expression;
Expand Down Expand Up @@ -190,23 +190,8 @@ typeStmtElement:

// operator precedence is represented by rule order

//assignment: IDENTIFIER EQ expression;

//expression
// : ('-' | NOT) expression
// | expression op=(MULT | DIV | MOD) expression
// | expression op=(PLUS | MINUS) expression
// | expression op=(LEQ | GEQ | LT | GT) expression
// | expression op=(NEQ | EQ) expression
// | expression op=(SHL | SHR | NOT | AND | XOR | OR) expression
// | literal
// | literal argList
// | LPAREN expression RPAREN
// ;


expression
: unaryExpression
: unaryExpression NEWLINE*
| expression op=(MULT | DIV | MOD) expression
| expression op=(PLUS | MINUS) expression
| expression op=(LEQ | GEQ | LT | GT) expression
Expand Down
2 changes: 1 addition & 1 deletion server/language/TibboBasic/lib/TibboBasicParser.interp

Large diffs are not rendered by default.

Loading