Hello,
I've been playing around with AssemblyScript and I noticed it still doesn't have RegExp object implemented: https://github.com/AssemblyScript/assemblyscript/blob/master/std/assembly/regexp.ts
I am able to compile the following code:
const regex : RegExp = new RegExp('hi');//return true; return regex.test('hi, i am peter');
But not able to execute it:
/Users/m0m02y0/as/assembly/node_modules/@assemblyscript/loader/index.js:72
throw Error("abort: " + getString(memory, mesg) + " at " + getString(memory, file) + ":" + line + ":" + colm);
^
Error: abort: unreachable at ~lib/regexp.ts:4:53
at abort (/Users/m0m02y0/as/assembly/node_modules/@assemblyscript/loader/index.js:72:11)
at ~lib/regexp/RegExp#constructor (wasm-function[15]:0xb3b)
at assembly/index/test1 (wasm-function[17]:0xb6d)
at Object.curr. [as test1] (/Users/m0m02y0/as/assembly/node_modules/@assemblyscript/loader/index.js:407:18)
at Object. (/Users/m0m02y0/as/assembly/tests/index.js:4:23)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
npm ERR! Test failed. See above for more details.
Is this in your roadmap? Is there another way to use regular expressions in AS?
Thank you
Hello,
I've been playing around with AssemblyScript and I noticed it still doesn't have RegExp object implemented: https://github.com/AssemblyScript/assemblyscript/blob/master/std/assembly/regexp.ts
I am able to compile the following code:
const regex : RegExp = new RegExp('hi');//return true; return regex.test('hi, i am peter');But not able to execute it:
Is this in your roadmap? Is there another way to use regular expressions in AS?
Thank you