Home
last modified time | relevance | path

Searched full:astnode (Results 1 – 25 of 806) sorted by relevance

12345678910>>...33

/arkcompiler/ets_frontend/ets2panda/lsp/include/
Dget_adjusted_location.h22 #include "ir/astNode.h"
30 std::optional<ir::AstNode *> GetAdjustedLocation(ir::AstNode *node, bool forRename, ArenaAllocator …
31 std::optional<ir::AstNode *> GetAdjustedLocationForClass(ir::AstNode *node, ArenaAllocator *allocat…
32 std::optional<ir::AstNode *> GetAdjustedLocationForFunction(ir::AstNode *node, ArenaAllocator *allo…
33 std::optional<ir::AstNode *> GetAdjustedLocationForDeclaration(ir::AstNode *node, bool forRename,
34 … const ArenaVector<ir::AstNode *> &children,
36 std::optional<ir::AstNode *> GetAdjustedLocationForImportDeclaration(ir::AstNode *node, bool forRen…
37 … const ArenaVector<ir::AstNode *> &children);
38 std::optional<ir::AstNode *> GetAdjustedLocationForExportDeclaration(ir::AstNode *node, bool forRen…
39 … const ArenaVector<ir::AstNode *> &children);
[all …]
Dquick_info.h19 #include "ir/astNode.h"
26 bool IsIncludedToken(const ir::AstNode *node);
27 ir::AstNode *GetTokenForQuickInfo(es2panda_Context *context, size_t position);
28 bool IsObjectLiteralElement(ir::AstNode *node);
29 ir::AstNode *GetContainingObjectLiteralNode(ir::AstNode *node);
30 ir::AstNode *GetContextualTypeNode(ir::AstNode *node);
31 ir::AstNode *GetPropertyNodeFromContextualType(ir::AstNode *node, ir::AstNode *contextualTypeNode);
32 ir::AstNode *GetNodeAtLocationForQuickInfo(ir::AstNode *node);
33 std::vector<SymbolDisplayPart> CreateDisplayForClass(ir::AstNode *node);
34 std::vector<SymbolDisplayPart> CreateDisplayForInterface(ir::AstNode *node);
[all …]
Dsuggestion_diagnostics.h19 #include "ir/astNode.h"
28 std::vector<FileDiagnostic> GetSuggestionDiagnosticsImpl(ir::AstNode *astNode);
29 void Check(ir::AstNode *node, std::vector<FileDiagnostic> &diag, std::unordered_map<std::string, bo…
30 void AddConvertToAsyncFunctionDiagnostics(ir::AstNode *node, std::vector<FileDiagnostic> &diag,
32 bool IsConvertibleFunction(ir::AstNode *node, std::unordered_map<std::string, bool> &visitedFunc);
33 bool HasReturnStatementWithPromiseHandler(ir::AstNode *node, std::unordered_map<std::string, bool> …
34 bool IsReturnStatementWithFixablePromiseHandler(ir::AstNode *node, std::unordered_map<std::string, …
35 bool IsFixablePromiseHandler(ir::AstNode *node, std::unordered_map<std::string, bool> &visitedFunc);
36 bool IsPromiseHandler(ir::AstNode *node);
37 bool HasSupportedNumberOfArguments(ir::AstNode *node);
[all …]
Drename.h26 #include "ir/astNode.h"
110 std::optional<RenameInfoType> GetRenameInfoForNode(ir::AstNode *node, checker::ETSChecker *checker,
112 std::optional<checker::VerifiedType> GetContextualTypeFromParentOrAncestorTypeNode(ir::AstNode *nod…
114 std::string GetTextOfNode(ir::AstNode *node, parser::Program *program);
117 std::string kindModifiers, ir::AstNode *node);
120 ir::AstNode *TryGetImportFromModuleSpecifier(ir::AstNode *node);
123 bool NodeIsMissing(ir::AstNode *node);
125 TextSpan CreateTriggerSpanForNode(ir::AstNode *node);
126 std::string GetSourceTextOfNodeFromSourceFile(util::StringView sourceCode, ir::AstNode *node);
130 std::optional<RenameInfoSuccess> GetRenameInfoForModule(ir::AstNode *node, parser::Program *program…
[all …]
Dsignature_help.h26 #include "ir/astNode.h"
49 const ir::AstNode *symbol_;
52 TypeInfo(CandidateOrTypeKind kind, const ir::AstNode *symbol) : kind_(kind), symbol_(symbol) {} in TypeInfo()
58 void SetSymbol(const ir::AstNode *newSymbol) in SetSymbol()
66 const ir::AstNode *GetSymbol() const in GetSymbol()
242 ir::AstNode *node_;
248 …ContextualSignatureLocationInfoWithNode(ir::AstNode *node, const size_t argumentIndex, const size_… in ContextualSignatureLocationInfoWithNode()
254 void SetNode(ir::AstNode *newNode) in SetNode()
270 ir::AstNode *GetNode() const in GetNode()
288 bool IsSyntacticOwner(const ir::AstNode *node);
[all …]
Dinternal_api.h22 #include "ir/astNode.h"
105 ir::AstNode *GetTouchingToken(es2panda_Context *context, size_t pos, bool flagFindFirstMatch);
108 ir::AstNode *FindPrecedingToken(const size_t pos, const ir::AstNode *startNode, ArenaAllocator *all…
109 ir::AstNode *GetIdentifierFromSuper(ir::AstNode *super);
110 ir::AstNode *GetOriginalNode(ir::AstNode *astNode);
111 checker::VerifiedType GetTypeOfSymbolAtLocation(checker::ETSChecker *checker, ir::AstNode *astNode);
120 size_t GetTokenPosOfNode(const ir::AstNode *astNode);
121 std::pair<ir::AstNode *, util::StringView> GetDefinitionAtPositionImpl(es2panda_Context *context, s…
127 ir::AstNode *FindRightToken(const size_t pos, const ArenaVector<ir::AstNode *> &nodes);
128 std::string GetOwnerId(ir::AstNode *node);
[all …]
Dinlay_hints.h20 #include "ir/astNode.h"
33 int GetFullWidth(const ir::AstNode *node);
40 bool IsExpressionWithTypeArguments(const ir::AstNode *node);
41 void GetVariableDeclarationTypeForHints(const ir::AstNode *decl, InlayHintList *result);
42 void GetCallExpTypeForHints(const ir::AstNode *expr, const ir::AstNode *parent, InlayHintList *resu…
44 void SaveToList(const ir::Expression *mem, const ir::AstNode *asignNode, InlayHintList *list);
45 void GetEnumTypeForHints(const ir::AstNode *member, const ir::AstNode *parent, InlayHintList *resul…
46 void GetFunctionReturnTypeForHints(const ir::AstNode *decl, InlayHintList *result);
47 void GetFunctionParameterTypeForHints(const ir::AstNode *node, InlayHintList *result);
48 bool IsSignatureSupportingReturnAnnotation(const ir::AstNode *node);
[all …]
/arkcompiler/ets_frontend/ets2panda/compiler/core/
Dpandagen.h38 class AstNode; variable
70 void StoreAccumulator(const ir::AstNode *node, VReg vreg);
71 void LoadAccumulator(const ir::AstNode *node, VReg reg);
73 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, VReg vd, VReg vs) override;
74 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, OutVReg vd, VReg vs) override;
75 void MoveVreg(const ir::AstNode *node, VReg vd, VReg vs);
77 void LoadAccumulatorDouble(const ir::AstNode *node, double num);
78 void LoadAccumulatorInt(const ir::AstNode *node, size_t num);
80 void LoadConst(const ir::AstNode *node, Constant id);
81 void StoreConst(const ir::AstNode *node, VReg reg, Constant id);
[all …]
DETSGen.h19 #include "ir/astNode.h"
46 [[nodiscard]] VReg StoreException(const ir::AstNode *node);
47 …void ApplyConversionAndStoreAccumulator(const ir::AstNode *node, VReg vreg, const checker::Type *t…
48 void StoreAccumulator(const ir::AstNode *node, VReg vreg);
49 void LoadAccumulator(const ir::AstNode *node, VReg vreg);
50 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, VReg vd, VReg vs) override;
51 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, OutVReg vd, VReg vs) override;
52 void MoveVreg(const ir::AstNode *node, VReg vd, VReg vs);
57 void LoadDynamicModuleVariable(const ir::AstNode *node, varbinder::Variable const *var);
58 void LoadDynamicNamespaceVariable(const ir::AstNode *node, varbinder::Variable const *var);
[all …]
/arkcompiler/ets_frontend/ets2panda/lsp/src/services/
Dutilities.cpp25 bool IsValidImplementation(ir::AstNode *astNode) in IsValidImplementation() argument
27 if (astNode == nullptr) { in IsValidImplementation()
31 …return !IsThis(astNode) && !IsInitializer(astNode) && !IsReturnNode(astNode) && !IsAsTypeNode(astN… in IsValidImplementation()
34 bool IsInitializer(ir::AstNode *astNode) in IsInitializer() argument
36 return astNode != nullptr && astNode->Parent() != nullptr && in IsInitializer()
37 ((astNode->IsClassProperty() && astNode->AsClassProperty()->Value() != nullptr) || in IsInitializer()
38 (astNode->IsAssignmentExpression() && in IsInitializer()
39 astNode->AsAssignmentExpression()->Target()->Declaration()->IsLetOrConstDecl()) || in IsInitializer()
40 astNode->IsVariableDeclaration()); in IsInitializer()
43 bool IsThis(ir::AstNode *astNode) in IsThis() argument
[all …]
/arkcompiler/ets_frontend/es2panda/compiler/core/
Dpandagen.h40 class AstNode; variable
130 const ir::AstNode *RootNode() const in RootNode()
265 void InitializeLexEnv(const ir::AstNode *node);
266 void CopyFunctionArguments(const ir::AstNode *node);
267 void GetFunctionObject(const ir::AstNode *node);
268 void GetNewTarget(const ir::AstNode *node);
269 void GetThis(const ir::AstNode *node);
270 void SetThis(const ir::AstNode *node);
272 … void StoreVar(const ir::AstNode *node, const binder::ScopeFindResult &result, bool isDeclaration);
274 void StLetOrClassToGlobalRecord(const ir::AstNode *node, const util::StringView &name);
[all …]
/arkcompiler/ets_frontend/ets2panda/lsp/include/services/text_change/
Dchange_tracker.h27 #include "ir/astNode.h"
82 const ir::AstNode *node;
90 std::vector<ir::AstNode *> nodes;
109 const std::variant<const ir::AstNode *, const std::vector<const ir::AstNode *>> &node;
118 using ValidateNonFormattedText = std::function<void(ir::AstNode *node, const std::string &text)>;
121 ir::AstNode *node;
133 ir::AstNode *GetAstFromContext(const es2panda_Context *context);
136 …geWithNodes(es2panda_Context *context, const TextRange range, std::vector<ir::AstNode *> &newNodes,
138 ir::AstNode *NextCommaToken(es2panda_Context *context, const ir::AstNode *node);
139 void InsertNodesAt(es2panda_Context *context, size_t pos, std::vector<ir::AstNode *> &newNodes,
[all …]
/arkcompiler/ets_frontend/ets2panda/ir/
DastNode.cpp16 #include "astNode.h"
23 AstNode::AstNode(AstNode const &other) in AstNode() function in ark::es2panda::ir::AstNode
35 [[nodiscard]] bool AstNode::IsExported() const noexcept in IsExported()
44 [[nodiscard]] bool AstNode::IsDefaultExported() const noexcept in IsDefaultExported()
53 [[nodiscard]] bool AstNode::IsExportedType() const noexcept in IsExportedType()
62 [[nodiscard]] bool AstNode::HasExportAlias() const noexcept in HasExportAlias()
71 bool AstNode::IsScopeBearer() const noexcept in IsScopeBearer()
76 varbinder::Scope *AstNode::Scope() const noexcept in Scope()
81 void AstNode::ClearScope() noexcept in ClearScope()
86 ir::ClassElement *AstNode::AsClassElement() in AsClassElement()
[all …]
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/
DconstantExpressionLowering.h45 ir::AstNode *FoldTernaryConstant(ir::ConditionalExpression *cond);
54 ir::AstNode *HandleLogicalOperator(ir::BinaryExpression *expr, lexer::TokenType opType);
56 ir::AstNode *FoldBinaryBooleanConstant(ir::BinaryExpression *expr);
69 ir::AstNode *FoldBinaryNumericConstantHelper(ir::BinaryExpression *expr, TypeRank targetRank);
71 ir::AstNode *FoldBinaryNumericConstant(ir::BinaryExpression *expr);
73 ir::AstNode *FoldBinaryStringConstant(ir::BinaryExpression *expr);
75 ir::AstNode *FoldBinaryConstant(ir::BinaryExpression *expr);
81 …ir::AstNode *FoldUnaryNumericConstantHelper(ir::UnaryExpression *unary, ir::Literal *node, TypeRan…
83 ir::AstNode *FoldUnaryNumericConstant(ir::UnaryExpression *unary);
85 ir::AstNode *FoldUnaryBooleanConstant(ir::UnaryExpression *unary);
[all …]
/arkcompiler/ets_frontend/ets2panda/lsp/src/
Dget_adjusted_location.cpp27 using ark::es2panda::ir::AstNode;
33 ArenaVector<AstNode *> GetChildren(AstNode *node, ArenaAllocator *allocator) in GetChildren()
35 ArenaVector<AstNode *> children(allocator->Adapter()); in GetChildren()
41 node->IterateRecursively([&children](const AstNode *current) { in GetChildren()
43 children.push_back(const_cast<AstNode *>(current)); in GetChildren()
50 AstNode *GetTouchingPropertyName(es2panda_Context *context, size_t pos) in GetTouchingPropertyName()
52 AstNode *token = GetTouchingToken(context, pos, false); in GetTouchingPropertyName()
72 bool IsDeclarationOrModifier(AstNode *node, AstNode *parent, bool forRename) in IsDeclarationOrModifier()
94 std::optional<AstNode *> HandleTSAsExpression(AstNode *node, AstNode *parent, in HandleTSAsExpression()
95 const ArenaVector<AstNode *> &parentChildren) in HandleTSAsExpression()
[all …]
Dclass_hierarchy.cpp27 std::string GetHierarchyDeclarationFileName(const ir::AstNode *node) in GetHierarchyDeclarationFileName()
47 std::string GetHierarchyDeclarationName(const ir::AstNode *node) in GetHierarchyDeclarationName()
61 HierarchyType GetHierarchyType(const ir::AstNode *node) in GetHierarchyType()
75 size_t GetPosition(const ir::AstNode *node) in GetPosition()
89 const ir::AstNode *GetEffectiveBaseTypeNode(const ir::AstNode *node) in GetEffectiveBaseTypeNode()
109 std::vector<const ir::AstNode *> GetInterfaceExtendsHeritageElement(const ir::AstNode *node) in GetInterfaceExtendsHeritageElement()
111 std::vector<const ir::AstNode *> result; in GetInterfaceExtendsHeritageElement()
123 void FindSuper(const ir::AstNode *node, TypeHierarchies &typeHierarchies, std::set<TypeHierarchies>… in FindSuper()
138 std::vector<ir::AstNode *> GetEffectiveImplementsTypeNodes(const ir::AstNode *node) in GetEffectiveImplementsTypeNodes()
140 std::vector<ir::AstNode *> result; in GetEffectiveImplementsTypeNodes()
[all …]
Dreferences.cpp20 #include "ir/astNode.h"
26 bool IsValidReference(ir::AstNode *astNode) in IsValidReference() argument
28 switch (astNode->Type()) { in IsValidReference()
36 DeclInfoType GetDeclInfoImpl(ir::AstNode *astNode) in GetDeclInfoImpl() argument
38 if (astNode == nullptr || !astNode->IsIdentifier()) { in GetDeclInfoImpl()
41 auto declNode = compiler::DeclarationFromIdentifier(astNode->AsIdentifier()); in GetDeclInfoImpl()
63 auto astNode = reinterpret_cast<ir::AstNode *>(ctx->parserProgram->Ast()); in GetReferencesAtPositionImpl() local
64 astNode->IterateRecursively([ctx, declInfo, &result](ir::AstNode *child) { in GetReferencesAtPositionImpl()
Dsuggestion_diagnostics.cpp25 std::vector<FileDiagnostic> GetSuggestionDiagnosticsImpl(ir::AstNode *astNode) in GetSuggestionDiagnosticsImpl() argument
30 if (astNode != nullptr) { in GetSuggestionDiagnosticsImpl()
31 Check(astNode, diags, visitedNestedConvertibleFunctions); in GetSuggestionDiagnosticsImpl()
41 void Check(ir::AstNode *node, std::vector<FileDiagnostic> &diag, std::unordered_map<std::string, bo… in Check()
47 node->FindChild([&diag, &visitedFunc](ir::AstNode *childNode) { in Check()
53 bool CheckGivenTypeExistInChilds(ir::AstNode *node, ir::AstNodeType type) in CheckGivenTypeExistInChilds()
55 auto desiredNode = node->FindChild([type](ir::AstNode *n) { in CheckGivenTypeExistInChilds()
62 void AddConvertToAsyncFunctionDiagnostics(ir::AstNode *node, std::vector<FileDiagnostic> &diag, in AddConvertToAsyncFunctionDiagnostics()
76 bool IsConvertibleFunction(ir::AstNode *node, std::unordered_map<std::string, bool> &visitedFunc) in IsConvertibleFunction()
82 bool HasReturnStatementWithPromiseHandler(ir::AstNode *node, std::unordered_map<std::string, bool> … in HasReturnStatementWithPromiseHandler()
[all …]
/arkcompiler/ets_frontend/ets2panda/ast_verifier/
Dhelpers.h19 #include "ir/astNode.h"
25 bool IsImportLike(const ir::AstNode *ast);
26 bool IsExportLike(const ir::AstNode *ast);
27 bool IsBooleanType(const ir::AstNode *ast);
28 bool IsValidTypeForBinaryOp(const ir::AstNode *ast, bool isBitwise);
29 bool IsStringType(const ir::AstNode *ast);
30 bool IsVisibleInternalNode(const ir::AstNode *ast, const ir::AstNode *objTypeDeclNode);
31 const checker::Type *GetClassDefinitionType(const ir::AstNode *ast);
32 const checker::Type *GetTSInterfaceDeclarationType(const ir::AstNode *ast);
33 bool ValidateMethodAccessForClass(const ir::AstNode *ast, const ir::AstNode *ownerSignDeclNode,
[all …]
/arkcompiler/ets_frontend/ets2panda/test/unit/lsp/
Dget_type_of_symbol_at_location_test.cpp20 #include "ir/astNode.h"
31 using ark::es2panda::ir::AstNode; in TEST_F()
41 auto astNode = GetAstFromContext<AstNode>(ctx); in TEST_F() local
43astNode->FindChild([](AstNode *node) { return node->IsIdentifier() && node->AsIdentifier()->Name()… in TEST_F()
48astNode->FindChild([](AstNode *node) { return node->IsIdentifier() && node->AsIdentifier()->Name()… in TEST_F()
53astNode->FindChild([](AstNode *node) { return node->IsIdentifier() && node->AsIdentifier()->Name()… in TEST_F()
58astNode->FindChild([](AstNode *node) { return node->IsIdentifier() && node->AsIdentifier()->Name()… in TEST_F()
63astNode->FindChild([](AstNode *node) { return node->IsIdentifier() && node->AsIdentifier()->Name()… in TEST_F()
68astNode->FindChild([](AstNode *node) { return node->IsIdentifier() && node->AsIdentifier()->Name()… in TEST_F()
73astNode->FindChild([](AstNode *node) { return node->IsIdentifier() && node->AsIdentifier()->Name()… in TEST_F()
[all …]
/arkcompiler/ets_frontend/ets2panda/lsp/include/services/
Dutilities.h19 #include "ir/astNode.h"
23 bool IsValidImplementation(ir::AstNode *astNode);
24 bool IsThis(ir::AstNode *astNode);
25 bool IsInitializer(ir::AstNode *astNode);
26 bool IsReturnNode(ir::AstNode *astNode);
27 bool IsAsTypeNode(ir::AstNode *astNode);
/arkcompiler/ets_frontend/ets2panda/checker/ets/
DassignAnalyzer.h25 class AstNode; variable
60 …explicit AssignPendingExit(const ir::AstNode *node, Set &inits, Set &uninits, bool isInitialConstr… in AssignPendingExit()
85 using NodeIdMap = ArenaMap<const ir::AstNode *, NodeId>;
90 void Analyze(const ir::AstNode *node);
96 void AnalyzeNodes(const ir::AstNode *node);
97 void AnalyzeNode(const ir::AstNode *node);
98 bool AnalyzeStmtNode1(const ir::AstNode *node);
99 bool AnalyzeStmtNode2(const ir::AstNode *node);
100 bool AnalyzeExprNode1(const ir::AstNode *node);
101 bool AnalyzeExprNode2(const ir::AstNode *node);
[all …]
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/
Dutil.h27 ir::AstNode *RefineSourceRanges(ir::AstNode *node);
28 bool HasGlobalClassParent(const ir::AstNode *node);
29 varbinder::Scope *NearestScope(const ir::AstNode *ast);
30 checker::ETSObjectType const *ContainingClass(const ir::AstNode *ast);
33 void ClearTypesVariablesAndScopes(ir::AstNode *node) noexcept;
34 ArenaSet<varbinder::Variable *> FindCaptured(ArenaAllocator *allocator, ir::AstNode *scopeBearer) n…
35 void SetSourceRangesRecursively(ir::AstNode *node, const lexer::SourceRange &range);
38 varbinder::Scope *Rebind(PhaseManager *phaseManager, varbinder::ETSBinder *varBinder, ir::AstNode *…
41 ir::AstNode *node);
44 ir::AstNode *DeclarationFromIdentifier(const ir::Identifier *node);
[all …]
/arkcompiler/ets_frontend/ets2panda/lsp/src/services/text_change/
Dchange_tracker.cpp38 …ValidateNonFormattedText validateNonFormattedText = [](ark::es2panda::ir::AstNode *, const std::st… in With() argument
41 ir::AstNode *ChangeTracker::GetAstFromContext(const es2panda_Context *context) in GetAstFromContext()
44 auto ast = reinterpret_cast<ir::AstNode *>(ctx->parserProgram->Ast()); in GetAstFromContext()
51 ir::AstNode *targetNode; in GetStartPositionOfLine()
52 ast->FindChild([line, &targetNode](ark::es2panda::ir::AstNode *node) { in GetStartPositionOfLine()
69 … std::vector<ir::AstNode *> &newNodes, ReplaceWithMultipleNodesOptions options) in ReplaceRangeWithNodes()
77 ir::AstNode *ChangeTracker::NextCommaToken(es2panda_Context *context, const ir::AstNode *node) in NextCommaToken()
86 …r::InsertNodesAt(es2panda_Context *context, const size_t pos, std::vector<ir::AstNode *> &newNodes, in InsertNodesAt()
94 … const std::variant<ir::AstNode *, std::vector<ir::AstNode *>> &insert, in InsertAtTopOfFile() argument
108 if (std::holds_alternative<std::vector<ir::AstNode *>>(insert)) { in InsertAtTopOfFile()
[all …]
/arkcompiler/ets_frontend/ets2panda/public/
Des2panda_lib.idl.erb65 void Do(ir.AstNode e2p_node);
69 ir.AstNode Do(ir.AstNode e2p_node);
73 boolean Do(ir.AstNode e2p_node);
85 void Do(sequence<ir.AstNode> e2p_node, u32 size);
99 void Do(ir.AstNode node, VoidPtr arg);
104 attribute ir.AstNode specifier;
187 void AstNodeForEach(ir.AstNode ast, AstNodeForEachFunction func, VoidPtr arg);
208 varbinder.Scope AstNodeFindNearestScope(es2panda_Context ctx, ir.AstNode node);
209 varbinder.Scope AstNodeRebind(es2panda_Context ctx, ir.AstNode node);
210 void AstNodeRecheck(es2panda_Context ctx, ir.AstNode node);
[all …]

12345678910>>...33