【文件属性】:
文件名称:Schwa:用NodeJS编写的针对玩具语言的工具链,具有类似于C的语法,可编译为WebAssembly
文件大小:181KB
文件格式:ZIP
更新时间:2021-05-08 16:48:47
TypeScript
施瓦
用Node编写的针对玩具语言的工具链,具有类似于C的语法,可编译为WebAssembly。
安装
npm install schwa --save
用法
模块
// TypeScript and JavaScript ES6+
import { Compiler } from "schwa"
let compiler = new Compiler ( )
compiler . compile ( inputLineArray , wasmModuleName )
// JavaScript ES5 and older
var Compiler = require ( 'schwa' ) . Compiler
var compiler = new Compiler ( )
compiler . compile ( inputLineArray , wasmModuleName )
命
【文件预览】:
Schwa-master
----main.ts(3KB)
----schwa()
--------wasm.ts(14KB)
--------log.ts(1KB)
--------token.ts(1KB)
--------lexer.ts(6KB)
--------utils.ts(2KB)
--------formatter.ts(12KB)
--------index.ts(633B)
--------analyzer.ts(40KB)
--------io.ts(3KB)
--------generator.ts(36KB)
--------leb.d.ts(980B)
--------datatype.ts(1KB)
--------compiler.ts(6KB)
--------scope.ts(6KB)
--------parser.ts(15KB)
--------validator.ts(12KB)
--------ast.ts(2KB)
----.gitattributes(378B)
----index.ts(252B)
----.npmignore(27B)
----tsconfig.json(183B)
----README.md(3KB)
----TODO(3KB)
----docs()
--------Schwa.ai(177KB)
--------Schwa.png(7KB)
----.gitignore(966B)
----package-lock.json(1KB)
----out()
--------test.schwa(1KB)
--------imports.schwa(296B)
--------math.schwa(173B)
--------test.html(580B)
----package.json(507B)