-
Notifications
You must be signed in to change notification settings - Fork 11
character set => move logic into parser #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
export class CharacterSetMatcher extends Matcher { | ||
constructor(public set: string, public negated: bool) { | ||
constructor(public matchers: Matcher[], public negated: bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaxGraey - I've hit a funny error here, wondering if you might know the root cause?
RuntimeError: unreachable
at assembly/nfa/matcher/Matcher#matches@virtual (wasm-function[240]:1)
at assembly/nfa/matcher/CharacterSetMatcher#matches~anonymous|0 (wasm-function[241]:19)
at ~lib/array/Array<assembly/nfa/matcher/Matcher>#some (wasm-function[242]:85)
at assembly/nfa/matcher/CharacterSetMatcher#matches (wasm-function[244]:21)
at assembly/nfa/nfa/MatcherState<assembly/nfa/matcher/CharacterSetMatcher>#matches (wasm-function[245]:8)
at assembly/nfa/nfa/State#matches@virtual (wasm-function[250]:58)
at assembly/regexp/recursiveBacktrackingSearch (wasm-function[184]:121)
at assembly/regexp/recursiveBacktrackingSearch@varargs (wasm-function[185]:56)
at assembly/regexp/RegExp#exec (wasm-function[192]:307)
works just fine in TS/JS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, hard to tell. Need minimal repro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried reproduce this issue in minimal example but can't:
playground
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I think finding a minimal reproduction could be a challenge. I tried a similar approach, but couldn't reproduce.
What I have found is that adding the following block of code, executed before the RegExp is created, removes the error:
1592687#diff-f350832f4859b9724e3ef59f756d2d201226fd81fd797207367fc269581115adR171-R179
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've raised an issue here AssemblyScript/assemblyscript#1635
0afe911
to
1592687
Compare
a459777
to
8bb9a18
Compare
8bb9a18
to
bc8bc1f
Compare
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.