Lines Matching refs:ThrowSyntaxError
189 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()
772 ThrowSyntaxError("'?' expected."); in ParseTsConditionalType()
781 ThrowSyntaxError("':' expected."); in ParseTsConditionalType()
836 ThrowSyntaxError( in ParseTsTypeOperatorOrTypeReference()
879 ThrowSyntaxError( in ParseTsTypeOperatorOrTypeReference()
919 ThrowSyntaxError("A rest element cannot follow another rest element"); in HandleRestType()
940 ThrowSyntaxError("Tuple members must all have or haven't names"); in ParseTsTupleElement()
954 ThrowSyntaxError("A required element cannot follow an optional element"); in ParseTsTupleElement()
958 ThrowSyntaxError("':' expected"); in ParseTsTupleElement()
973 ThrowSyntaxError("Tuple members must all have or haven't names"); in ParseTsTupleElement()
993 ThrowSyntaxError("A required element cannot follow an optional element"); in ParseTsTupleElement()
1020 ThrowSyntaxError("',' expected."); in ParseTsTupleType()
1042 ThrowSyntaxError("Identifier expected"); in ParseTsQualifiedReference()
1073 ThrowSyntaxError("']' expected"); in ParseTsIndexAccessType()
1101 ThrowSyntaxError("Identifier expected."); in ParseTsTypeReferenceOrQuery()
1202 ThrowSyntaxError({"'", TokenToString(tokenType), "' expected."}); in ParseMappedOption()
1232 ThrowSyntaxError("']' expected"); in ParseTsMappedType()
1248 ThrowSyntaxError("';' expected"); in ParseTsMappedType()
1256 ThrowSyntaxError("'}' expected"); in ParseTsMappedType()
1351 ThrowSyntaxError("':' expected"); in ParseTsTypeLiteralOrInterfaceKey()
1367 ThrowSyntaxError("']' expected"); in ParseTsTypeLiteralOrInterfaceKey()
1374 ThrowSyntaxError("Unexpected token"); in ParseTsTypeLiteralOrInterfaceKey()
1390 ThrowSyntaxError( in ValidateIndexSignatureParameterType()
1441 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseTsTypeLiteralOrInterfaceKeyModifiers()
1448 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseTsTypeLiteralOrInterfaceKeyModifiers()
1481 ThrowSyntaxError("';' expected"); in ParseTsTypeLiteralOrInterfaceMember()
1493 ThrowSyntaxError("'(' expected"); in ParseTsTypeLiteralOrInterfaceMember()
1502 ThrowSyntaxError("';' expected"); in ParseTsTypeLiteralOrInterfaceMember()
1508 ThrowSyntaxError("'(' expected"); in ParseTsTypeLiteralOrInterfaceMember()
1555 ThrowSyntaxError("An index signature must have a type annotation.", memberStartLoc); in ParseTsTypeLiteralOrInterfaceMember()
1564 ThrowSyntaxError( in ParseTsTypeLiteralOrInterfaceMember()
1636 ThrowSyntaxError("Duplicated identifier", key->Start()); in CheckObjectTypeForDuplicatedProperties()
1663 ThrowSyntaxError("',' expected"); in ParseTsTypeLiteralOrInterface()
1685 ThrowSyntaxError("']' expected"); in ParseTsArrayType()
1852 ThrowSyntaxError("'(' expected"); in ParseTsParenthesizedOrFunctionType()
1871 ThrowSyntaxError("')' expected"); in ParseTsParenthesizedOrFunctionType()
1895 ThrowSyntaxError("'(' expected"); in ParseTsFunctionType()
1913 ThrowSyntaxError("'=>' expected"); in ParseTsFunctionType()
1947 ThrowSyntaxError("Type expected"); in ParseTsBasicType()
2005 ThrowSyntaxError("Unexpected type"); in ParseTsBasicType()
2067 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseModifiers()
2150 ThrowSyntaxError("Unexpected modifier"); in ParseModifiers()
2155 ThrowSyntaxError("Duplicated modifier is not allowed"); in ParseModifiers()
2207 …ThrowSyntaxError("Decorators cannot be applied to multiple get/set accessors of the same name.", e… in CheckAccessorPair()
2227 … ThrowSyntaxError("A get accessor must be at least as accessible as the setter", key->Start()); in CheckAccessorPair()
2246 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseClassKeyModifiers()
2256 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseClassKeyModifiers()
2271 ThrowSyntaxError(msg); in ThrowIfPrivateIdent()
2279 ThrowSyntaxError("Async method can not be getter nor setter"); in ValidateClassKey()
2284 ThrowSyntaxError("An accessibility modifier cannot be used with a private identifier."); in ValidateClassKey()
2288 ThrowSyntaxError("'declare' modifier cannot be used with a private identifier."); in ValidateClassKey()
2292 ThrowSyntaxError("'abstract' modifier cannot be used with a private identifier."); in ValidateClassKey()
2308 ThrowSyntaxError("Constructor can not be special method"); in ValidateClassKey()
2319 ThrowSyntaxError("Static modifier can not appear on a constructor"); in ValidateClassKey()
2322 ThrowSyntaxError("Classes may not have static property named prototype"); in ValidateClassKey()
2378 ThrowSyntaxError("':' expected"); in ParseClassKey()
2390 ThrowSyntaxError("']' expected"); in ParseClassKey()
2410 ThrowSyntaxError("Unexpected token, expected ']'"); in ParseClassKey()
2415 ThrowSyntaxError("Unexpected token in class property"); in ParseClassKey()
2437 ThrowSyntaxError("Class method can not be declare nor readonly"); in ValidateClassMethodStart()
2442 ThrowSyntaxError("Expected '('"); in ValidateClassMethodStart()
2447 ThrowSyntaxError( in ValidateClassMethodStart()
2469 ThrowSyntaxError("Setter must have exactly one formal parameter"); in ValidateClassSetter()
2483 ThrowSyntaxError("Getter must not have formal parameters"); in ValidateClassGetter()
2503 … ThrowSyntaxError({"Redeclaration of class private property #", name.Utf8()}, prop->Start()); in ValidatePrivateProperty()
2518 … ThrowSyntaxError({"Redeclaration of class private property #", name.Utf8()}, methodDef->Start()); in ValidatePrivateProperty()
2543 … ThrowSyntaxError({"Redeclaration of class private property #", name.Utf8()}, methodDef->Start()); in ValidatePrivateProperty()
2563 ThrowSyntaxError("'async' modifier cannot be used in an ambient context."); in ParseClassMethod()
2567 ThrowSyntaxError("Generators are not allowed in an ambient context."); in ParseClassMethod()
2577 ThrowSyntaxError("A decorator can only decorate a method implementation, not an overload.", in ParseClassMethod()
2650 ThrowSyntaxError("Property cannot have an initializer because it is marked abstract."); in ParseClassProperty()
2656 ThrowSyntaxError("Initializers are not allowed in ambient contexts."); in ParseClassProperty()
2719 ThrowSyntaxError("Classes may not have field named 'constructor'"); in CheckFieldKey()
2765 ThrowSyntaxError("Decorators are not valid here.", decorators.front()->Start()); in ParseDecorators()
2788 ThrowSyntaxError("Abstract methods can only appear within an abstract class."); in ParseClassElement()
2791 ThrowSyntaxError("Decorators are not available for auto accessor property now."); in ParseClassElement()
2795 … ThrowSyntaxError({"This member cannot have an 'override' modifier because its containing class " in ParseClassElement()
2801 ThrowSyntaxError("Unexpected token '{'"); in ParseClassElement()
2805 ThrowSyntaxError("Decorators are not valid here.", decorators.front()->Start()); in ParseClassElement()
2816 ThrowSyntaxError("Decorators are not valid here.", decorators.front()->Start()); in ParseClassElement()
2826 ThrowSyntaxError("Decorators are not valid here.", decorators.front()->Start()); in ParseClassElement()
2831 ThrowSyntaxError("';' expected"); in ParseClassElement()
2835 ThrowSyntaxError("'(' expected"); in ParseClassElement()
2839 ThrowSyntaxError("An auto accessor property can't be declared optional."); in ParseClassElement()
2847 ThrowSyntaxError("';' expected"); in ParseClassElement()
2859 ThrowSyntaxError("Decorators are not valid here.", decorators.front()->Start()); in ParseClassElement()
2863 ThrowSyntaxError("An index signature must have a type annotation"); in ParseClassElement()
2885 ThrowSyntaxError("';' expected."); in ParseClassElement()
3070 ThrowSyntaxError("Unexpected token, expected an identifier."); in ParseClassDefinition()
3096 ThrowSyntaxError("Unexpected token, expected '{'"); in ParseClassDefinition()
3137 ThrowSyntaxError("Constructor implementation is missing.", property->Start()); in ParseClassDefinition()
3141 … ThrowSyntaxError("Multiple constructor implementations are not allowed.", property->Start()); in ParseClassDefinition()
3211 ThrowSyntaxError("Identifier expected"); in ParseTSClassImplements()
3236 ThrowSyntaxError("',' expected"); in ParseTSClassImplements()
3240 ThrowSyntaxError("Implements clause can not be empty"); in ParseTSClassImplements()
3255 ThrowSyntaxError("Constructor implementation is missing.", ctor->Start()); in ValidateClassConstructor()
3266 …ThrowSyntaxError("A constructor cannot contain a super call when its class extends null.", ctor->S… in ValidateClassConstructor()
3272 … ThrowSyntaxError("Constructors for derived classes must contain a super call.", ctor->Start()); in ValidateClassConstructor()
3354 …ThrowSyntaxError("A super call must be a root-level statement within a constructor of a derived cl… in ValidateSuperCallLocation()
3372 ThrowSyntaxError("super() must be called before this/super access.", ctor->Start()); in ValidateSuperCallLocation()
3413 ThrowSyntaxError("'{' expected"); in ParseEnumMembers()
3435 ThrowSyntaxError("Unexpected token in enum member"); in ParseEnumMembers()
3474 ThrowSyntaxError("Identifier expected"); in ParseEnumDeclaration()
3526 ThrowSyntaxError(msg); in ValidateFunctionParam()
3537 ThrowSyntaxError("A required parameter cannot follow an optional parameter"); in ValidateFunctionParam()
3545 ThrowSyntaxError("A 'this' parameter must be the first parameter"); in ValidateFunctionParam()
3549 ThrowSyntaxError("A constructor cannot have a 'this' parameter"); in ValidateFunctionParam()
3553 ThrowSyntaxError("An arrow function cannot have a 'this' parameter"); in ValidateFunctionParam()
3557 ThrowSyntaxError("'get' and 'set' accessors cannot declare 'this' parameters"); in ValidateFunctionParam()
3562 ThrowSyntaxError("'constructor' cannot be used as a parameter property name"); in ValidateFunctionParam()
3592 ThrowSyntaxError(", expected"); in ParseFunctionParams()
3639 …ThrowSyntaxError("'in' modifier can only appear on a type parameter of a class, interface or type … in ParseTsTypeParameter()
3644 ThrowSyntaxError("'in' modifier already seen."); in ParseTsTypeParameter()
3651 ThrowSyntaxError("'out' modifier already seen."); in ParseTsTypeParameter()
3656 …ThrowSyntaxError("'out' modifier can only appear on a type parameter of a class, interface or type… in ParseTsTypeParameter()
3663 ThrowSyntaxError("'in' modifier must precede 'out' modifier."); in ParseTsTypeParameter()
3667 ThrowSyntaxError("'out' modifier already seen."); in ParseTsTypeParameter()
3676 ThrowSyntaxError("Type parameter declaration expected"); in ParseTsTypeParameter()
3686 ThrowSyntaxError("Invalid type parameter name"); in ParseTsTypeParameter()
3759 ThrowSyntaxError("Required type parameters may not follow optional type parameters."); in ParseTsTypeParameterDeclaration()
3776 ThrowSyntaxError("'>' expected"); in ParseTsTypeParameterDeclaration()
3781 ThrowSyntaxError("Type parameter list cannot be empty."); in ParseTsTypeParameterDeclaration()
3835 ThrowSyntaxError("'>' expected"); in ParseTsTypeParameterInstantiation()
3870 ThrowSyntaxError("Unexpected token, expected '('"); in ParseFunction()
3912 ThrowSyntaxError("Unexpected token, expected '{'"); in ParseFunction()
3918 ThrowSyntaxError("An implementation cannot be declared in ambient contexts."); in ParseFunction()
3939 ThrowSyntaxError( in ValidateTsFunctionOverloadParams()
3958 … ThrowSyntaxError("RestParameter must be followed by an identifier in declaration contexts"); in ParseSpreadElement()
3973 ThrowSyntaxError("RestParameter does not support an initializer"); in ParseSpreadElement()
4032 …ThrowSyntaxError("A parameter property is only allowed in a constructor implementation.", paramete… in ParseFunctionParameter()
4039 ThrowSyntaxError( in ParseFunctionParameter()
4048 …ThrowSyntaxError("A parameter property cannot be declared using a rest parameter.", parameterStart… in ParseFunctionParameter()
4056 …ThrowSyntaxError("A parameter property may not be declared using a binding pattern.", parameterSta… in ParseFunctionParameter()
4075 ThrowSyntaxError("Assigning to 'arguments' in strict mode is invalid"); in ValidateLvalueAssignmentTarget()
4077 ThrowSyntaxError("Assigning to 'eval' in strict mode is invalid"); in ValidateLvalueAssignmentTarget()
4101 ThrowSyntaxError("Invalid left-hand side in assignment expression"); in ValidateLvalueAssignmentTarget()
4134 ThrowSyntaxError("'await' in formal parameter is invalid.", node->Start()); in ValidateArrowParameterBindings()
4169 ThrowSyntaxError("Unexpected ArrowParameter element"); in ValidateArrowParameterBindings()
4182 ThrowSyntaxError( in ThrowParameterModifierError()
4189 void ParserImpl::ThrowSyntaxError(std::string_view errorMessage) const in ThrowSyntaxError() function in panda::es2panda::parser::ParserImpl
4191 ThrowSyntaxError(errorMessage, lexer_->GetToken().Start()); in ThrowSyntaxError()
4194 void ParserImpl::ThrowSyntaxError(std::initializer_list<std::string_view> list) const in ThrowSyntaxError() function in panda::es2panda::parser::ParserImpl
4196 ThrowSyntaxError(list, lexer_->GetToken().Start()); in ThrowSyntaxError()
4199 void ParserImpl::ThrowSyntaxError(std::initializer_list<std::string_view> list, const lexer::Source… in ThrowSyntaxError() function in panda::es2panda::parser::ParserImpl
4209 ThrowSyntaxError(std::string_view {err}, pos); in ThrowSyntaxError()
4212 void ParserImpl::ThrowSyntaxError(std::string_view errorMessage, const lexer::SourcePosition &pos) … in ThrowSyntaxError() function in panda::es2panda::parser::ParserImpl
4249 ThrowSyntaxError("Unexpected reserved word in strict mode."); in CheckStrictReservedWord()
4253 ThrowSyntaxError("Unexpected reserved word in strict mode."); in CheckStrictReservedWord()
4259 ThrowSyntaxError("Unexpected reserved word"); in CheckStrictReservedWord()