diff --git a/ets2panda/test/ast/parser/ets/lexer003.ets b/ets2panda/test/ast/parser/ets/lexer003.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e9900937bba4668ec5615a8ec6df2a61ba96918 --- /dev/null +++ b/ets2panda/test/ast/parser/ets/lexer003.ets @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* @@? 24:1 Error SyntaxError: Unexpected token, expected '`'. */ +/* @@? 24:4 Error TypeError: Unresolved reference message */ +/* @@? 24:15 Error SyntaxError: Unterminated string. */ +/* @@? 24:19 Error SyntaxError: Unterminated string. */ +/* @@? 24:19 Error SyntaxError: Unexpected token, expected '${' or '`' */ +/* @@? 24:19 Error SyntaxError: Unexpected token, expected '`'. */ +/* @@? 24:19 Error SyntaxError: Expected '}', got 'end of stream'. */ + +`${message ?? 'ver \ No newline at end of file diff --git a/ets2panda/util/ustring.h b/ets2panda/util/ustring.h index b9106cc62b8ab5f26d9590eaea6d3be788d3f6a9..c6becf16614575173d071e2f53c4c52ea5dd77c8 100644 --- a/ets2panda/util/ustring.h +++ b/ets2panda/util/ustring.h @@ -202,7 +202,6 @@ public: inline void Reset(size_t offset) { - ES2PANDA_ASSERT(sv_.begin() + offset <= sv_.end()); iter_ = sv_.begin() + offset; }