• Home
  • Raw
  • Download

Lines Matching refs:ThrowSyntaxError

178         ThrowSyntaxError(  in ParseProgram()
234 ThrowSyntaxError("Statements are not allowed in ambient contexts."); in CheckTopStatementsForRequiredDeclare()
505 ThrowSyntaxError("Unexpected token, expected '}'."); in ParseTsTemplateLiteralType()
636 ThrowSyntaxError("Type expected"); in ParseTsTypeAnnotationElement()
649 ThrowSyntaxError("'(' expected"); in ParseTsImportType()
658 ThrowSyntaxError("String literal expected"); in ParseTsImportType()
662 ThrowSyntaxError("')' expected"); in ParseTsImportType()
672 ThrowSyntaxError("Identifier expected"); in ParseTsImportType()
707 ThrowSyntaxError( in ParseTsThisType()
724 ThrowSyntaxError("'?' expected."); in ParseTsConditionalType()
741 ThrowSyntaxError("'?' expected."); in ParseTsConditionalType()
750 ThrowSyntaxError("':' expected."); in ParseTsConditionalType()
803 ThrowSyntaxError( in ParseTsTypeOperatorOrTypeReference()
846 ThrowSyntaxError( in ParseTsTypeOperatorOrTypeReference()
886 ThrowSyntaxError("A rest element cannot follow another rest element"); in HandleRestType()
905 ThrowSyntaxError("Tuple members must all have or haven't names"); in ParseTsTupleElement()
919 ThrowSyntaxError("A required element cannot follow an optional element"); in ParseTsTupleElement()
923 ThrowSyntaxError("':' expected"); in ParseTsTupleElement()
938 ThrowSyntaxError("Tuple members must all have or haven't names"); in ParseTsTupleElement()
958 ThrowSyntaxError("A required element cannot follow an optional element"); in ParseTsTupleElement()
985 ThrowSyntaxError("',' expected."); in ParseTsTupleType()
1007 ThrowSyntaxError("Identifier expected"); in ParseTsQualifiedReference()
1038 ThrowSyntaxError("']' expected"); in ParseTsIndexAccessType()
1065 ThrowSyntaxError("Identifier expected."); in ParseTsTypeReferenceOrQuery()
1089 ThrowSyntaxError("Unexpected token."); in ParseTsTypeReferenceOrQuery()
1163 ThrowSyntaxError({"'", TokenToString(tokenType), "' expected."}); in ParseMappedOption()
1193 ThrowSyntaxError("']' expected"); in ParseTsMappedType()
1209 ThrowSyntaxError("';' expected"); in ParseTsMappedType()
1217 ThrowSyntaxError("'}' expected"); in ParseTsMappedType()
1312 ThrowSyntaxError("':' expected"); in ParseTsTypeLiteralOrInterfaceKey()
1321 ThrowSyntaxError( in ParseTsTypeLiteralOrInterfaceKey()
1332 ThrowSyntaxError("']' expected"); in ParseTsTypeLiteralOrInterfaceKey()
1339 ThrowSyntaxError("Unexpected token"); in ParseTsTypeLiteralOrInterfaceKey()
1400 ThrowSyntaxError("';' expected"); in ParseTsTypeLiteralOrInterfaceMember()
1412 ThrowSyntaxError("'(' expected"); in ParseTsTypeLiteralOrInterfaceMember()
1421 ThrowSyntaxError("';' expected"); in ParseTsTypeLiteralOrInterfaceMember()
1427 ThrowSyntaxError("'(' expected"); in ParseTsTypeLiteralOrInterfaceMember()
1474 ThrowSyntaxError("An index signature must have a type annotation.", memberStartLoc); in ParseTsTypeLiteralOrInterfaceMember()
1483 ThrowSyntaxError( in ParseTsTypeLiteralOrInterfaceMember()
1555 ThrowSyntaxError("Duplicated identifier", key->Start()); in CheckObjectTypeForDuplicatedProperties()
1582 ThrowSyntaxError("',' expected"); in ParseTsTypeLiteralOrInterface()
1604 ThrowSyntaxError("']' expected"); in ParseTsArrayType()
1771 ThrowSyntaxError("'(' expected"); in ParseTsParenthesizedOrFunctionType()
1790 ThrowSyntaxError("')' expected"); in ParseTsParenthesizedOrFunctionType()
1814 ThrowSyntaxError("'(' expected"); in ParseTsFunctionType()
1832 ThrowSyntaxError("'=>' expected"); in ParseTsFunctionType()
1866 ThrowSyntaxError("Type expected"); in ParseTsBasicType()
1924 ThrowSyntaxError("Unexpected type"); in ParseTsBasicType()
1986 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseModifiers()
2055 ThrowSyntaxError("Unexpected modifier"); in ParseModifiers()
2060 ThrowSyntaxError("Duplicated modifier is not allowed"); in ParseModifiers()
2112ThrowSyntaxError("Decorators cannot be applied to multiple get/set accessors of the same name.", e… in CheckAccessorPair()
2132ThrowSyntaxError("A get accessor must be at least as accessible as the setter", key->Start()); in CheckAccessorPair()
2149 ThrowSyntaxError("Private identifier can not be getter"); in ParseClassKeyModifiers()
2153 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseClassKeyModifiers()
2162 ThrowSyntaxError("Private identifier can not be setter"); in ParseClassKeyModifiers()
2166 ThrowSyntaxError("Keyword must not contain escaped characters"); in ParseClassKeyModifiers()
2180 ThrowSyntaxError(msg); in ThrowIfPrivateIdent()
2188 ThrowSyntaxError("Async method can not be getter nor setter"); in ValidateClassKey()
2199 ThrowSyntaxError("Constructor can not be special method"); in ValidateClassKey()
2210 ThrowSyntaxError("Static modifier can not appear on a constructor"); in ValidateClassKey()
2213 ThrowSyntaxError("Classes may not have static property named prototype"); in ValidateClassKey()
2266 ThrowSyntaxError("':' expected"); in ParseClassKey()
2274 ThrowSyntaxError( in ParseClassKey()
2282 ThrowSyntaxError("']' expected"); in ParseClassKey()
2302 ThrowSyntaxError("Unexpected token, expected ']'"); in ParseClassKey()
2307 ThrowSyntaxError("Unexpected token in class property"); in ParseClassKey()
2327 ThrowSyntaxError("A method cannot be named with a private identifier"); in ValidateClassMethodStart()
2334 ThrowSyntaxError("Class method can not be declare nor readonly"); in ValidateClassMethodStart()
2339 ThrowSyntaxError("Expected '('"); in ValidateClassMethodStart()
2344 ThrowSyntaxError( in ValidateClassMethodStart()
2366 ThrowSyntaxError("Setter must have exactly one formal parameter"); in ValidateClassSetter()
2380 ThrowSyntaxError("Getter must not have formal parameters"); in ValidateClassGetter()
2404 ThrowSyntaxError("'async' modifier cannot be used in an ambient context."); in ParseClassMethod()
2408 ThrowSyntaxError("Generators are not allowed in an ambient context."); in ParseClassMethod()
2418 ThrowSyntaxError("A decorator can only decorate a method implementation, not an overload.", in ParseClassMethod()
2462 ThrowSyntaxError("Initializers are not allowed in ambient contexts."); in ParseClassProperty()
2476 ThrowSyntaxError("Private js fields are not supported"); in ParseClassProperty()
2512 ThrowSyntaxError("JS private class fields are not supported."); in CheckClassPrivateIdentifier()
2520 ThrowSyntaxError("Unexpected modifier on private identifier"); in CheckClassPrivateIdentifier()
2569 ThrowSyntaxError("Decorators are not valid here.", decorators.front()->Start()); in ParseDecorators()
2592 ThrowSyntaxError("Abstract methods can only appear within an abstract class."); in ParseClassElement()
2606 ThrowSyntaxError("Decorators are not valid here.", decorators.front()->Start()); in ParseClassElement()
2611 ThrowSyntaxError("';' expected"); in ParseClassElement()
2615 ThrowSyntaxError("'(' expected"); in ParseClassElement()
2623 ThrowSyntaxError("';' expected"); in ParseClassElement()
2635 ThrowSyntaxError("Decorators are not valid here.", decorators.front()->Start()); in ParseClassElement()
2639 ThrowSyntaxError("An index signature must have a type annotation"); in ParseClassElement()
2660 ThrowSyntaxError("';' expected."); in ParseClassElement()
2798 ThrowSyntaxError("Unexpected reserved word"); in SetIdentNodeInClassDefinition()
2829 ThrowSyntaxError("Unexpected token, expected an identifier."); in ParseClassDefinition()
2865 ThrowSyntaxError("Identifier expected"); in ParseClassDefinition()
2898 ThrowSyntaxError("',' expected"); in ParseClassDefinition()
2903 ThrowSyntaxError("Implements clause can not be empty"); in ParseClassDefinition()
2908 ThrowSyntaxError("Unexpected token, expected '{'"); in ParseClassDefinition()
2938 ThrowSyntaxError("Constructor implementation is missing.", property->Start()); in ParseClassDefinition()
2942ThrowSyntaxError("Multiple constructor implementations are not allowed.", property->Start()); in ParseClassDefinition()
2985 ThrowSyntaxError("Constructor implementation is missing.", ctor->Start()); in ValidateClassConstructor()
2996ThrowSyntaxError("A constructor cannot contain a super call when its class extends null.", ctor->S… in ValidateClassConstructor()
3017ThrowSyntaxError("A super call must be the first statement in the constructor when a class contain… in ValidateClassConstructor()
3023ThrowSyntaxError("Constructors for derived classes must contain a super call.", ctor->Start()); in ValidateClassConstructor()
3079 ThrowSyntaxError("'{' expected"); in ParseEnumMembers()
3101 ThrowSyntaxError("Unexpected token in enum member"); in ParseEnumMembers()
3139 ThrowSyntaxError("Identifier expected"); in ParseEnumDeclaration()
3191 ThrowSyntaxError(msg); in ValidateFunctionParam()
3202 ThrowSyntaxError("A required parameter cannot follow an optional parameter"); in ValidateFunctionParam()
3210 ThrowSyntaxError("A 'this' parameter must be the first parameter"); in ValidateFunctionParam()
3214 ThrowSyntaxError("A constructor cannot have a 'this' parameter"); in ValidateFunctionParam()
3218 ThrowSyntaxError("An arrow function cannot have a 'this' parameter"); in ValidateFunctionParam()
3222 ThrowSyntaxError("'get' and 'set' accessors cannot declare 'this' parameters"); in ValidateFunctionParam()
3227 ThrowSyntaxError("'constructor' cannot be used as a parameter property name"); in ValidateFunctionParam()
3257 ThrowSyntaxError(", expected"); in ParseFunctionParams()
3289 ThrowSyntaxError("Type parameter declaration expected"); in ParseTsTypeParameter()
3299 ThrowSyntaxError("Invalid type parameter name"); in ParseTsTypeParameter()
3360 ThrowSyntaxError("Required type parameters may not follow optional type parameters."); in ParseTsTypeParameterDeclaration()
3377 ThrowSyntaxError("'>' expected"); in ParseTsTypeParameterDeclaration()
3382 ThrowSyntaxError("Type parameter list cannot be empty."); in ParseTsTypeParameterDeclaration()
3436 ThrowSyntaxError("'>' expected"); in ParseTsTypeParameterInstantiation()
3471 ThrowSyntaxError("Unexpected token, expected '('"); in ParseFunction()
3513 ThrowSyntaxError("Unexpected token, expected '{'"); in ParseFunction()
3519 ThrowSyntaxError("An implementation cannot be declared in ambient contexts."); in ParseFunction()
3540 ThrowSyntaxError( in ValidateTsFunctionOverloadParams()
3559ThrowSyntaxError("RestParameter must be followed by an identifier in declaration contexts"); in ParseSpreadElement()
3574 ThrowSyntaxError("RestParameter does not support an initializer"); in ParseSpreadElement()
3628ThrowSyntaxError("A parameter property is only allowed in a constructor implementation.", paramete… in ParseFunctionParameter()
3635 ThrowSyntaxError( in ParseFunctionParameter()
3644ThrowSyntaxError("A parameter property cannot be declared using a rest parameter.", parameterStart… in ParseFunctionParameter()
3652ThrowSyntaxError("A parameter property may not be declared using a binding pattern.", parameterSta… in ParseFunctionParameter()
3671 ThrowSyntaxError("Assigning to 'arguments' in strict mode is invalid"); in ValidateLvalueAssignmentTarget()
3673 ThrowSyntaxError("Assigning to 'eval' in strict mode is invalid"); in ValidateLvalueAssignmentTarget()
3689 ThrowSyntaxError("Invalid left-hand side in assignment expression"); in ValidateLvalueAssignmentTarget()
3722 ThrowSyntaxError("'await' in formal parameter is invalid.", node->Start()); in ValidateArrowParameterBindings()
3757 ThrowSyntaxError("Unexpected ArrowParameter element"); in ValidateArrowParameterBindings()
3770 ThrowSyntaxError( in ThrowParameterModifierError()
3777 void ParserImpl::ThrowSyntaxError(std::string_view errorMessage) const in ThrowSyntaxError() function in panda::es2panda::parser::ParserImpl
3779 ThrowSyntaxError(errorMessage, lexer_->GetToken().Start()); in ThrowSyntaxError()
3782 void ParserImpl::ThrowSyntaxError(std::initializer_list<std::string_view> list) const in ThrowSyntaxError() function in panda::es2panda::parser::ParserImpl
3784 ThrowSyntaxError(list, lexer_->GetToken().Start()); in ThrowSyntaxError()
3787 void ParserImpl::ThrowSyntaxError(std::initializer_list<std::string_view> list, const lexer::Source… in ThrowSyntaxError() function in panda::es2panda::parser::ParserImpl
3797 ThrowSyntaxError(std::string_view {err}, pos); in ThrowSyntaxError()
3800 void ParserImpl::ThrowSyntaxError(std::string_view errorMessage, const lexer::SourcePosition &pos) … in ThrowSyntaxError() function in panda::es2panda::parser::ParserImpl
3837 ThrowSyntaxError("Unexpected reserved word in strict mode."); in CheckStrictReservedWord()
3841 ThrowSyntaxError("Unexpected reserved word in strict mode."); in CheckStrictReservedWord()