Home
last modified time | relevance | path

Searched refs:ThrowSyntaxError (Results 1 – 17 of 17) sorted by relevance

/arkcompiler/ets_frontend/ets2panda/parser/
DASparser.cpp108 ThrowSyntaxError("Decorators are not valid here", decorators.front()->Start()); in AddDecorators()
121 ThrowSyntaxError("Identifier expected"); in ParseTypeAliasDeclaration()
137 ThrowSyntaxError("'=' expected"); in ParseTypeAliasDeclaration()
168 ThrowSyntaxError("A rest parameter cannot be optional"); in ParseOptionalFunctionParameter()
183 ThrowSyntaxError("':' expected"); in ParseOptionalFunctionParameter()
191 ThrowSyntaxError("A rest parameter cannot have an initializer"); in ParseOptionalFunctionParameter()
195 ThrowSyntaxError("Parameter cannot have question mark and initializer"); in ParseOptionalFunctionParameter()
204 ThrowSyntaxError("Invalid rest element."); in ValidateArrowParameter()
211 ThrowSyntaxError("A rest parameter cannot be optional.", expr->Start()); in ValidateArrowParameter()
221ThrowSyntaxError("A required parameter cannot follow an optional parameter.", expr->Start()); in ValidateArrowParameter()
[all …]
DstatementParser.cpp158 ThrowSyntaxError("'With' is deprecated and not supported any more."); in ParseStatement()
182 ThrowSyntaxError("Lexical declaration is not allowed in single statement context"); in ParseLetStatement()
193 ThrowSyntaxError("Lexical declaration is not allowed in single statement context"); in ParseConstStatement()
251 ThrowSyntaxError("Illegal start of expression", Lexer()->GetToken().Start()); in ParseStructStatement()
260 ThrowSyntaxError("Lexical declaration is not allowed in single statement context"); in ParseClassStatement()
276 ThrowSyntaxError("struct declaration is not allowed to use 'abstract' modifiers."); in ParseStructDeclaration()
282 ThrowSyntaxError("struct declaration cannot extends form other class"); in ParseStructDeclaration()
310 ThrowSyntaxError( in CheckFunctionDeclaration()
319 ThrowSyntaxError("Lexical declaration is not allowed in single statement context"); in CheckFunctionDeclaration()
323 ThrowSyntaxError("Generators can only be declared at the top level or inside a block"); in CheckFunctionDeclaration()
[all …]
DparserImpl.cpp163 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseModifiers()
196 ThrowSyntaxError("Unexpected modifier"); in ParseModifiers()
201 ThrowSyntaxError("Duplicated modifier is not allowed"); in ParseModifiers()
256ThrowSyntaxError("A get accessor must be at least as accessible as the setter", key->Start()); in CheckAccessorPair()
280 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseClassAccessor()
294 ThrowSyntaxError(msg); in ThrowIfPrivateIdent()
304 ThrowSyntaxError("Invalid accessor"); in ValidateClassKey()
311 ThrowSyntaxError("Classes may not have a field named 'constructor'"); in ValidateClassKey()
320 ThrowSyntaxError("Constructor can not be special method"); in ValidateClassKey()
334 ThrowSyntaxError("Classes may not have static property named prototype"); in ValidateClassKey()
[all …]
DTSparser.cpp135 ThrowSyntaxError("Identifier expected"); in ParseDecorator()
146 ThrowSyntaxError("Identifier expected"); in ParseDecorator()
174 ThrowSyntaxError("Decorators are not valid here", decorators.front()->Start()); in AddDecorators()
187 ThrowSyntaxError("Identifier expected"); in ParseTypeAliasDeclaration()
194 ThrowSyntaxError(errMsg.c_str()); in ParseTypeAliasDeclaration()
210 ThrowSyntaxError("'=' expected"); in ParseTypeAliasDeclaration()
267 ThrowSyntaxError("A rest parameter cannot be optional"); in ParseOptionalFunctionParameter()
278ThrowSyntaxError("A binding pattern parameter cannot be optional in an implementation signature."); in ParseOptionalFunctionParameter()
313 ThrowSyntaxError("A rest parameter cannot have an initializer"); in ParseOptionalFunctionParameter()
317 ThrowSyntaxError("Parameter cannot have question mark and initializer"); in ParseOptionalFunctionParameter()
[all …]
DexpressionParser.cpp86 ThrowSyntaxError("Unexpected identifier"); in ParseYieldExpression()
188 ThrowSyntaxError("Rest element must be last element", startLoc); in ParseArrayExpression()
202 ThrowSyntaxError("Unexpected token, expected ',' or ']'"); in ParseArrayExpression()
219ThrowSyntaxError("Invalid left-hand side in array destructuring pattern", arrayExpressionNode->Sta… in ParseArrayExpression()
223 ThrowSyntaxError(info.msg.Utf8(), info.pos); in ParseArrayExpression()
236 ThrowSyntaxError("Invalid rest element."); in ValidateArrowParameter()
253 ThrowSyntaxError("Invalid destructuring assignment target"); in ValidateArrowParameter()
263 ThrowSyntaxError("Invalid destructuring assignment target"); in ValidateArrowParameter()
272 ThrowSyntaxError("yield is not allowed in arrow function parameters"); in ValidateArrowParameter()
276 ThrowSyntaxError("await is not allowed in arrow function parameters"); in ValidateArrowParameter()
[all …]
DTypedParser.cpp136 ThrowSyntaxError( in ParsePotentialExpressionStatement()
249 ThrowSyntaxError("Only ambient modules can use quoted names"); in ParseAmbientExternalModuleDeclaration()
265 ThrowSyntaxError("';' expected"); in ParseAmbientExternalModuleDeclaration()
277 ThrowSyntaxError("Identifier expected"); in ParseModuleOrNamespaceDeclaration()
305 ThrowSyntaxError("'{' expected."); in ParseTsModuleBlock()
313 ThrowSyntaxError("Expected a '}'"); in ParseTsModuleBlock()
328 ThrowSyntaxError("A 'declare' modifier cannot be used in an already ambient context."); in CheckDeclare()
351 ThrowSyntaxError("Unexpected token."); in CheckDeclare()
373 ThrowSyntaxError("Type expected"); in ParseFunctionReturnType()
418 ThrowSyntaxError("',' expected"); in ParseInterfaceExtendsClause()
[all …]
DETSparser.cpp303 ThrowSyntaxError({"Cannot open folder: ", resolvedPath}); in CollectDefaultSources()
428ThrowSyntaxError({"Can't find prefix for '", path, "' in ", ArkTSConfig()->ConfigPath()}); in ResolveImportPath()
450 ThrowSyntaxError("Incorrect path: " + resolvedPath); in GetSourceRegularPath()
468 ThrowSyntaxError({"Cannot open folder: ", resolvedPath}); in CollectUserSourcesFromIndex()
568 ThrowSyntaxError({"Failed to open file: ", resolvedPath.c_str()}); in ParseSources()
665 ThrowSyntaxError("Only one default export is allowed in a module", startPos); in MarkNodeAsExported()
694ThrowSyntaxError("Cannot find name '" + std::string {exportName.Utf8()} + "' to export.", startLoc… in ParseTopLevelStatements()
864ThrowSyntaxError({isAsync ? "'async'" : "'native'", " flags must be used for functions at top-leve… in ParseTokenOfNative()
1059 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseClassModifiers()
1081 ThrowSyntaxError("Duplicated modifier is not allowed"); in ParseClassModifiers()
[all …]
DparserImpl.h275 [[noreturn]] void ThrowSyntaxError(std::string_view errorMessage) const;
276 [[noreturn]] void ThrowSyntaxError(std::initializer_list<std::string_view> list) const;
277 [[noreturn]] void ThrowSyntaxError(std::initializer_list<std::string_view> list,
280 …[[noreturn]] void ThrowSyntaxError(std::string_view errorMessage, const lexer::SourcePosition &pos…
522 ThrowSyntaxError("Identifier expected");
/arkcompiler/ets_frontend/es2panda/parser/
DstatementParser.cpp125 ThrowSyntaxError("A 'declare' modifier cannot be used in an already ambient context."); in CheckDeclare()
214 ThrowSyntaxError("'declare' modifier already seen."); in ParseStatement()
354 ThrowSyntaxError("Only ambient modules can use quoted names"); in ParseTsAmbientExternalModuleDeclaration()
373 ThrowSyntaxError("';' expected"); in ParseTsAmbientExternalModuleDeclaration()
387 ThrowSyntaxError("Identifier expected"); in ParseTsModuleOrNamespaceDelaration()
466 ThrowSyntaxError("Unexpected token"); in ParseTsImportEqualsDeclaration()
474 ThrowSyntaxError("'=' expected"); in ParseTsImportEqualsDeclaration()
479 ThrowSyntaxError("identifier expected"); in ParseTsImportEqualsDeclaration()
508 ThrowSyntaxError("namespace export declaration is only supported in TypeScript '.d.ts'"); in ParseTsNamespaceExportDeclaration()
513 ThrowSyntaxError("'namespace' expected"); in ParseTsNamespaceExportDeclaration()
[all …]
DexpressionParser.cpp92 ThrowSyntaxError("Unexpected identifier"); in ParseYieldExpression()
257 ThrowSyntaxError("Rest element must be last element", startLoc); in ParseArrayExpression()
271 ThrowSyntaxError("Unexpected token, expected ',' or ']'"); in ParseArrayExpression()
293ThrowSyntaxError("Invalid left-hand side in array destructuring pattern", arrayExpressionNode->Sta… in ParseArrayExpression()
297 ThrowSyntaxError(info.msg.Utf8(), info.pos); in ParseArrayExpression()
310 ThrowSyntaxError("Invalid rest element."); in ValidateArrowParameter()
323 ThrowSyntaxError("Binding 'arguments' in strict mode is invalid"); in ValidateArrowParameter()
325 ThrowSyntaxError("Binding 'eval' in strict mode is invalid"); in ValidateArrowParameter()
335 ThrowSyntaxError("Invalid destructuring assignment target"); in ValidateArrowParameter()
345 ThrowSyntaxError("Invalid destructuring assignment target"); in ValidateArrowParameter()
[all …]
DparserImpl.cpp189 ThrowSyntaxError( in ParseProgram()
245 ThrowSyntaxError("Statements are not allowed in ambient contexts."); in CheckTopStatementsForRequiredDeclare()
516 ThrowSyntaxError("Unexpected token, expected '}'."); in ParseTsTemplateLiteralType()
631 ThrowSyntaxError("Type expected"); in ParseTsTypeAnnotationElement()
679 ThrowSyntaxError("'(' expected"); in ParseTsImportType()
688 ThrowSyntaxError("String literal expected"); in ParseTsImportType()
692 ThrowSyntaxError("')' expected"); in ParseTsImportType()
702 ThrowSyntaxError("Identifier expected"); in ParseTsImportType()
737 ThrowSyntaxError( in ParseTsThisType()
754 ThrowSyntaxError("'?' expected."); in ParseTsConditionalType()
[all …]
DparserImpl.h210 [[noreturn]] void ThrowSyntaxError(std::string_view errorMessage) const; in DEFINE_BITOPS()
211 [[noreturn]] void ThrowSyntaxError(std::initializer_list<std::string_view> list) const; in DEFINE_BITOPS()
212 [[noreturn]] void ThrowSyntaxError(std::initializer_list<std::string_view> list, in DEFINE_BITOPS()
215 …[[noreturn]] void ThrowSyntaxError(std::string_view errorMessage, const lexer::SourcePosition &pos… in DEFINE_BITOPS()
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/scopesInit/
DscopesInitPhase.cpp321 void ScopesInitPhase::ThrowSyntaxError(std::string_view errorMessage, const lexer::SourcePosition &… in ThrowSyntaxError() function in panda::es2panda::compiler::ScopesInitPhase
422 ThrowSyntaxError("Invalid exported binding", Program()->Ast()->End()); in AnalyzeExports()
474 ThrowSyntaxError("Interface redeclaration is not allowed", interfDecl->Start()); in VisitTSInterfaceDeclaration()
783 ThrowSyntaxError("Main overload is not enabled", methodName->Start()); in DeclareClassMethod()
1014 ThrowSyntaxError("Missing initializer in const declaration", pos); in VisitClassProperty()
1030 ThrowSyntaxError("Only one default export is allowed in a module", decl->Start()); in ParseGlobalClass()
DscopesInitPhase.h88 void ThrowSyntaxError(std::string_view errorMessage, const lexer::SourcePosition &pos) const;
/arkcompiler/ets_runtime/ecmascript/interpreter/
Dslow_runtime_stub.h206 static JSTaggedValue ThrowSyntaxError(JSThread *thread, const char *message);
Dslow_runtime_stub.cpp949 JSTaggedValue SlowRuntimeStub::ThrowSyntaxError(JSThread *thread, const char *message) in ThrowSyntaxError() function in panda::ecmascript::SlowRuntimeStub
951 INTERPRETER_TRACE(thread, ThrowSyntaxError); in ThrowSyntaxError()
/arkcompiler/ets_runtime/ecmascript/
Druntime_call_id.h203 V(ThrowSyntaxError) \