├── .babelrc ├── .gitattributes ├── .gitignore ├── .npmignore ├── .travis.yml ├── LICENSE ├── README.md ├── dist └── .gitkeep ├── example ├── features.hevia ├── fibonacci.hevia ├── main.c ├── main.hevia ├── main.js ├── pseudo.hevia ├── pseudo_expect.js ├── stdlib.hevia └── test.hevia ├── package.json ├── src ├── boot │ ├── cfg.hevia │ ├── index.hevia │ └── lexer │ │ ├── functions.hevia │ │ ├── index.hevia │ │ └── token.hevia ├── cfg.js ├── cli.js ├── index.js ├── optimization │ ├── index.js │ ├── inline.js │ ├── rename.js │ ├── shake.js │ └── visit.js ├── semantic │ ├── index.js │ ├── resolve.js │ ├── scope.js │ └── visit.js ├── syntax │ ├── dist │ │ └── hevia.js │ ├── index.js │ ├── src │ │ ├── Parser │ │ │ ├── access.js │ │ │ ├── branch │ │ │ │ ├── if.js │ │ │ │ ├── index.js │ │ │ │ ├── pseudo.js │ │ │ │ └── switch.js │ │ │ ├── comment.js │ │ │ ├── declare │ │ │ │ ├── class.js │ │ │ │ ├── enum.js │ │ │ │ ├── extension.js │ │ │ │ ├── function.js │ │ │ │ ├── import.js │ │ │ │ ├── index.js │ │ │ │ ├── operator.js │ │ │ │ └── variable.js │ │ │ ├── expression │ │ │ │ ├── args.js │ │ │ │ ├── array.js │ │ │ │ ├── atom.js │ │ │ │ ├── binary.js │ │ │ │ ├── index.js │ │ │ │ ├── literal.js │ │ │ │ └── unary.js │ │ │ ├── index.js │ │ │ ├── loop.js │ │ │ ├── parse.js │ │ │ ├── statement.js │ │ │ └── type.js │ │ ├── Tokenizer │ │ │ ├── char.js │ │ │ ├── index.js │ │ │ └── scanner.js │ │ ├── build.js │ │ ├── const.js │ │ ├── index.js │ │ ├── labels.js │ │ ├── nodes.js │ │ ├── precedence.js │ │ └── utils.js │ └── tests │ │ ├── control │ │ ├── if.json │ │ ├── if.swift │ │ ├── loop.json │ │ ├── loop.swift │ │ ├── pseudo.json │ │ └── pseudo.swift │ │ ├── declaration │ │ ├── classes │ │ │ ├── 0.json │ │ │ ├── 0.swift │ │ │ ├── 1.json │ │ │ └── 1.swift │ │ ├── extension │ │ │ ├── 0.json │ │ │ ├── 0.swift │ │ │ ├── 1.json │ │ │ └── 1.swift │ │ ├── functions │ │ │ ├── 0.json │ │ │ ├── 0.swift │ │ │ ├── 1.json │ │ │ ├── 1.swift │ │ │ ├── 2.json │ │ │ ├── 2.swift │ │ │ ├── 3.json │ │ │ ├── 3.swift │ │ │ ├── 4.json │ │ │ ├── 4.swift │ │ │ ├── 5.json │ │ │ └── 5.swift │ │ ├── imports │ │ │ ├── 0.json │ │ │ ├── 0.swift │ │ │ ├── 1.json │ │ │ ├── 1.swift │ │ │ ├── 2.json │ │ │ └── 2.swift │ │ ├── operators │ │ │ ├── 0.json │ │ │ ├── 0.swift │ │ │ ├── 1.json │ │ │ ├── 1.swift │ │ │ ├── 2.json │ │ │ ├── 2.swift │ │ │ ├── 3.json │ │ │ ├── 3.swift │ │ │ ├── 4.json │ │ │ └── 4.swift │ │ └── variables │ │ │ ├── 0.json │ │ │ ├── 0.swift │ │ │ ├── 1.json │ │ │ ├── 1.swift │ │ │ ├── 11.json │ │ │ ├── 11.swift │ │ │ ├── 14.json │ │ │ ├── 14.swift │ │ │ ├── 15.json │ │ │ ├── 15.swift │ │ │ ├── 3.json │ │ │ ├── 3.swift │ │ │ ├── 7.json │ │ │ ├── 7.swift │ │ │ ├── 8.json │ │ │ ├── 8.swift │ │ │ ├── 9.json │ │ │ └── 9.swift │ │ ├── expression │ │ ├── array │ │ │ ├── 0.json │ │ │ └── 0.swift │ │ ├── call │ │ │ ├── 0.json │ │ │ └── 0.swift │ │ ├── cast │ │ │ ├── 0.json │ │ │ └── 0.swift │ │ ├── complex │ │ │ ├── 0.json │ │ │ ├── 0.swift │ │ │ ├── 1.json │ │ │ ├── 1.swift │ │ │ ├── 2.json │ │ │ ├── 2.swift │ │ │ ├── 3.json │ │ │ └── 3.swift │ │ ├── conditional │ │ │ ├── 0.json │ │ │ └── 0.swift │ │ ├── equality │ │ │ ├── 0.json │ │ │ └── 0.swift │ │ ├── logical │ │ │ ├── 0.json │ │ │ └── 0.swift │ │ ├── parenthese │ │ │ ├── 0.json │ │ │ └── 0.swift │ │ ├── prompt │ │ │ ├── 0.json │ │ │ ├── 0.swift │ │ │ ├── 1.json │ │ │ └── 1.swift │ │ ├── tuple │ │ │ ├── 0.json │ │ │ ├── 0.swift │ │ │ ├── 1.json │ │ │ ├── 1.swift │ │ │ ├── 2.json │ │ │ └── 2.swift │ │ └── unary │ │ │ ├── 0.json │ │ │ └── 0.swift │ │ ├── index.js │ │ └── unreached │ │ └── enums.swift ├── synthesis │ ├── c.js │ ├── index.js │ └── js.js ├── token.js ├── utils.js └── walk.js ├── stdlib.hevia └── tests └── function ├── arguments ├── actual.swift └── expected.js ├── empty-arguments ├── actual.swift └── expected.js ├── empty-block ├── actual.swift └── expected.js └── inout ├── actual.swift └── expected.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "stage-0"] 3 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/.gitattributes -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | tests 3 | .editorconfig 4 | .gitattributes -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/.travis.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/README.md -------------------------------------------------------------------------------- /dist/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/features.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/example/features.hevia -------------------------------------------------------------------------------- /example/fibonacci.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/example/fibonacci.hevia -------------------------------------------------------------------------------- /example/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/example/main.c -------------------------------------------------------------------------------- /example/main.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/example/main.hevia -------------------------------------------------------------------------------- /example/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/example/main.js -------------------------------------------------------------------------------- /example/pseudo.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/example/pseudo.hevia -------------------------------------------------------------------------------- /example/pseudo_expect.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/example/pseudo_expect.js -------------------------------------------------------------------------------- /example/stdlib.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/example/stdlib.hevia -------------------------------------------------------------------------------- /example/test.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/example/test.hevia -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/package.json -------------------------------------------------------------------------------- /src/boot/cfg.hevia: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/boot/index.hevia: -------------------------------------------------------------------------------- 1 | // vim: syntax=swift 2 | import "lexer" -------------------------------------------------------------------------------- /src/boot/lexer/functions.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/boot/lexer/functions.hevia -------------------------------------------------------------------------------- /src/boot/lexer/index.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/boot/lexer/index.hevia -------------------------------------------------------------------------------- /src/boot/lexer/token.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/boot/lexer/token.hevia -------------------------------------------------------------------------------- /src/cfg.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/cfg.js -------------------------------------------------------------------------------- /src/cli.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/cli.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/index.js -------------------------------------------------------------------------------- /src/optimization/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/optimization/index.js -------------------------------------------------------------------------------- /src/optimization/inline.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/optimization/rename.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/optimization/shake.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/optimization/visit.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/optimization/visit.js -------------------------------------------------------------------------------- /src/semantic/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/semantic/index.js -------------------------------------------------------------------------------- /src/semantic/resolve.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/semantic/resolve.js -------------------------------------------------------------------------------- /src/semantic/scope.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/semantic/scope.js -------------------------------------------------------------------------------- /src/semantic/visit.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/semantic/visit.js -------------------------------------------------------------------------------- /src/syntax/dist/hevia.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/dist/hevia.js -------------------------------------------------------------------------------- /src/syntax/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/index.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/access.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/access.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/branch/if.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/branch/if.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/branch/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/branch/index.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/branch/pseudo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/branch/pseudo.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/branch/switch.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/branch/switch.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/comment.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/comment.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/declare/class.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/declare/class.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/declare/enum.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/declare/enum.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/declare/extension.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/declare/extension.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/declare/function.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/declare/function.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/declare/import.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/declare/import.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/declare/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/declare/index.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/declare/operator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/declare/operator.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/declare/variable.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/declare/variable.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/expression/args.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/expression/args.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/expression/array.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/expression/array.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/expression/atom.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/expression/atom.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/expression/binary.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/expression/binary.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/expression/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/expression/index.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/expression/literal.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/expression/literal.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/expression/unary.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/expression/unary.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/index.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/loop.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/loop.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/parse.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/parse.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/statement.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/statement.js -------------------------------------------------------------------------------- /src/syntax/src/Parser/type.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Parser/type.js -------------------------------------------------------------------------------- /src/syntax/src/Tokenizer/char.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Tokenizer/char.js -------------------------------------------------------------------------------- /src/syntax/src/Tokenizer/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Tokenizer/index.js -------------------------------------------------------------------------------- /src/syntax/src/Tokenizer/scanner.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/Tokenizer/scanner.js -------------------------------------------------------------------------------- /src/syntax/src/build.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/build.js -------------------------------------------------------------------------------- /src/syntax/src/const.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/const.js -------------------------------------------------------------------------------- /src/syntax/src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/index.js -------------------------------------------------------------------------------- /src/syntax/src/labels.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/labels.js -------------------------------------------------------------------------------- /src/syntax/src/nodes.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/nodes.js -------------------------------------------------------------------------------- /src/syntax/src/precedence.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/precedence.js -------------------------------------------------------------------------------- /src/syntax/src/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/src/utils.js -------------------------------------------------------------------------------- /src/syntax/tests/control/if.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/control/if.json -------------------------------------------------------------------------------- /src/syntax/tests/control/if.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/control/if.swift -------------------------------------------------------------------------------- /src/syntax/tests/control/loop.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/control/loop.json -------------------------------------------------------------------------------- /src/syntax/tests/control/loop.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/control/loop.swift -------------------------------------------------------------------------------- /src/syntax/tests/control/pseudo.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/control/pseudo.json -------------------------------------------------------------------------------- /src/syntax/tests/control/pseudo.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/control/pseudo.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/classes/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/classes/0.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/classes/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/classes/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/classes/1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/classes/1.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/classes/1.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/classes/1.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/extension/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/extension/0.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/extension/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/extension/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/extension/1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/extension/1.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/extension/1.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/extension/1.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/0.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/1.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/1.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/1.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/2.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/2.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/2.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/3.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/3.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/3.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/4.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/4.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/4.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/4.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/5.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/5.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/functions/5.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/functions/5.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/imports/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/imports/0.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/imports/0.swift: -------------------------------------------------------------------------------- 1 | import Foundation -------------------------------------------------------------------------------- /src/syntax/tests/declaration/imports/1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/imports/1.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/imports/1.swift: -------------------------------------------------------------------------------- 1 | import Verhicle, Car -------------------------------------------------------------------------------- /src/syntax/tests/declaration/imports/2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/imports/2.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/imports/2.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/imports/2.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/0.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/1.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/1.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/1.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/2.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/2.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/2.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/3.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/3.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/3.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/4.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/4.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/operators/4.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/operators/4.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/0.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/1.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/1.swift: -------------------------------------------------------------------------------- 1 | var a:Int = 0; 2 | 3 | expect(a == 0); -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/11.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/11.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/11.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/11.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/14.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/14.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/14.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/14.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/15.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/15.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/15.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/15.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/3.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/3.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/3.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/7.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/7.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/7.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/7.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/8.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/8.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/8.swift -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/9.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/declaration/variables/9.json -------------------------------------------------------------------------------- /src/syntax/tests/declaration/variables/9.swift: -------------------------------------------------------------------------------- 1 | // test if operators dont require whitespace 2 | var a=2*4; 3 | 4 | expect(a==8); -------------------------------------------------------------------------------- /src/syntax/tests/expression/array/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/array/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/array/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/array/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/call/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/call/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/call/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/call/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/cast/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/cast/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/cast/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/cast/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/complex/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/complex/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/complex/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/complex/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/complex/1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/complex/1.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/complex/1.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/complex/1.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/complex/2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/complex/2.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/complex/2.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/complex/2.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/complex/3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/complex/3.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/complex/3.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/complex/3.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/conditional/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/conditional/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/conditional/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/conditional/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/equality/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/equality/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/equality/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/equality/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/logical/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/logical/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/logical/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/logical/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/parenthese/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/parenthese/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/parenthese/0.swift: -------------------------------------------------------------------------------- 1 | var a:Int = 1+4/5*4+51+(4*(945+94/748)+44+2)+56; 2 | 3 | expect(a == 3934); -------------------------------------------------------------------------------- /src/syntax/tests/expression/prompt/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/prompt/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/prompt/0.swift: -------------------------------------------------------------------------------- 1 | 1 != 2 && 1 > 2; -------------------------------------------------------------------------------- /src/syntax/tests/expression/prompt/1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/prompt/1.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/prompt/1.swift: -------------------------------------------------------------------------------- 1 | 10 < 20 -------------------------------------------------------------------------------- /src/syntax/tests/expression/tuple/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/tuple/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/tuple/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/tuple/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/tuple/1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/tuple/1.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/tuple/1.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/tuple/1.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/tuple/2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/tuple/2.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/tuple/2.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/tuple/2.swift -------------------------------------------------------------------------------- /src/syntax/tests/expression/unary/0.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/unary/0.json -------------------------------------------------------------------------------- /src/syntax/tests/expression/unary/0.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/expression/unary/0.swift -------------------------------------------------------------------------------- /src/syntax/tests/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/syntax/tests/index.js -------------------------------------------------------------------------------- /src/syntax/tests/unreached/enums.swift: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/synthesis/c.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/synthesis/c.js -------------------------------------------------------------------------------- /src/synthesis/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/synthesis/index.js -------------------------------------------------------------------------------- /src/synthesis/js.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/synthesis/js.js -------------------------------------------------------------------------------- /src/token.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/token.js -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/utils.js -------------------------------------------------------------------------------- /src/walk.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/src/walk.js -------------------------------------------------------------------------------- /stdlib.hevia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/stdlib.hevia -------------------------------------------------------------------------------- /tests/function/arguments/actual.swift: -------------------------------------------------------------------------------- 1 | func main(a:Int)->Int { 2 | return (2 * a); 3 | } -------------------------------------------------------------------------------- /tests/function/arguments/expected.js: -------------------------------------------------------------------------------- 1 | var main = function(a) { 2 | return (2 * a); 3 | } -------------------------------------------------------------------------------- /tests/function/empty-arguments/actual.swift: -------------------------------------------------------------------------------- 1 | func main() { 2 | return (2 * 2); 3 | } -------------------------------------------------------------------------------- /tests/function/empty-arguments/expected.js: -------------------------------------------------------------------------------- 1 | var main = function() { 2 | return (2 * 2); 3 | } -------------------------------------------------------------------------------- /tests/function/empty-block/actual.swift: -------------------------------------------------------------------------------- 1 | func main() {} -------------------------------------------------------------------------------- /tests/function/empty-block/expected.js: -------------------------------------------------------------------------------- 1 | var main = function() {} -------------------------------------------------------------------------------- /tests/function/inout/actual.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/tests/function/inout/actual.swift -------------------------------------------------------------------------------- /tests/function/inout/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maierfelix/hevia-compiler/HEAD/tests/function/inout/expected.js --------------------------------------------------------------------------------