├── .github └── workflows │ └── deploy.yml ├── .gitignore ├── README.md ├── README_EN.md ├── doc ├── .vscode │ └── extensions.json ├── README.md ├── index.html ├── package.json ├── pnpm-lock.yaml ├── public │ ├── nighta.png │ ├── nighta.svg │ └── nighta_transparent.png ├── src │ ├── App.vue │ ├── assets │ │ └── vue.svg │ ├── components │ │ ├── monacoEditor │ │ │ ├── MonacoEditor.vue │ │ │ └── monacoEditorType.ts │ │ ├── navbar │ │ │ └── Navbar.vue │ │ ├── section │ │ │ └── Section.vue │ │ └── sideMenu │ │ │ └── SideMenu.vue │ ├── documents │ │ └── sectionList.ts │ ├── main.ts │ ├── pages │ │ ├── home │ │ │ └── Home.vue │ │ ├── main │ │ │ └── Main.vue │ │ └── playground │ │ │ └── Playground.vue │ ├── router │ │ └── router.ts │ ├── style.css │ ├── util │ │ ├── interpreter.js │ │ └── safeJsonStringify.ts │ └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── lib ├── esm │ └── index.esm.js └── umd │ └── index.umd.js ├── package.json ├── pnpm-lock.yaml ├── rollup.config.js └── src ├── Nighta.js ├── environment └── Environment.js ├── parser ├── Parser.js ├── gen.ps1 ├── grammar.bnf └── grammar.js ├── test ├── block-test.js ├── build-in-function-test.js ├── class-test.js ├── eval-test.js ├── if-test.js ├── index.js ├── lambda-function-test.js ├── math-test.js ├── switch-test.js ├── user-defined-function-test.js ├── variable-test.js └── while-test.js └── transformer └── Transformer.js /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Vue Site to GitHub Pages 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | workflow_dispatch: 7 | 8 | permissions: 9 | contents: read 10 | pages: write 11 | id-token: write 12 | 13 | concurrency: 14 | group: ${{ github.workflow }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | build-and-deploy: 19 | runs-on: ubuntu-latest 20 | concurrency: 21 | group: deploy 22 | steps: 23 | - name: Checkout Repository 24 | uses: actions/checkout@v4 25 | with: 26 | fetch-depth: 0 27 | 28 | - name: Install PNPM 29 | run: npm install -g pnpm 30 | 31 | - name: Setup Node.js 32 | uses: actions/setup-node@v4 33 | with: 34 | node-version: 20 35 | cache: 'pnpm' 36 | 37 | - name: Setup pnpm 38 | uses: pnpm/action-setup@v3 39 | with: 40 | version: 8 41 | 42 | - name: Install Dependencies in Doc Directory 43 | working-directory: ./doc 44 | run: pnpm install 45 | 46 | - name: Build Vue App 47 | working-directory: ./doc 48 | run: pnpm run build 49 | 50 | # 使用官方的actions/deploy-pages行动部署到GitHub Pages,但需注意actions/deploy-pages@v4并不存在,应使用其他适合的部署action 51 | - name: Deploy to GitHub Pages 52 | uses: peaceiris/actions-gh-pages@v3 53 | with: 54 | personal_token: ${{ secrets.TOKEN }} 55 | publish_dir: ./doc/dist -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nighta 2 | 3 | 语言: [中文](.) | [ENGLISH](./README_EN.md) 4 | 5 |
10 |
10 |