Home
last modified time | relevance | path

Searched refs:ASTNode (Results 1 – 25 of 125) sorted by relevance

12345

/external/skia/src/sksl/
DSkSLParser.cpp137 ASTNode::ID Parser::createNode(Args&&... args) { in createNode()
138 ASTNode::ID result(fFile->fNodes.size()); in createNode()
143 ASTNode::ID Parser::addChild(ASTNode::ID target, ASTNode::ID child) { in addChild()
148 void Parser::createEmptyChild(ASTNode::ID target) { in createEmptyChild()
149 ASTNode::ID child(fFile->fNodes.size()); in createEmptyChild()
158 ASTNode::ID result = this->createNode(/*offset=*/0, ASTNode::Kind::kFile); in compilationUnit()
165 ASTNode::ID dir = this->directive(); in compilationUnit()
175 ASTNode::ID section = this->section(); in compilationUnit()
189 ASTNode::ID decl = this->declaration(); in compilationUnit()
292 bool Parser::isArrayType(ASTNode::ID type) { in isArrayType()
[all …]
DSkSLParser.h142 bool isArrayType(ASTNode::ID type);
145 ASTNode& getNode(ASTNode::ID id) { in getNode()
154 ASTNode::ID precision();
156 ASTNode::ID directive();
158 ASTNode::ID section();
160 ASTNode::ID enumDeclaration();
162 ASTNode::ID declaration();
166 ASTNode::ID type;
172 ASTNode::ID varDeclarationsOrExpressionStatement();
174 ASTNode::ID varDeclarations();
[all …]
DSkSLIRGenerator.h178 StatementArray convertVarDeclarations(const ASTNode& decl, Variable::Storage storage);
179 void convertFunction(const ASTNode& f);
180 std::unique_ptr<Statement> convertStatement(const ASTNode& statement);
181 std::unique_ptr<Expression> convertExpression(const ASTNode& expression);
182 std::unique_ptr<ModifiersDeclaration> convertModifiersDeclaration(const ASTNode& m);
184 const Type* convertType(const ASTNode& type, bool allowVoid = false);
195 int convertArraySize(const Type& type, int offset, const ASTNode& s);
199 std::unique_ptr<Block> convertBlock(const ASTNode& block);
200 std::unique_ptr<Statement> convertBreak(const ASTNode& b);
201 std::unique_ptr<Statement> convertContinue(const ASTNode& c);
[all …]
DSkSLASTNode.h25 struct ASTNode { struct
52 friend struct ASTNode; argument
163 ASTNode& operator*() {
168 ASTNode* operator->() {
174 iterator(std::vector<ASTNode>* nodes, ID id) in iterator() argument
178 std::vector<ASTNode>* fNodes; argument
182 friend struct ASTNode; argument
341 ASTNode() in ASTNode() argument
345 ASTNode(std::vector<ASTNode>* nodes, int offset, Kind kind) in ASTNode() function
406 ASTNode(std::vector<ASTNode>* nodes, int offset, Kind kind, Operator op) in ASTNode() function
[all …]
DSkSLIRGenerator.cpp137 std::unique_ptr<Statement> IRGenerator::convertStatement(const ASTNode& statement) { in convertStatement()
139 case ASTNode::Kind::kBlock: in convertStatement()
141 case ASTNode::Kind::kVarDeclarations: in convertStatement()
143 case ASTNode::Kind::kIf: in convertStatement()
145 case ASTNode::Kind::kFor: in convertStatement()
147 case ASTNode::Kind::kWhile: in convertStatement()
149 case ASTNode::Kind::kDo: in convertStatement()
151 case ASTNode::Kind::kSwitch: in convertStatement()
153 case ASTNode::Kind::kReturn: in convertStatement()
155 case ASTNode::Kind::kBreak: in convertStatement()
[all …]
DSkSLASTFile.h17 : fRoot(ASTNode::ID::Invalid()) {} in ASTFile()
19 ASTNode& root() { in root()
24 std::vector<ASTNode> fNodes;
26 ASTNode::ID fRoot;
/external/llvm-project/clang/utils/TableGen/
DASTTableGen.cpp24 if (auto node = getAs<ASTNode>()) { in getName()
94 using ChildMap = std::multimap<ASTNode, ASTNode>;
96 static void visitASTNodeRecursive(ASTNode node, ASTNode base, in visitASTNodeRecursive()
98 ASTNodeHierarchyVisitor<ASTNode> visit) { in visitASTNodeRecursive()
109 ASTNodeHierarchyVisitor<ASTNode> visit) { in visitHierarchy()
121 ASTNode root; in visitHierarchy()
122 for (ASTNode node : nodes) { in visitHierarchy()
135 visitASTNodeRecursive(root, ASTNode(), hierarchy, visit); in visitHierarchy()
140 ASTNodeHierarchyVisitor<ASTNode> visit) { in visitASTNodeHierarchyImpl()
DClangASTNodesEmitter.cpp33 typedef std::multimap<ASTNode, ASTNode> ChildMap;
37 ASTNode Root;
61 std::string baseName(ASTNode node) { in baseName()
70 std::pair<ASTNode, ASTNode> EmitNode(raw_ostream& OS, ASTNode Base);
87 std::pair<ASTNode, ASTNode> ClangASTNodesEmitter::EmitNode(raw_ostream &OS, in EmitNode()
88 ASTNode Base) { in EmitNode()
94 ASTNode First, Last; in EmitNode()
99 ASTNode Child = i->second; in EmitNode()
DASTTableGen.h157 class ASTNode : public HasProperties {
159 ASTNode(llvm::Record *record = nullptr) : HasProperties(record) {} in HasProperties()
166 ASTNode getBase() const { in getBase()
180 class DeclNode : public ASTNode {
182 DeclNode(llvm::Record *record = nullptr) : ASTNode(record) {} in ASTNode() function
186 DeclNode getBase() const { return DeclNode(ASTNode::getBase().getRecord()); } in getBase()
202 class TypeNode : public ASTNode {
204 TypeNode(llvm::Record *record = nullptr) : ASTNode(record) {} in ASTNode() function
208 TypeNode getBase() const { return TypeNode(ASTNode::getBase().getRecord()); } in getBase()
224 class StmtNode : public ASTNode {
[all …]
/external/llvm-project/clang-tools-extra/clangd/refactor/tweaks/
DExtractVariable.cpp90 Expr = Node->ASTNode.get<clang::Expr>(); in ExtractionContext()
123 if (const clang::Stmt *Stmt = InsertionPoint->ASTNode.get<clang::Stmt>()) { in computeInsertionPoint()
138 if (InsertionPoint->ASTNode.get<VarDecl>()) in computeInsertionPoint()
145 const clang::Stmt *CurInsertionPoint = CurNode->ASTNode.get<Stmt>(); in computeInsertionPoint()
149 if (const clang::Stmt *CurParent = CurNode->Parent->ASTNode.get<Stmt>()) { in computeInsertionPoint()
212 llvm::dyn_cast_or_null<BinaryOperator>(N.ASTNode.get<Expr>())) { in parse()
220 N.ASTNode.get<Expr>())) { in parse()
228 const Expr *E = Child->ASTNode.get<Expr>(); in parse()
257 if (SM.getFileID(Child->ASTNode.get<Expr>()->getExprLoc()) != F) in crossesMacroBoundary()
305 toHalfOpenFileRange(SM, LangOpts, Start->ASTNode.getSourceRange()) in getBinaryOperatorRange()
[all …]
DExpandAutoType.cpp60 while (N && N->ASTNode.get<TypeLoc>()) in isStructuredBindingType()
63 return N && N->ASTNode.get<DecompositionDecl>(); in isStructuredBindingType()
74 if (const auto *DD = It->ASTNode.get<DeclaratorDecl>()) { in isDeducedAsLambda()
88 if (auto *TypeNode = Node->ASTNode.get<TypeLoc>()) { in prepare()
DExtractFunction.cpp98 if (!N->ASTNode.get<Stmt>()) in isRootStmt()
105 if (N->Selected == SelectionTree::Unselected && !N->ASTNode.get<DeclStmt>()) in isRootStmt()
141 if (Parent->ASTNode.get<DeclStmt>()) in getParentOfRootStmts()
215 const Stmt *Last = EZ.getLastRootStmt()->ASTNode.get<Stmt>(); in alwaysReturns()
235 if (CurNode->ASTNode.get<LambdaExpr>()) in findEnclosingFunction()
237 if (const FunctionDecl *Func = CurNode->ASTNode.get<FunctionDecl>()) { in findEnclosingFunction()
257 SM, LangOpts, Parent->Children.front()->ASTNode.getSourceRange())) in findZoneRange()
262 SM, LangOpts, Parent->Children.back()->ASTNode.getSourceRange())) in findZoneRange()
286 if (Child->ASTNode.get<Expr>()) in validSingleChild()
291 if (Child->ASTNode.get<Stmt>() == EnclosingFunc->getBody()) in validSingleChild()
[all …]
DAddUsing.cpp250 if (Node->ASTNode.get<NestedNameSpecifierLoc>()) { in prepare()
252 } else if (auto *T = Node->ASTNode.get<TypeLoc>()) { in prepare()
255 } else if (Node->Parent->ASTNode.get<TypeLoc>() || in prepare()
256 Node->Parent->ASTNode.get<NestedNameSpecifierLoc>()) { in prepare()
268 if (auto *D = Node->ASTNode.get<DeclRefExpr>()) { in prepare()
274 } else if (auto *T = Node->ASTNode.get<TypeLoc>()) { in prepare()
/external/icu/tools/srcgen/currysrc/src/main/java/com/google/currysrc/api/process/ast/
DStartPositionComparator.java18 import org.eclipse.jdt.core.dom.ASTNode;
23 public final class StartPositionComparator implements java.util.Comparator<ASTNode> {
25 public int compare(ASTNode o1, ASTNode o2) { in compare()
DBodyDeclarationLocators.java24 import org.eclipse.jdt.core.dom.ASTNode;
79 case ASTNode.FIELD_DECLARATION: in createLocators()
86 case ASTNode.METHOD_DECLARATION: in createLocators()
92 case ASTNode.TYPE_DECLARATION: in createLocators()
93 case ASTNode.ENUM_DECLARATION: in createLocators()
95 case ASTNode.ENUM_CONSTANT_DECLARATION: in createLocators()
152 public static BodyDeclaration findDeclarationNode(ASTNode node) { in findDeclarationNode()
153 ASTNode ancestor = node; in findDeclarationNode()
DTypeLocator.java28 import org.eclipse.jdt.core.dom.ASTNode;
97 ASTNode parentNode = currentNode.getParent(); in TypeLocator()
181 ASTNode parentNode = node.getParent(); in matchNested()
268 ASTNode enclosingNode = typeDeclaration.getParent(); in findEnclosingTypeDeclaration()
282 ASTNode parentNode = bodyDeclaration.getParent(); in findTypeDeclarationNode()
/external/smali/smalidea/src/main/java/org/jf/smalidea/psi/impl/
DSmaliCompositeElement.java35 import com.intellij.lang.ASTNode;
53 protected List<ASTNode> findChildrenByType(IElementType elementType) { in findChildrenByType()
54 List<ASTNode> result = ImmutableList.of(); in findChildrenByType()
55 ASTNode child = getNode().getFirstChildNode(); in findChildrenByType()
59 result = new ArrayList<ASTNode>(); in findChildrenByType()
61 result.add((ASTNode)child.getPsi()); in findChildrenByType()
DSmaliThrowsList.java34 import com.intellij.lang.ASTNode;
41 public SmaliThrowsList(@NotNull ASTNode node) { in SmaliThrowsList()
/external/skia/src/sksl/ir/
DSkSLFunctionDefinition.h17 struct ASTNode;
57 const ASTNode* source() const { in source()
61 void setSource(const ASTNode* source) { in setSource()
86 const ASTNode* fSource;
/external/smali/smalidea/src/main/java/org/jf/smalidea/
DSmaliParserDefinition.java34 import com.intellij.lang.ASTNode;
80 @NotNull @Override public PsiElement createElement(ASTNode node) { in createElement()
92 … @Override public SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) { in spaceExistanceTypeBetweenTokens()
/external/skqp/src/sksl/ast/
DSkSLASTNode.h19 struct ASTNode { struct
20 virtual ~ASTNode() {} in ~ASTNode() argument
/external/icu/tools/srcgen/currysrc/src/main/java/com/google/currysrc/api/process/
DReporter.java18 import org.eclipse.jdt.core.dom.ASTNode;
33 void info(ASTNode node, String message); in info()
/external/llvm-project/clang-tools-extra/clangd/
DSelection.cpp51 if (const auto *RE = N->ASTNode.get<RecoveryExpr>()) { in recordMetrics()
560 Nodes.back().ASTNode = DynTypedNode::create(*AST.getTranslationUnitDecl()); in SelectionVisitor()
654 Nodes.back().ASTNode = std::move(Node); in push()
665 dlog("{1}pop: {0}", printNodeToString(N.ASTNode, PrintPolicy), indent(-1)); in pop()
666 claimRange(N.ASTNode.getSourceRange(), N.Selected); in pop()
767 printNodeKind(OS, N.ASTNode); in print()
768 OS << ' ' << abbreviatedString(N.ASTNode, PrintPolicy) << "\n"; in print()
776 printNodeKind(OS, ASTNode); in kind()
857 if (const Decl *Current = CurrentNode->ASTNode.get<Decl>()) { in getDeclContext()
869 Children.front()->ASTNode.getSourceRange() == ASTNode.getSourceRange()) in ignoreImplicit()
[all …]
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/
DASTUtils.h69 template <typename T> std::string safeGetName(const T *ASTNode) { in safeGetName() argument
70 const auto *const ND = llvm::dyn_cast_or_null<clang::NamedDecl>(ASTNode); in safeGetName()
/external/clang/tools/libclang/
DCXComment.h34 Result.ASTNode = C; in createCXComment()
40 return static_cast<const comments::Comment *>(CXC.ASTNode); in getASTNode()

12345