Skip to content

Commit

Permalink
Merge pull request #29 from kin-lang/re-write-ts
Browse files Browse the repository at this point in the history
Re-wrote Kin by using TypeScript (Instead Of C)
  • Loading branch information
pacifiquem authored Jan 29, 2024
2 parents 8513654 + f254ba3 commit 3456e33
Show file tree
Hide file tree
Showing 29 changed files with 4,153 additions and 747 deletions.
22 changes: 22 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"tsconfigRootDir": ".",
"sourceType": "module"
},
"plugins": ["@typescript-eslint/eslint-plugin", "vitest"],
"extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended", "plugin:vitest/recommended"],
"root": true,
"env": {
"node": true,
"jest": true
},
"ignorePatterns": [".eslintrc"],
"rules": {
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "error"
}
}
25 changes: 25 additions & 0 deletions .github/test-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test Pull Request

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test
108 changes: 36 additions & 72 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,78 +1,42 @@
# Build Artifacts
*.S
*.o
*.exe
*.ll
# CCache
.cache
# CMake
**/bld
**/bld-*
**/build
**/win
**/win-*
**/winbld
**/winbuild
**/mswin*
**/lnx
**/lin
**/lin-*
**/linbld
**/linbuild
**/lnx
**/lnxbld
**/lnxbuild
**/linux
**/linuxbld
**/linuxbuild
**/dbg
**/debug
**/rls
**/release
/out
/.idea
/tst/out.txt
*.dot

# Language Server
**/compile_commands.json
.Random.seed
.clang-format

# Disallow files starting with some symbols
**/_*

# Testing
Testing/

.vscode


# CMake build artifacts
/build/
/CMakeFiles/
/CMakeScripts/
/CMakeCache.txt
/CMakeSettings.json

# Visual Studio Code specific files (if using VSCode)
# Node.js
node_modules/

# Compiled files
dist/
build/
*.js
*.d.ts
*.js.map

# Dependency directories
lib/
typings/

# Logs
*.log
logs/
log-debug/
log-error/

# Editor-specific files
.vscode/
.idea/
*.sublime-project
*.sublime-workspace

# CMake-generated files
compile_commands.json
# OS generated files
.DS_Store
Thumbs.db

# Generated Makefiles or project files (if using Make or other build systems)
*.make
*.cbp
*.workspace
*.project
*.sln
# Environment variables
.env

# Ignore CMake user-specific files (optional)
CMakeUserPresets.json
CMakeUserPresets.json.backup
# Visual Studio Code settings
.vscode/settings.json

# Jest coverage output
coverage/

/bin
*.cmake
*.out
# npm
*.npm-debug.log
npm-debug.log
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
npm run format
npm run lint
npm run test
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
dist/
node_modules/
coverage/
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2
}
20 changes: 0 additions & 20 deletions Makefile

This file was deleted.

3 changes: 1 addition & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ If you believe you've found a security vulnerability in our programming language
### How to Report a Vulnerability

Please report security vulnerabilities to us via email at: [email protected]

Please report security vulnerabilities to us via email at: <[email protected]>

When reporting security issues, kindly provide the following information:

Expand Down
2 changes: 1 addition & 1 deletion grammar.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<logical_operator> ::= "&&" | "||" | "==" | "!=" | "<" | "<=" | ">" | ">=" | "!"

<loop> ::= "niba" "(" <loop-conditions> ")" "subiramo" "{" <statement>* "}"
<loop> ::= "subiramo" "{" <statement>* "}" niba "(" <loop-conditions> ")"

<loop-conditions> ::= <condition>

Expand Down
Loading

0 comments on commit 3456e33

Please sign in to comment.