make an attempt at fixing string escaping

This commit is contained in:
Scott Richmond 2025-07-02 19:44:12 -04:00
parent 0cd682de21
commit 28d6dc24f0
3 changed files with 6 additions and 5 deletions

View File

@ -425,7 +425,7 @@ function __wbg_get_imports() {
_assertBoolean(ret);
return ret;
};
imports.wbg.__wbindgen_closure_wrapper7779 = function() { return logError(function (arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper7777 = function() { return logError(function (arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 347, __wbg_adapter_22);
return ret;
}, arguments) };

Binary file not shown.

View File

@ -68,10 +68,11 @@ pub fn lexer(
let keyword = just(':').ignore_then(word).map(Token::Keyword);
let string = just('"')
.ignore_then(none_of("\"").repeated().to_slice())
.then_ignore(just('"'))
.map(Token::String);
let string = none_of("\\\"")
.repeated()
.to_slice()
.map(Token::String)
.delimited_by(just('"'), just('"'));
// todo: hard code these as type constructors
let punctuation = one_of(",=[]{}()>;\n_")