Lines Matching defs:ParserImpl
118 ParserImpl::ParserImpl(ScriptExtension extension) : program_(extension), context_(&program_) {}
120 std::unique_ptr<lexer::Lexer> ParserImpl::InitLexer(const std::string &fileName, const std::string &source)
133 Program ParserImpl::Parse(const SourceFile &sourceFile, const CompilerOptions &options)
176 void ParserImpl::ParseScript()
181 void ParserImpl::ParseModule()
187 void ParserImpl::ParseProgram(ScriptKind kind)
214 bool ParserImpl::CheckTopStatementsForRequiredDeclare(const ArenaVector<ir::Statement *> &statements)
269 ExpressionParseFlags ParserImpl::CarryExpressionParserFlag(ExpressionParseFlags origin, ExpressionParseFlags carry)
274 ExpressionParseFlags ParserImpl::CarryPatternFlags(ExpressionParseFlags flags)
280 ExpressionParseFlags ParserImpl::CarryAllowTsParamAndPatternFlags(ExpressionParseFlags flags)
287 bool ParserImpl::CurrentLiteralIsBasicType()
312 bool ParserImpl::CurrentIsBasicType()
335 ir::TSTypeReference *ParserImpl::ParseTsConstExpression()
349 ir::Expression *ParserImpl::ParseTsIdentifierReference(TypeAnnotationParsingOptions options)
358 bool ParserImpl::IsStartOfMappedType() const
396 bool ParserImpl::IsStartOfTsTypePredicate() const
425 bool ParserImpl::IsStartOfAbstractConstructorType() const
440 ir::Expression *ParserImpl::ParseTsTypeLiteralOrTsMappedType(ir::Expression *typeAnnotation)
462 ir::Expression *ParserImpl::ParseTsTypeReferenceOrTsTypePredicate(ir::Expression *typeAnnotation,
476 ir::Expression *ParserImpl::ParseTsThisTypeOrTsTypePredicate(ir::Expression *typeAnnotation, bool canBeTsTypePredicate,
490 ir::Expression *ParserImpl::ParseTsTemplateLiteralType(bool throwError)
546 ir::Expression *ParserImpl::ParseTsTypeAnnotationElement(ir::Expression *typeAnnotation,
638 auto type = DoOutsideOfDisallowConditinalTypesContext(&ParserImpl::ParsePostfixTypeOrHigher,
653 ir::Expression *ParserImpl::ParsePostfixTypeOrHigher(ir::Expression *typeAnnotation,
688 ir::TSImportType *ParserImpl::ParseTsImportType(const lexer::SourcePosition &startLoc, bool isTypeof)
748 ir::Expression *ParserImpl::ParseTsThisType(bool throwError)
766 ir::Expression *ParserImpl::ParseTsConditionalType(ir::Expression *checkType, bool restrictExtends)
783 ir::Expression *extendsType = DoInsideOfDisallowConditinalTypesContext(&ParserImpl::ParseTsTypeAnnotation,
794 auto *trueType = DoOutsideOfDisallowConditinalTypesContext(&ParserImpl::ParseTsTypeAnnotation, &options);
802 auto *falseType = DoOutsideOfDisallowConditinalTypesContext(&ParserImpl::ParseTsTypeAnnotation, &options);
813 ir::Expression *ParserImpl::ParseTsTypeAnnotation(TypeAnnotationParsingOptions *options)
840 ir::Expression *ParserImpl::ParseTsTypeOperatorOrTypeReference(bool throwError)
917 bool ParserImpl::IsTSNamedTupleMember()
934 void ParserImpl::HandleRestType(ir::AstNodeType elementType, bool *hasRestType) const
944 ir::Expression *ParserImpl::ParseTsTupleElement(ir::TSTupleKind *kind, bool *seenOptional, bool *hasRestType)
1017 ir::TSTupleType *ParserImpl::ParseTsTupleType()
1052 ir::Expression *ParserImpl::ParseTsQualifiedReference(ir::Expression *typeName)
1077 ir::Expression *ParserImpl::ParseTsIndexAccessType(ir::Expression *typeName, bool throwError)
1104 ir::Expression *ParserImpl::ParseTsTypeReferenceOrQuery(TypeAnnotationParsingOptions options, bool parseQuery)
1180 ir::TSTypeParameter *ParserImpl::ParseTsMappedTypeParameter()
1203 ir::MappedOption ParserImpl::ParseMappedOption(lexer::TokenType tokenType)
1228 ir::TSMappedType *ParserImpl::ParseTsMappedType()
1286 ir::TSTypePredicate *ParserImpl::ParseTsTypePredicate()
1334 ir::Expression *ParserImpl::ParseTsTypeLiteralOrInterfaceKey(bool *computed, bool *signature, bool *isIndexSignature)
1400 void ParserImpl::ValidateIndexSignatureParameterType(ir::Expression *typeAnnotation)
1414 void ParserImpl::CreateTSVariableForProperty(ir::AstNode *node, const ir::Expression *key, binder::VariableFlags flags)
1446 void ParserImpl::ParseTsTypeLiteralOrInterfaceKeyModifiers(bool *isGetAccessor, bool *isSetAccessor)
1475 ir::Expression *ParserImpl::ParseTsTypeLiteralOrInterfaceMember()
1611 void ParserImpl::CheckObjectTypeForDuplicatedProperties(ir::Expression *member,
1659 ArenaVector<ir::Expression *> ParserImpl::ParseTsTypeLiteralOrInterface()
1697 ir::TSArrayType *ParserImpl::ParseTsArrayType(ir::Expression *elementType)
1716 ir::TSUnionType *ParserImpl::ParseTsUnionType(ir::Expression *type, bool restrictExtends, bool throwError)
1762 ir::TSIntersectionType *ParserImpl::ParseTsIntersectionType(ir::Expression *type, bool inUnion, bool restrictExtends,
1812 bool ParserImpl::IsTsFunctionType()
1860 ir::Expression *ParserImpl::ParseTsParenthesizedOrFunctionType(ir::Expression *typeAnnotation, bool throwError)
1918 ir::Expression *ParserImpl::ParseTsFunctionType(lexer::SourcePosition startLoc, bool isConstructionType,
1980 ir::Expression *ParserImpl::ParseTsBasicType(TypeAnnotationParsingOptions options)
2096 ir::ModifierFlags ParserImpl::ParseModifiers()
2213 void ParserImpl::CheckAccessorPair(const ArenaVector<ir::Statement *> &properties, const ir::Expression *propName,
2274 void ParserImpl::ParseClassKeyModifiers(ClassElmentDescriptor *desc)
2311 void ParserImpl::ThrowIfPrivateIdent(ClassElmentDescriptor *desc, const char *msg)
2318 void ParserImpl::ValidateClassKey(ClassElmentDescriptor *desc, bool isDeclare)
2369 ir::Expression *ParserImpl::ParseClassKey(ClassElmentDescriptor *desc, bool isDeclare)
2467 void ParserImpl::ValidateClassMethodStart(ClassElmentDescriptor *desc, ir::Expression *typeAnnotation)
2507 void ParserImpl::ValidateClassSetter(ClassElmentDescriptor *desc, const ArenaVector<ir::Statement *> &properties,
2521 void ParserImpl::ValidateClassGetter(ClassElmentDescriptor *desc, const ArenaVector<ir::Statement *> &properties,
2536 void ParserImpl::ValidatePrivateProperty(ir::Statement *stmt, std::unordered_set<util::StringView> &usedPrivateNames,
2592 ir::MethodDefinition *ParserImpl::ParseClassMethod(ClassElmentDescriptor *desc,
2659 ir::ClassStaticBlock *ParserImpl::ParseStaticBlock(ClassElmentDescriptor *desc)
2672 ir::Statement *ParserImpl::ParseClassProperty(ClassElmentDescriptor *desc,
2731 void ParserImpl::CheckClassGeneratorMethod(ClassElmentDescriptor *desc)
2741 void ParserImpl::CheckClassPrivateIdentifier(ClassElmentDescriptor *desc)
2758 void ParserImpl::CheckFieldKey(ir::Expression *propName)
2772 ir::Expression *ParserImpl::ParseClassKeyAnnotation()
2784 ir::Statement *ParserImpl::ParseDecoratorAndAnnotation()
2820 std::pair<ArenaVector<ir::Decorator *>, ArenaVector<ir::Annotation *>> ParserImpl::ParseDecoratorsAndAnnotations()
2854 ir::Statement *ParserImpl::ParseClassElement(const ArenaVector<ir::Statement *> &properties,
2992 ir::Identifier *ParserImpl::GetKeyByFuncFlag(ir::ScriptFunctionFlags funcFlag)
3015 ir::MethodDefinition *ParserImpl::CreateImplicitMethod(ir::Expression *superClass, bool hasSuperClass,
3069 bool ParserImpl::IsPropertyKeysAreSame(const ir::Expression *exp1, const ir::Expression *exp2)
3106 bool ParserImpl::IsMemberExpressionsAreSame(const ir::MemberExpression *mExp1, const ir::MemberExpression *mExp2)
3119 bool ParserImpl::IsMethodDefinitionsAreSame(const ir::MethodDefinition *property, ir::MethodDefinition *overload)
3132 ir::Identifier *ParserImpl::SetIdentNodeInClassDefinition(bool isDeclare, binder::ConstDecl **decl)
3150 ir::ClassDefinition *ParserImpl::ParseClassDefinition(bool isDeclaration, bool idRequired, bool isDeclare,
3275 ir::Expression *ParserImpl::ParseSuperClass(bool isDeclare, bool *hasSuperClass, bool *isExtendsFromNull)
3295 ArenaVector<ir::TSClassImplements *> ParserImpl::ParseTSClassImplements(bool isDeclare)
3343 void ParserImpl::ValidateClassConstructor(const ir::MethodDefinition *ctor,
3374 void ParserImpl::FindSuperCall(const ir::AstNode *parent, bool *hasSuperCall)
3381 void ParserImpl::FindSuperCallInCtorChildNode(const ir::AstNode *childNode, bool *hasSuperCall)
3407 bool ParserImpl::SuperCallShouldBeRootLevel(const ir::MethodDefinition *ctor,
3431 void ParserImpl::ValidateSuperCallLocation(const ir::MethodDefinition *ctor, bool superCallShouldBeRootLevel)
3473 void ParserImpl::FindThisOrSuperReference(const ir::AstNode *parent, bool *hasThisOrSuperReference)
3480 void ParserImpl::FindThisOrSuperReferenceInChildNode(const ir::AstNode *childNode, bool *hasThisOrSuperReference)
3506 ir::Expression *ParserImpl::ParseEnumComputedPropertyKey(binder::EnumDecl *&decl,
3545 ir::TSEnumDeclaration *ParserImpl::ParseEnumMembers(ir::Identifier *key, const lexer::SourcePosition &enumStart,
3604 ir::TSEnumDeclaration *ParserImpl::ParseEnumDeclaration(bool isExport, bool isDeclare, bool isConst)
3653 void ParserImpl::ValidateFunctionParam(const ArenaVector<ir::Expression *> ¶ms, const ir::Expression *parameter,
3705 ArenaVector<ir::Expression *> ParserImpl::ParseFunctionParams(bool isDeclare,
3753 bool ParserImpl::CheckTypeNameIsReserved(const util::StringView ¶mName)
3760 bool ParserImpl::CheckOutIsIdentInTypeParameter()
3775 void ParserImpl::ParseTypeModifier(bool &isTypeIn, bool &isTypeOut, bool &isAllowInOut)
3812 ir::TSTypeParameter *ParserImpl::ParseTsTypeParameter(bool throwError, bool addBinding, bool isAllowInOut)
3869 ir::Expression *ParserImpl::TryParseConstraintOfInferType(TypeAnnotationParsingOptions *options)
3875 constraint = DoInsideOfDisallowConditinalTypesContext(&ParserImpl::ParseTsTypeAnnotation, options);
3885 ir::TSTypeParameterDeclaration *ParserImpl::ParseTsTypeParameterDeclaration(bool throwError, bool isAllowInOut)
3944 ir::TSTypeParameterInstantiation *ParserImpl::ParseTsTypeParameterInstantiation(bool throwError)
4002 ir::ScriptFunction *ParserImpl::ParseFunction(ParserStatus newStatus,
4084 void ParserImpl::ValidateTsFunctionOverloadParams(const ArenaVector<ir::Expression *> ¶ms)
4096 ir::SpreadElement *ParserImpl::ParseSpreadElement(ExpressionParseFlags flags)
4138 ir::TSParameterProperty *ParserImpl::CreateTsParameterProperty(ir::Expression *parameter, ir::ModifierFlags modifiers)
4169 ir::Expression *ParserImpl::ParseFunctionParameter(bool isDeclare)
4215 void ParserImpl::ValidateLvalueAssignmentTarget(ir::Expression *node) const
4252 void ParserImpl::ValidateAssignmentTarget(ExpressionParseFlags flags, ir::Expression *node)
4273 void ParserImpl::ValidateArrowParameterBindings(const ir::Expression *node)
4320 bool ParserImpl::CurrentTokenIsModifier(char32_t nextCp) const
4326 void ParserImpl::ThrowParameterModifierError(ir::ModifierFlags status) const
4335 void ParserImpl::ThrowSyntaxError(std::string_view errorMessage) const
4340 void ParserImpl::ThrowSyntaxError(std::initializer_list<std::string_view> list) const
4345 void ParserImpl::ThrowSyntaxError(std::initializer_list<std::string_view> list, const lexer::SourcePosition &pos) const
4358 void ParserImpl::ThrowSyntaxError(std::string_view errorMessage, const lexer::SourcePosition &pos) const
4366 ScriptExtension ParserImpl::Extension() const
4371 parser::SourceTextModuleRecord *ParserImpl::GetSourceTextModuleRecord()
4376 parser::SourceTextModuleRecord *ParserImpl::GetSourceTextTypeModuleRecord()
4381 void ParserImpl::AddPatchFixHelper(util::PatchFix *patchFixHelper)
4386 bool ParserImpl::IsDtsFile() const
4391 void ParserImpl::CheckStrictReservedWord() const
4410 ir::Expression* ParserImpl::DoOutsideOfDisallowConditinalTypesContext(Function func, Args &&... args)
4426 ir::Expression* ParserImpl::DoInsideOfDisallowConditinalTypesContext(Function func, Args &&... args)
4441 bool ParserImpl::InDisallowConditionalTypesContext()
4446 bool ParserImpl::InContext(ParserStatus status)
4451 void ParserImpl::AddFlagToStatus(ParserStatus status)
4456 void ParserImpl::RemoveFlagToStatus(ParserStatus status)
4461 void ParserImpl::RecursiveDepthException()