Added error stub for regexp-dispatch
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import * as RE from '@efforting.tech/text/regexp';
|
||||
import { Tokenization_Error } from '@efforting.tech/errors';
|
||||
|
||||
|
||||
// NOTE: There are some open questions about this implementation and API which may change as the library matures.
|
||||
// Check out the example at experiments/regexp-tokenizer.mjs for more information on how to use this in its current state.
|
||||
@@ -104,7 +106,7 @@ export class RegExp_Tokenizer {
|
||||
_handle_default_match(value, index, end_index=null) {
|
||||
const { default_action } = this;
|
||||
if (!default_action) {
|
||||
throw new Parsing_Error({ parser: this, value, index, end_index });
|
||||
throw new Tokenization_Error({ parser: this, value, index, end_index });
|
||||
}
|
||||
return new Default_Match(value, index, end_index, default_action);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user