Naive parseFloat

This commit is contained in:
dcodeIO
2018-01-29 07:42:40 +01:00
parent d3f22637ed
commit 9e3b6f202d
7 changed files with 799 additions and 106 deletions

View File

@ -13,7 +13,8 @@ import {
import {
Node,
Expression,
BinaryExpression
BinaryExpression,
SourceKind
} from "./ast";
import {
@ -1539,6 +1540,8 @@ export function compileCall(compiler: Compiler, prototype: FunctionPrototype, ty
compiler.error(DiagnosticCode.Operation_not_supported, reportNode.range);
return module.createUnreachable();
}
if (reportNode.range.source.sourceKind != SourceKind.STDLIB)
compiler.warning(DiagnosticCode.Operation_is_unsafe, reportNode.range);
return arg0; // any usize to any usize
case "assert": // assert<T?>(isTrueish: T, message?: string) -> T with T != null (see also assembly.d.ts)