xbintsc 0.1.3 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -9
- package/dist/src/codegen/llvm.js +422 -44
- package/dist/src/codegen/llvm.js.map +1 -1
- package/dist/src/parser/parser.js +4 -0
- package/dist/src/parser/parser.js.map +1 -1
- package/dist/tests/e2e/compile.test.js +122 -2
- package/dist/tests/e2e/compile.test.js.map +1 -1
- package/dist/tests/parser/parser.test.js +9 -1
- package/dist/tests/parser/parser.test.js.map +1 -1
- package/package.json +1 -1
- package/runtime/rt.h +32 -0
- package/runtime/xt_runtime.c +696 -6
- package/src/codegen/llvm.ts +458 -43
- package/src/parser/parser.ts +4 -0
package/src/parser/parser.ts
CHANGED
|
@@ -394,6 +394,10 @@ export class Parser {
|
|
|
394
394
|
|
|
395
395
|
private parseStatementWithModifiers(modifiers: Modifier[]): Statement {
|
|
396
396
|
switch (this.token.kind) {
|
|
397
|
+
case TokenKind.VarKeyword:
|
|
398
|
+
case TokenKind.LetKeyword:
|
|
399
|
+
case TokenKind.ConstKeyword:
|
|
400
|
+
return this.parseVariableStatement(modifiers);
|
|
397
401
|
case TokenKind.FunctionKeyword:
|
|
398
402
|
return this.parseFunctionDeclaration(modifiers);
|
|
399
403
|
case TokenKind.ClassKeyword:
|