Skip to content

Commit

Permalink
Release playground (#434)
Browse files Browse the repository at this point in the history
* chore(tests): rename .ask.snapshot.tsx to .ast.tsx (#350)

* feat(chore): remove existing .ask.snapshot.tsx files to .ast.tsx (#293)

* feat(tests): rename .ask.snapshot.tsx to .ast.tsx in source code (#293)

* feat(vscode): implement VSCode extension for .ask syntax highlighting (#353)

* feat(vscode): implement VSCode extension for .ask syntax highlighting (#318)

* docs(vscode): add README for VS Code syntax highlighting extension

* fix(playground): add GA to the site for Netlify too (#348)

* fix(README): update AskQL diagram (#347)

* feat(askvm): add operator == (#241) (#344)

* feat(askscript): add exclamation mark (!) to operators (#295) (#342)

* fix(package.json): add @jest/environment and @jest/types packages (#341)

* build(deps-dev): bump @babel/polyfill from 7.10.1 to 7.10.4 (#335)

Bumps [@babel/polyfill](https://github.com/babel/babel/tree/HEAD/packages/babel-polyfill) from 7.10.1 to 7.10.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.4/packages/babel-polyfill)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#334)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.5.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump eslint from 7.3.1 to 7.4.0 (#332)

Bumps [eslint](https://github.com/eslint/eslint) from 7.3.1 to 7.4.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.3.1...v7.4.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(askvm): implement notEquals resource and != operator + tests (#368)

* feat(askvm): implement notEquals resource and != operator + tests

* fix(tests): make prettier and tests run successfully again

* build(deps-dev): bump @babel/preset-react from 7.10.1 to 7.10.4 (#338)

Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.10.1 to 7.10.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.4/packages/babel-preset-react)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @babel/core from 7.10.3 to 7.10.4 (#337)

Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.10.3 to 7.10.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.4/packages/babel-core)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @babel/preset-typescript from 7.10.1 to 7.10.4 (#333)

Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.10.1 to 7.10.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.4/packages/babel-preset-typescript)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump typescript from 3.9.5 to 3.9.6 (#336)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.5 to 3.9.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(playground): reformat initial sample code (#376)

* feat(askvm): add ! (exclamation) unary operator + tests (#375)

* docs(readme): improve description and benefits (#392)

* fix(askvm): add url param to fetch (#381)

* fix(askvm): adds url param to fetch

* Adds test for fetch

* Updates fetch test

* Applies PR comments

* Revert "Applies PR comments"

This reverts commit 6c7e03b.

* Applies PR comments

Co-authored-by: Richard <[email protected]>

> @czerwinskilukasz1
> 
> I'm afraid I don't have permission to merge.

Ouch, forgot about permission. I will do the merge now, congrats for making your first change in AskQL repository! 🚀 
How did you like it? ;)

* fix(askscript): fix tricky array expression (#383)

* feat: min Closes #369 (#393)

* feat: add a 'bitwiseOr' resource (| binary operator) (#397)

* fix(playground): fix blink on Ctrl-S (issue #377) (#396)

* feat(playground): add an AskScript example (Facebook likes) (#384)

* fix(askscript): fix whitespace issue in control flows (#390) (#394)

* fix(askscript): fix whitespace issue in control flows (#390)

* feat(tests): add tests for whitespace control-flow

* fix(playground): fix links to resources and values (#398) (#399)

* fix: create OS agnostic build command/s for rm and mkdir (#395) (#405)

* build(deps-dev): bump lodash from 4.17.15 to 4.17.19 (#409)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump webpack from 4.43.0 to 4.44.0 (#414)

Bumps [webpack](https://github.com/webpack/webpack) from 4.43.0 to 4.44.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v4.43.0...v4.44.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @babel/core from 7.10.4 to 7.10.5 (#415)

Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.10.4 to 7.10.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.5/packages/babel-core)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @types/express from 4.17.6 to 4.17.7 (#418)

Bumps [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express) from 4.17.6 to 4.17.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump express-handlebars from 4.0.5 to 5.1.0 (#420)

Bumps [express-handlebars](https://github.com/express-handlebars/express-handlebars) from 4.0.5 to 5.1.0.
- [Release notes](https://github.com/express-handlebars/express-handlebars/releases)
- [Changelog](https://github.com/express-handlebars/express-handlebars/blob/master/CHANGELOG.md)
- [Commits](express-handlebars/express-handlebars@v4.0.5...v5.1.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @typescript-eslint/parser from 3.4.0 to 3.7.0 (#416)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.4.0 to 3.7.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.7.0/packages/parser)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @types/node from 14.0.14 to 14.0.26 (#421)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.14 to 14.0.26.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @types/lodash from 4.14.157 to 4.14.158 (#422)

Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.157 to 4.14.158.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump eslint from 7.4.0 to 7.5.0 (#419)

Bumps [eslint](https://github.com/eslint/eslint) from 7.4.0 to 7.5.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.4.0...v7.5.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump typescript from 3.9.6 to 3.9.7 (#417)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.6 to 3.9.7.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v3.9.6...v3.9.7)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @types/glob from 7.1.2 to 7.1.3 (#423)

Bumps [@types/glob](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/glob) from 7.1.2 to 7.1.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/glob)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(askvm): add a 'bitwiseAnd' resource (& binary operator) (#389)

* Add a 'bitwiseAnd' resource (& binary operator) #374"

* prettified code

prettified "bitwiseAnd.ts and index.ts"

* prettier index.ts

* Added tests and changed type in bitwise to number

* Update bitwiseAnd.test.ts

* added askscript tests.

* added end case test to operator

* feat(askvm): add `hasKey` resource (#413)

* feat: add hasKey resource for list

* test: add tests for hasKey resource

* feat(askvm): add type checking

* test(askscript): tests on both array and object

* fix(askscript): make if/while/... without curly braces to throw Syntax Error (#406)

* fix(askscript): make if/while/... without curly braces to throw Syntax Error

* refactor(askscript): minor refactor in .pegjs

Co-authored-by: Lukasz Czerwinski <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Richard Moran <[email protected]>
Co-authored-by: Shubham Sahu <[email protected]>
Co-authored-by: Gaurav Subedi <[email protected]>
Co-authored-by: develper <[email protected]>
Co-authored-by: akeni <[email protected]>
Co-authored-by: cpelican <[email protected]>
  • Loading branch information
9 people authored Aug 3, 2020
1 parent f8bab0b commit e3e0b1c
Show file tree
Hide file tree
Showing 318 changed files with 4,521 additions and 1,697 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.ask
*.ask.snapshot.tsx
*.ast.tsx
*.askcode
/dist
/drafts
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.prettierignore
*.ask
*.ask.ast.json
*.ask.snapshot.tsx
*.ast.tsx
*.askcode
*.test.result.ts
/.idea
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@
</p>

# [AskQL](https://askql.org/)

AskQL is a new query and programming language that can express any data request.
<br>Send executable code instead of JSONs.

- Asynchronous by default
- Processes only immutable data
- Based entirely on the functional programming paradigm
AskQL is a new Turing-complete query and programming language, which allows faster and easier communication with servers. <br/>
Instead of mere _data queries_ or _simple REST_ questions, AskQL allows to query a server with _fully functional_ programs which use all the data and services the server shares in a secure way.

## Why and what for?

Expand All @@ -21,16 +16,22 @@ AskQL is a new query and programming language that can express any data request.
title="Rest"
height=50%
width=50%><img
src="https://xfaang-assets.s3.eu-west-3.amazonaws.com/diagrams/AskQL_approach.png"
src="https://xfaang-assets.s3.eu-west-3.amazonaws.com/diagrams/AskQL_approach-update-july2020.jpg"
align="center"
title="AskQL"
height=50%
width=50%>

Benefits for development process:
- Next milestone after GraphQL and REST API
- Send code to servers without the need to deploy
- New safe query language
- Compiled to clean functional code
- Send code to servers without the need to deploy
- Send executable code instead of JSONs

Benefits for programmers:
- Asynchronous by default, no more `await` keyword - cleaner code
- Processes only immutable data - fewer errors
- Compiled to a clean functional code - clear logic

### Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion jest.test.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
'.*\\.ask\\.formatted\\.ask',
'.*\\.test.args.ts',
'.*\\.test.result.ts',
'.*\\.ask.snapshot.tsx',
'.*\\.ast.tsx',
'<rootDir>/dist/',
'<rootDir>/drafts/',
'<rootDir>/src/__tests__/lib.ts',
Expand Down
3,454 changes: 1,810 additions & 1,644 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 20 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"cli:dev": "npx pegjs src/askscript/parser/askscript.grammar.pegjs && ts-node --files src/cli.ts",
"netlify:playground:build": "npm run build && npm run netlify:playground:build-html",
"netlify:playground:build-html": "dotenv -e dist/.env ts-node src/playground/compile.ts src/playground/views/main.handlebars dist/playground/public/index.html",
"playground:build": "rm -rf dist/playground && mkdir -p dist/playground/public && npm run playground:build-assets && npm run playground:build-ts && ts-node scripts/playgroundPostBuild.ts",
"playground:build": "ts-node scripts/playgroundBuild.ts && npm run playground:build-assets && npm run playground:build-ts && ts-node scripts/playgroundPostBuild.ts",
"playground:build-assets": "npm run playground:build-assets:img",
"playground:build-assets:img": "imagemin src/playground/public/assets/img/* --out-dir=dist/playground/public/img",
"playground:build-ts": "tsc && mv dist/playground/public/assets/js dist/playground/public/js",
Expand Down Expand Up @@ -59,51 +59,53 @@
},
"dependencies": {},
"devDependencies": {
"@babel/core": "7.10.3",
"@babel/polyfill": "^7.10.1",
"@babel/core": "7.10.5",
"@babel/polyfill": "^7.10.4",
"@babel/preset-env": "7.10.4",
"@babel/preset-react": "7.10.1",
"@babel/preset-typescript": "7.10.1",
"@babel/preset-react": "7.10.4",
"@babel/preset-typescript": "7.10.4",
"@jest/environment": "^26.1.0",
"@jest/types": "^26.1.0",
"@types/ace": "0.0.43",
"@types/cors": "^2.8.6",
"@types/expect": "^24.3.0",
"@types/express": "4.17.6",
"@types/express": "4.17.7",
"@types/express-handlebars": "^3.1.0",
"@types/glob": "7.1.2",
"@types/jest": "26.0.3",
"@types/glob": "7.1.3",
"@types/jest": "^26.0.3",
"@types/jsesc": "2.5.1",
"@types/lodash": "^4.14.157",
"@types/lodash": "^4.14.158",
"@types/micromatch": "^4.0.1",
"@types/node": "14.0.14",
"@types/node": "14.0.26",
"@types/node-fetch": "2.5.7",
"@types/pegjs": "0.10.2",
"@types/rimraf": "3.0.0",
"@types/shelljs": "^0.8.8",
"@typescript-eslint/eslint-plugin": "3.4.0",
"@typescript-eslint/parser": "3.4.0",
"@typescript-eslint/eslint-plugin": "3.5.0",
"@typescript-eslint/parser": "3.7.0",
"babel-jest": "26.1.0",
"babel-loader": "^8.1.0",
"babel-plugin-inline-import": "3.0.0",
"chalk": "4.1.0",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"dotenv-cli": "^3.2.0",
"eslint": "7.3.1",
"eslint": "7.5.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-prettier": "3.1.4",
"expect": "^26.1.0",
"express": "4.17.1",
"express-handlebars": "^4.0.5",
"express-handlebars": "^5.1.0",
"fs.promises": "0.1.2",
"glob": "7.1.6",
"golden-layout": "^1.5.9",
"handlebars": "^4.7.6",
"husky": "4.2.5",
"imagemin-cli": "^6.0.0",
"jest": "26.0.1",
"jest": "^26.1.0",
"jsesc": "3.0.1",
"lint-staged": "10.2.11",
"lodash": "^4.17.15",
"lodash": "^4.17.19",
"micromatch": "^4.0.2",
"nanoid": "^3.1.10",
"node-fetch": "2.6.0",
Expand All @@ -114,8 +116,8 @@
"rimraf": "3.0.2",
"shelljs": "^0.8.4",
"ts-node": "8.10.2",
"typescript": "3.9.5",
"webpack": "^4.43.0",
"typescript": "3.9.7",
"webpack": "^4.44.0",
"webpack-cli": "^3.3.11"
}
}
13 changes: 13 additions & 0 deletions scripts/playgroundBuild.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { removeRecursive } from './utils';
import { mkdir } from 'shelljs';

async function main() {
try {
await removeRecursive('./dist/playground/');
mkdir('-p', 'dist/playground/public/');
} catch (e) {
console.error(e);
}
}

main();
4 changes: 4 additions & 0 deletions src/askscript-vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
9 changes: 9 additions & 0 deletions src/askscript-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

All notable changes to the "askscript-language" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [AskQL 1.3.0]

- Initial release
36 changes: 36 additions & 0 deletions src/askscript-vscode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# askscript-language README

This is the README for AskScript syntax highlighting extension "askscript-language". The extension colors .ask files.

## Features

Syntax coloring for:

- built-in types (int, float, bool, null, array, map)
- keywords (for, of, in, while, if, fun, ask, query, remote)
- variable modifiers (let, const)
- literals (int and float numbers)
- built-in functions (`toString` and `log`)
- line comments

## How to install

1. Copy the whole directory to your [VS Code extension directory](https://code.visualstudio.com/docs/editor/extension-gallery#_where-are-extensions-installed).
2. Run VS Code
3. Open an .ask file

The code should be colored.

## Known Issues

For known issues check [Github issues for AskQL](https://github.com/xFAANG/askql/labels/type%3Avscode-highlighting).

## Release Notes

Users appreciate release notes as you update your extension.

### AskQL 1.3.0

Initial release.

**Enjoy!**
28 changes: 28 additions & 0 deletions src/askscript-vscode/language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"comments": {
// 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": [ "/*", "*/" ]
},
// symbols used as brackets
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
// symbols that are auto closed when typing
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["'", "'"]
],
// symbols that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["'", "'"]
]
}
25 changes: 25 additions & 0 deletions src/askscript-vscode/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "askscript-language",
"displayName": "AskScript Language",
"description": "AskScript is a language used by AskQL query solution. AskQL allows you to ask your service any complex question about the data.",
"version": "0.0.1",
"engines": {
"vscode": "^1.46.0"
},
"categories": [
"Programming Languages"
],
"contributes": {
"languages": [{
"id": "askscript",
"aliases": ["AskScript", "askscript"],
"extensions": [".ask"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "askscript",
"scopeName": "source.askscript",
"path": "./syntaxes/askscript.tmLanguage.json"
}]
}
}
97 changes: 97 additions & 0 deletions src/askscript-vscode/syntaxes/askscript.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "AskScript",
"patterns": [
{
"include": "#keywords"
},
{
"include": "#types"
},
{
"include": "#built-in"
},
{
"include": "#comment"
},
{
"include": "#strings"
}
],
"repository": {
"keywords": {
"patterns": [
{
"name": "keyword.control.askscript",
"match": "\\b(if|while|for|return|query|remote|of|in)\\b"
},
{
"name": "keyword.other.askscript",
"match": "\\b(ask)\\b"
},
{
"name": "storage.modifier.const.askscript",
"match": "\\b(const)\\b"
},
{
"name": "storage.modifier.let.askscript",
"match": "\\b(let)\\b"
},
{
"name": "storage.type.fun.askscript",
"match": "\\b(fun)\\b"
}
]
},
"types": {
"patterns": [
{
"name": "support.type.askscript",
"match": "\\b(int|float|string|bool|null|array|map)\\b"
}
]
},
"numeric-literal": {
"patterns": [
{
"name": "constant.numeric.decimal.int.askscript",
"match": "\\b[-]?[0-9]+\\b"
},
{
"name": "constant.numeric.decimal.float.askscript",
"match": "\\b[-]?[0-9]+ '.' [0-9]+\\b"
}
]
},
"built-in": {
"patterns": [
{
"name": "support.function",
"match": "\\b(toString|log)\\b"
}
]
},
"comment": {
"patterns": [
{
"name": "comment.line.double-slash.askscript",
"begin": "//",
"end": "(?=$)",
"contentName": "comment.line.double-slash.askscript"
}
]
},
"strings": {
"name": "string.quoted.single.askscript",
"begin": "'",
"end": "'",
"patterns": [
{
"name": "constant.character.escape.askscript",
"match": "\\\\."
}
]
}
},
"scopeName": "source.askscript"
}
Loading

0 comments on commit e3e0b1c

Please sign in to comment.