Skip to content

Commit

Permalink
Merge branch 'dev-next' into 271-feature-implement-do-while-loop-stat…
Browse files Browse the repository at this point in the history
…ement

Signed-off-by: Luna <[email protected]>
  • Loading branch information
Luna-Klatzer authored Jul 1, 2024
2 parents 107f1e3 + 42d979d commit 1189a0b
Show file tree
Hide file tree
Showing 221 changed files with 6,272 additions and 1,935 deletions.
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
},
"rules": {
"linebreak-style": ["error", "unix"],
"max-params": 0,
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [1, { "vars": "local", "args": "none" }],
"@typescript-eslint/consistent-type-imports": "error",
"no-unused-vars": "off",
"max-params": 0,
"no-warning-comments": 0,
"no-useless-catch": 1,
"comma-dangle": 0,
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nodejs-cli-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -56,7 +56,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nodejs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -30,7 +30,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v3
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ To use development versions of Kipper download the
([#502](https://github.com/Kipper-Lang/Kipper/issues/502)).
- Support for complex string formatting (or also called templating) in the form of Python-like F-Strings.
([#287](https://github.com/Kipper-Lang/Kipper/issues/287)).
- Support for string multiplication using the `*` operator.
([#478](https://github.com/Kipper-Lang/Kipper/issues/478)).
- New valid conversions:
- `void` to `str`.
- `null` to `str`.
Expand All @@ -39,11 +41,13 @@ To use development versions of Kipper download the
- `kipper/core/compiler/ast/factories`, which replaces the old file `factories.ts` and contains all AST factory
classes and types.
- `kipper/core/compiler/ast/mapping`, which contains all AST mapping objects and the `ASTNodeMapper` class.
- New class:
- New classes:
- `ASTNodeMapper`, which handles the mapping between kind numbers, rule names, AST classes and parser context classes.
- `PrimaryExpression`, which is an abstract base class for all primary expressions.
- `PostfixExpression`, which is an abstract base class for all postfix expressions.
- `PromptModule` in `@kipper/cli`, which contains all prompt-related functions and classes.
- `ObjectPrimaryExpression`, which represents an AST object primary expression.
- `ObjectProperty`, which represents an AST object property.
- New interfaces:
- `PrimaryExpressionSemantics`, which represents the semantics of a primary expression.
- `PrimaryExpressionTypeSemantics`, which represents the type semantics of a primary expression.
Expand All @@ -63,6 +67,10 @@ To use development versions of Kipper download the
- `JumpStatementTypeSemantics`, which represents the type semantics of a jump statement.
- `SwitchStatementSemantics`, which represents the semantics of a switch statement.
- `SwitchStatementTypeSemantics`, which represents the type semantics of a switch statement.
- `ObjectPrimaryExpressionSemantics`, which represents the semantics of an object primary expression.
- `ObjectPrimaryExpressionTypeSemantics`, which represents the type semantics of an object primary expression.
- `ObjectPropertySemantics`, which represents the semantics of an object property.
- `ObjectPropertyTypeSemantics`, which represents the type semantics of an object property.
- New parameters:
- `ignoreParams` in `genJSFunction()`, which, if true makes the function signature define no parameters.
- `ignoreParams` in `createJSFunctionSignature()`, which, if true makes the function signature define no parameters.
Expand Down Expand Up @@ -123,6 +131,8 @@ To use development versions of Kipper download the
- Interface `ArrayLiteralPrimaryExpressionTypeSemantics` to `ArrayPrimaryExpressionTypeSemantics`.
- Interface `TangledPrimaryTypeSemantics` to `TangledPrimaryExpressionTypeSemantics`.
- Interface `DoWhileLoopStatementSemantics` to `DoWhileLoopIterationStatementSemantics`.
- Method `TargetASTNodeCodeGenerator.arrayLiteralExpression` to `arrayPrimaryExpression`.
- Method `TargetASTNodeSemanticAnalyser.listPrimaryExpression` to `arrayPrimaryExpression`.
- Moved:
- `kipper/core/utils.ts` to `kipper/core/tools` and separated it into multiple files & modules.
- `kipper/core/compiler/ast/root-ast-node.ts` to the `kipper/core/compiler/ast/nodes` module.
Expand All @@ -148,6 +158,11 @@ To use development versions of Kipper download the

### Removed

- Removed AST parent class `ConstantExpression`, its interfaces `ConstantExpressionSemantics` and
`ConstantExpressionTypeSemantics`, as they were not really needed and unnecessarily added another level of
complexity to the AST. All classes which previously inherited from `ConstantExpression` now inherit from
`PrimaryExpression` instead.

</details>

## [0.10.4] - 2023-08-15
Expand Down
8 changes: 4 additions & 4 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ authors:
identifiers:
- type: url
value: >-
https://github.com/Kipper-Lang/Kipper/releases/tag/v0.11.0-alpha.1
description: The GitHub release URL of tag 0.11.0-alpha.1
https://github.com/Kipper-Lang/Kipper/releases/tag/v0.11.0-alpha.5
description: The GitHub release URL of tag 0.11.0-alpha.5
repository-code: 'https://github.com/Kipper-Lang/Kipper/'
url: 'https://kipper-lang.org'
abstract: >-
Expand All @@ -31,6 +31,6 @@ keywords:
- oop-programming
- type-safety
license: GPL-3.0-or-later
license-url: 'https://github.com/Kipper-Lang/Kipper/blob/v0.11.0-alpha.1/LICENSE'
version: 0.11.0-alpha.1
license-url: 'https://github.com/Kipper-Lang/Kipper/blob/v0.11.0-alpha.5/LICENSE'
version: 0.11.0-alpha.5
date-released: '2023-08-15'
54 changes: 34 additions & 20 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,56 @@
# Developer's Guide

We recommend Visual Studio Code or Web-Storm for developing on Kipper.
Welcome to the Developer's Guide for Kipper! Here you can get a general overview of how to get started with
working on the Kipper programming language.

Please note that there may be changes in the workflow or work process and as such sometimes also inconsistencies in this
file. We will try to keep it as well maintained as possible, but if anything seems off don't hesitate to open up a
[discussion](https://github.com/Kipper-Lang/Kipper/discussions) or an
[issue](https://github.com/Kipper-Lang/Kipper/issues/new/choose) if it is something that's clearly wrong.

## General Setup

### Install the TypeScript Compiler and Node.js
We recommend Web-Storm for developing on Kipper, as that has based on our experience provided the best development
experience, but other options such as VSCode are also viable. Generally speaking it's

### Install Node.js

[Download page of Node.js](https://nodejs.org/en/download/)

Please be aware that Kipper only supports the following versions:

- [Download page of TypeScript](https://www.typescriptlang.org/download)
- [Download page of Node.js](https://nodejs.org/en/download/)
- `16.x`
- `18.x`
- `20.x`
- `22.x`

### Install PNPM for the monorepo management

Before working on Kipper, it's important to install pnpm, since Kipper is a monorepo with many child packages in a
single branch and repo, and therefore depends on the monorepo tools of pnpm.
Before working on Kipper, it's important to install pnpm which provides the toolset required to manage a monorepo such
as the one set up here!

For how to install pnpm please refer to the pnpm website, or if you have npm just run:

```sh
npm i -g pnpm
```

### VSCode setup

Install the following extensions:

- [eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- [prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
Please also be aware that we strictly require PNPM version `8` and anything besides that is currently not supported and
may break! PNPM sometimes introduces breaking changes with their major releases, so using a different version may brick
the setup so please watch out for that too!

## Install dependencies

Whenever dependencies in `package.json` are changed, run the following command:

```sh
pnpm install
pnpm i
```

To only install resolved dependencies in `pnpm-lock.yaml`:

```sh
pnpm install --frozen-lockfile
pnpm i --frozen-lockfile
```

## Force LF line-endings
Expand Down Expand Up @@ -129,7 +141,7 @@ which can be included and used inside a browser without any dependencies.
(Visit GitHub for the [recommended version](https://github.com/Kipper-Lang/Kipper/releases)):

```bash
MAJOR.MINOR.PATCH
MAJOR.MINOR.PATCH[-SUFFIX_IF_PRESENT]
```

Add `-alpha.N`, `-beta.N` or `-rc.N` in case it's a development version.
Expand All @@ -154,7 +166,7 @@ which can be included and used inside a browser without any dependencies.
3. Updated the static `version` identifiers in the `index.ts` files of each package:

```ts
export const version = "MAJOR.MINOR.PATCH";
export const version = "MAJOR.MINOR.PATCH[-SUFFIX_IF_PRESENT]";
```

The easiest way to do this is to run `replace` in an IDE and replace the old versions with the new version.
Expand All @@ -171,20 +183,22 @@ which can be included and used inside a browser without any dependencies.
These changes must be committed yourself with a commit message preferably similar to this:

```
release: Bumped static index.ts versions to MAJOR.MINOR.PATCH
release: Bumped Kipper project version to MAJOR.MINOR.PATCH[-SUFFIX_IF_PRESENT]
```

(Previously, before `0.11.0-alpha.2` it was `release: Bumped static index.ts versions to MAJOR.MINOR.PATCH[-SUFFIX_IF_PRESENT]`)

For example:

```
release: Bumped static index.ts versions to 0.5.0-rc.0
release: Bumped Kipper project version to 0.5.0-rc.0
```

4. Bump version with a pre-written script (This will create a tag with the prefix `v`, make a commit and push to
the remote host):

```bash
pnpm run bump MAJOR.MINOR.PATCH
pnpm run bump MAJOR.MINOR.PATCH[-SUFFIX_IF_PRESENT]
```

It is important that this script is run _AFTER_ the previous step, so that the commits associated with the tags
Expand Down Expand Up @@ -226,5 +240,5 @@ which can be included and used inside a browser without any dependencies.
Afterwards ensure the `next` tag is updated for every package using (Requires `npm` to be installed):

```bash
pnpm run add-next-tag MAJOR.MINOR.PATCH
pnpm run add-next-tag MAJOR.MINOR.PATCH[-SUFFIX_IF_PRESENT]
```
1 change: 1 addition & 0 deletions add-next-tag.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ $(npm dist-tag add @kipper/cli@$version next)
$(npm dist-tag add @kipper/core@$version next)
$(npm dist-tag add @kipper/target-js@$version next)
$(npm dist-tag add @kipper/target-ts@$version next)
$(npm dist-tag add @kipper/config@$version next)
$(npm dist-tag add @kipper/web@$version next)
ExitOnFailure

Expand Down
1 change: 1 addition & 0 deletions add-next-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ npm dist-tag add @kipper/cli@$version next
npm dist-tag add @kipper/core@$version next
npm dist-tag add @kipper/target-js@$version next
npm dist-tag add @kipper/target-ts@$version next
npm dist-tag add @kipper/config@$version next
npm dist-tag add @kipper/web@$version next
Loading

0 comments on commit 1189a0b

Please sign in to comment.