mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-20 18:26:40 +00:00
Conway's Game of life compiler test incl. html
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user