Naming fixes
This commit is contained in:
parent
9b68519aff
commit
4e23553824
@ -72,7 +72,7 @@ namespace BooleanMethods {
|
||||
bool bang(bool v) { return !v; }
|
||||
}
|
||||
|
||||
namespace String {
|
||||
namespace String_ {
|
||||
/**
|
||||
* Make a string from the given ASCII character code.
|
||||
*/
|
||||
@ -129,7 +129,7 @@ namespace NumberImpl {
|
||||
int mod(int x, int y) { return x % y; }
|
||||
}
|
||||
|
||||
namespace Math {
|
||||
namespace Math_ {
|
||||
/**
|
||||
* Returns the value of a base expression taken to a specified power.
|
||||
* @param x The base value of the expression.
|
||||
@ -226,22 +226,6 @@ namespace kindscript {
|
||||
void *ptrOfLiteral(int offset);
|
||||
}
|
||||
|
||||
namespace RecordImpl {
|
||||
//%
|
||||
RefRecord* mk(int reflen, int totallen)
|
||||
{
|
||||
check(0 <= reflen && reflen <= totallen, ERR_SIZE, 1);
|
||||
check(reflen <= totallen && totallen <= 255, ERR_SIZE, 2);
|
||||
|
||||
void *ptr = ::operator new(sizeof(RefRecord) + totallen * sizeof(uint32_t));
|
||||
RefRecord *r = new (ptr) RefRecord();
|
||||
r->len = totallen;
|
||||
r->reflen = reflen;
|
||||
memset(r->fields, 0, r->len * sizeof(uint32_t));
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
namespace ksrt {
|
||||
//%
|
||||
uint32_t ldloc(RefLocal *r) {
|
||||
|
2
libs/microbit/core.d.ts
vendored
2
libs/microbit/core.d.ts
vendored
@ -86,7 +86,7 @@ interface String {
|
||||
* Converts A string to an integer.
|
||||
* @param s A string to convert into a number.
|
||||
*/
|
||||
//% shim=String::toNumber
|
||||
//% shim=String_::toNumber
|
||||
declare function parseInt(s: string): number;
|
||||
|
||||
interface Object {}
|
||||
|
8
libs/microbit/shims.d.ts
vendored
8
libs/microbit/shims.d.ts
vendored
@ -48,7 +48,7 @@ declare namespace String {
|
||||
/**
|
||||
* Make a string from the given ASCII character code.
|
||||
*/
|
||||
//% shim=String::fromCharCode
|
||||
//% shim=String_::fromCharCode
|
||||
function fromCharCode(code: number): string;
|
||||
}
|
||||
|
||||
@ -67,20 +67,20 @@ declare namespace Math {
|
||||
* @param x The base value of the expression.
|
||||
* @param y The exponent value of the expression.
|
||||
*/
|
||||
//% shim=Math::pow
|
||||
//% shim=Math_::pow
|
||||
function pow(x: number, y: number): number;
|
||||
|
||||
/**
|
||||
* Returns a pseudorandom number between 0 and `max`.
|
||||
*/
|
||||
//% shim=Math::random
|
||||
//% shim=Math_::random
|
||||
function random(max: number): number;
|
||||
|
||||
/**
|
||||
* Returns the square root of a number.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
//% shim=Math::sqrt
|
||||
//% shim=Math_::sqrt
|
||||
function sqrt(x: number): number;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user