Conway's Game of life compiler test incl. html

This commit is contained in:
dcodeIO
2017-12-07 02:02:22 +01:00
parent d9ad42ed2e
commit 325ecf5165
11 changed files with 885 additions and 113 deletions

View File

@ -1745,10 +1745,8 @@ export class Compiler extends DiagnosticEmitter {
return this.module.createF32((<f32>intValue.lo) + (<f32>intValue.hi) * 0xffffffff);
if (contextualType.isLongInteger)
return this.module.createI64(intValue.lo, intValue.hi);
if (!intValue.fitsInI32) {
this.currentType = Type.i64;
return this.module.createI64(intValue.lo, intValue.hi);
}
if (contextualType.isSmallInteger)
return this.module.createI32(intValue.toI32());
this.currentType = Type.i32;
return this.module.createI32(intValue.toI32());
}

View File

@ -379,7 +379,7 @@ export class Parser extends DiagnosticEmitter {
if (tn.skip(Token.EQUALS)) {
if (isDeclare)
this.error(DiagnosticCode.Initializers_are_not_allowed_in_ambient_contexts, tn.range()); // recoverable
initializer = this.parseExpression(tn);
initializer = this.parseExpression(tn, Precedence.COMMA + 1);
if (!initializer)
return null;
}

View File

@ -1110,7 +1110,7 @@ function isOctalDigit(c: i32): bool {
function isIdentifierStart(c: i32): bool {
return c >= CharCode.A && c <= CharCode.Z
|| c >= CharCode.a && c <= CharCode.z
// || c == CharCode.DOLLAR // reserved for internal in case we have to change the naming scheme
|| c == CharCode.DOLLAR
|| c == CharCode._
|| c > 0x7f && isUnicodeIdentifierStart(c);
}
@ -1123,7 +1123,7 @@ function isIdentifierPart(c: i32): bool {
return c >= CharCode.A && c <= CharCode.Z
|| c >= CharCode.a && c <= CharCode.z
|| c >= CharCode._0 && c <= CharCode._9
// || c == CharCode.DOLLAR // reserved for internal use, see above
|| c == CharCode.DOLLAR
|| c == CharCode._
|| c > 0x7f && isUnicodeIdentifierPart(c);
}