Home
last modified time | relevance | path

Searched refs:ast_ (Results 1 – 25 of 63) sorted by relevance

123

/ohos5.0/foundation/ability/idl_tool/idl_tool_2/parser/
H A Dintf_type_check.cpp25 if (ast_ == nullptr) { in CheckIntegrity()
30 if (ast_->GetName().empty()) { in CheckIntegrity()
54 if (!ast_->GetPackageName().empty()) { in CheckIntfSaAst()
59 const auto &importMap = ast_->GetImports(); in CheckIntfSaAst()
97 for (const auto &pair : ast_->GetTypes()) { in CheckIntfSaAstTypes()
158 if (ast_->GetPackageName().empty()) { in CheckIntfHdiAst()
193 switch (ast_->GetASTFileType()) { in CheckIntfHdiAstFileType()
262 if (ast_->GetTypeDefinitionNumber() > 0) { in CheckInterfaceAst()
294 if (ast_->GetPackageName().empty()) { in CheckIntfSmAst()
318 switch (ast_->GetASTFileType()) { in CheckIntfSmAstFileType()
[all …]
H A Dparser.cpp81 ret = AddAst(ast_) && ret; in ParseOne()
98 ast_ = nullptr; in Reset()
104 ast_ = new AST(); in ParseFile()
374 ast_->AddImport(seqAst); in ParseSequenceableInfo()
545 interfaceType->SetNamespace(ast_->ParseNamespace(ast_->GetFullName())); in ParseInterface()
563 interfaceType->SetVersion(ast_->GetMajorVer(), ast_->GetMinorVer()); in ParseInterface()
1045 ast_->AddType(type); in ParseBasicType()
1238 ast_->AddType(type); in ParseUserDefType()
1280 enumType->SetNamespace(ast_->ParseNamespace(ast_->GetFullName())); in ParseEnumDeclaration()
1392 structType->SetNamespace(ast_->ParseNamespace(ast_->GetFullName())); in ParseStructDeclaration()
[all …]
H A Dintf_type_check.h28 IntfTypeChecker(AutoPtr<AST> ast) : ast_(ast){}; in IntfTypeChecker()
61 AutoPtr<AST> ast_; variable
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/metadata/
H A Dmetadata_reader.cpp80 ast_ = new AST(); in ReadMetadataToAst()
89 ast_->SetFullName(std::string(reinterpret_cast<char*>(metaComponent_->name_))); in ReadMetadataToAst()
90 ast_->SetAStFileType(ASTFileType::AST_IFACE); in ReadMetadataToAst()
91 allAsts[std::string(reinterpret_cast<char*>(metaComponent_->name_))] = ast_; in ReadMetadataToAst()
101 … seqType->SetNamespace(ast_->ParseNamespace(std::string(reinterpret_cast<char*>(mp->namespace_)))); in ReadMetaSequenceable()
106 ast_->AddImport(seqAst); in ReadMetaSequenceable()
107 ast_->AddSequenceableDef(seqType); in ReadMetaSequenceable()
120 ast_->SetLicense(std::string(reinterpret_cast<char*>(mi->license_))); in ReadMetaInterface()
126 ast_->AddInterfaceDef(interface); in ReadMetaInterface()
171 AutoPtr<ASTType> astType = ast_->FindType(typeName); in ReadMetaType()
[all …]
/ohos5.0/drivers/hdf_core/framework/tools/hdi-gen/codegen/
H A Dcode_emitter.cpp37 ast_ = ast; in Reset()
38 …if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST… in Reset()
39 interface_ = ast_->GetInterfaceDef(); in Reset()
51 } else if (ast_->GetASTFileType() == ASTFileType::AST_TYPES) { in Reset()
52 baseName_ = ast_->GetName(); in Reset()
53 } else if (ast_->GetASTFileType() == ASTFileType::AST_SEQUENCEABLE) { in Reset()
54 baseName_ = ast_->GetName(); in Reset()
76 ast_ = nullptr; in CleanData()
121 std::string subPackage = Options::GetInstance().GetSubPackage(ast_->GetPackageName()); in GetFileParentPath()
178 …return StringHelper::Format("v%u_%u/%s", ast_->GetMajorVer(), ast_->GetMinorVer(), FileName(name).… in EmitVersionHeaderName()
H A Dcpp_custom_types_code_emitter.cpp17 if (ast_->GetASTFileType() != ASTFileType::AST_TYPES) { in ResolveDirectory()
150 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeDecls()
151 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeDecls()
153 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeDecls()
184 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeFuncDecl()
185 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeFuncDecl()
191 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeFuncDecl()
263 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeDataProcess()
264 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeDataProcess()
270 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeDataProcess()
[all …]
H A Dcpp_code_emitter.cpp22 const AST::TypeStringMap &types = ast_->GetTypes(); in GetStdlibInclusions()
59 for (const auto &importPair : ast_->GetImports()) { in GetImportInclusions()
76 if (ast_->GetLicense().empty()) { in EmitLicense()
79 sb.Append(ast_->GetLicense()).Append("\n\n"); in EmitLicense()
201 std::string selfNameSpace = EmitPackageToNameSpace(EmitNamespace(ast_->GetFullName())); in EmitImportUsingNamespace()
203 for (const auto &importPair : ast_->GetImports()) { in EmitImportUsingNamespace()
212 const AST::TypeStringMap &types = ast_->GetTypes(); in EmitImportUsingNamespace()
H A Djava_code_emitter.cpp15 if (ast_->GetLicense().empty()) { in EmitLicense()
18 sb.Append(ast_->GetLicense()).Append("\n\n"); in EmitLicense()
23 sb.AppendFormat("package %s;\n", ast_->GetPackageName().c_str()); in EmitPackage()
H A Djava_client_interface_code_emitter.cpp17 …if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST… in ResolveDirectory()
70 const AST::TypeStringMap &types = ast_->GetTypes(); in EmitInterfaceCorelibImports()
103 for (const auto &importPair : ast_->GetImports()) { in EmitInterfaceSelfDefinedTypeImports()
H A Dc_code_emitter.cpp16 const AST::TypeStringMap &types = ast_->GetTypes(); in GetStdlibInclusions()
27 for (const auto &importPair : ast_->GetImports()) { in GetImportInclusions()
112 if (ast_->GetLicense().empty()) { in EmitLicense()
115 sb.Append(ast_->GetLicense()).Append("\n\n"); in EmitLicense()
H A Dcpp_interface_code_emitter.cpp17 …if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST… in ResolveDirectory()
105 sb.AppendFormat("#define %s %u\n", majorVerName_.c_str(), ast_->GetMajorVer()); in EmitInterfaceVersionMacro()
106 sb.AppendFormat("#define %s %u\n", minorVerName_.c_str(), ast_->GetMinorVer()); in EmitInterfaceVersionMacro()
247 …sb.Append(prefix + TAB).AppendFormat("%s = %d;\n", majorParam->GetName().c_str(), ast_->GetMajorVe… in EmitInterfaceGetVersionMethod()
249 …sb.Append(prefix + TAB).AppendFormat("%s = %d;\n", minorParam->GetName().c_str(), ast_->GetMinorVe… in EmitInterfaceGetVersionMethod()
H A Dc_custom_types_code_emitter.cpp18 if (ast_->GetASTFileType() != ASTFileType::AST_TYPES) { in ResolveDirectory()
138 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeDecls()
139 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeDecls()
141 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeDecls()
172 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeFuncDecl()
173 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeFuncDecl()
181 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeFuncDecl()
256 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeDataProcess()
257 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeDataProcess()
265 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeDataProcess()
[all …]
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/codegen/HDI/cpp/
H A Dcpp_custom_types_code_emitter.cpp24 if (ast_->GetASTFileType() != ASTFileType::AST_TYPES) { in ResolveDirectory()
158 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeDecls()
159 AutoPtr<HdiTypeEmitter> typeEmitter = GetTypeEmitter(ast_->GetTypeDefintion(i)); in EmitCustomTypeDecls()
161 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeDecls()
169 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeFuncDecl()
170 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeFuncDecl()
173 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeFuncDecl()
237 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeDataProcess()
238 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeDataProcess()
243 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeDataProcess()
[all …]
H A Dcpp_interface_code_emitter.cpp24 …if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST… in ResolveDirectory()
112 sb.AppendFormat("#define %s %u\n", majorVerName_.c_str(), ast_->GetMajorVer()); in EmitInterfaceVersionMacro()
113 sb.AppendFormat("#define %s %u\n", minorVerName_.c_str(), ast_->GetMinorVer()); in EmitInterfaceVersionMacro()
255 …sb.Append(prefix + TAB).AppendFormat("%s = %d;\n", majorParam->GetName().c_str(), ast_->GetMajorVe… in EmitInterfaceGetVersionMethod()
257 …sb.Append(prefix + TAB).AppendFormat("%s = %d;\n", minorParam->GetName().c_str(), ast_->GetMinorVe… in EmitInterfaceGetVersionMethod()
H A Dhdi_cpp_code_emitter.cpp29 for (const auto &importPair : ast_->GetImports()) { in GetImportInclusions()
105 const AST::TypeStringMap &types = ast_->GetTypes(); in GetStdlibInclusions()
179 std::string selfNameSpace = EmitPackageToNameSpace(EmitNamespace(ast_->GetFullName())); in EmitImportUsingNamespace()
181 for (const auto &importPair : ast_->GetImports()) { in EmitImportUsingNamespace()
190 const AST::TypeStringMap &types = ast_->GetTypes(); in EmitImportUsingNamespace()
/ohos5.0/drivers/hdf_core/framework/tools/hdi-gen/parser/
H A Dparser.cpp71 ret = AddAst(ast_) && ret; in ParseOne()
89 ast_ = nullptr; in Reset()
95 ast_ = new AST(); in ParseFile()
275 ast_->AddImport(seqAst); in ParseSequenceableInfo()
406 interfaceType->SetNamespace(ast_->ParseNamespace(ast_->GetFullName())); in ParseInterface()
826 ast_->AddType(type); in ParseBasicType()
1000 ast_->AddType(type); in ParseUserDefType()
1042 enumType->SetNamespace(ast_->ParseNamespace(ast_->GetFullName())); in ParseEnumDeclaration()
1156 structType->SetNamespace(ast_->ParseNamespace(ast_->GetFullName())); in ParseStructDeclaration()
1261 unionType->SetNamespace(ast_->ParseNamespace(ast_->GetFullName())); in ParseUnionDeclaration()
[all …]
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/codegen/SA/cpp/
H A Dsa_cpp_interface_code_emitter.cpp108 int sequenceableNumber = static_cast<int>(ast_->GetSequenceableDefNumber()); in EmitInterfaceSelfDefinedTypeInclusions()
110 AutoPtr<ASTSequenceableType> seqType = ast_->GetSequenceableDef(i); in EmitInterfaceSelfDefinedTypeInclusions()
116 for (auto interface : ast_->GetInterfaceDefs()) { in EmitInterfaceSelfDefinedTypeInclusions()
133 int sequenceableNumber = static_cast<int>(ast_->GetSequenceableDefNumber()); in EmitInterfaceUsings()
135 AutoPtr<ASTSequenceableType> seqType = ast_->GetSequenceableDef(i); in EmitInterfaceUsings()
145 for (auto interface : ast_->GetInterfaceDefs()) { in EmitInterfaceUsings()
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/codegen/HDI/
H A Dhdi_code_emitter.cpp85 ast_ = ast; in Reset()
86 …if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST… in Reset()
87 interface_ = ast_->GetInterfaceDef(); in Reset()
100 } else if (ast_->GetASTFileType() == ASTFileType::AST_TYPES) { in Reset()
101 baseName_ = ast_->GetName(); in Reset()
102 } else if (ast_->GetASTFileType() == ASTFileType::AST_SEQUENCEABLE) { in Reset()
103 baseName_ = ast_->GetName(); in Reset()
125 ast_ = nullptr; in CleanData()
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/codegen/HDI/java/
H A Djava_client_interface_code_emitter.cpp24 …if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST… in ResolveDirectory()
76 const AST::TypeStringMap &types = ast_->GetTypes(); in EmitInterfaceCorelibImports()
109 for (const auto &importPair : ast_->GetImports()) { in EmitInterfaceSelfDefinedTypeImports()
/ohos5.0/drivers/hdf_core/framework/tools/hc-gen/src/
H A Dgenerator.h20 explicit Generator(const std::shared_ptr<Ast> &ast) : ast_(ast) {} in Generator()
27 std::shared_ptr<Ast> ast_;
H A Ddecompile_gen.cpp20 ast_(ast) in DecompileGen()
43 std::shared_ptr<AstObject> astObject = ast_->GetAstRoot(); in GetNodeRefPath()
167 if (astObj != ast_->GetAstRoot()) { in CloseBrace()
181 if (!ast_->WalkRound( in OutPut()
H A Dparser.cpp29 ast_ = astList.front(); in Parse()
32 if (!ast_->Merge(astList)) { in Parse()
36 ast_->Dump("final merged"); in Parse()
38 if (ast_->GetAstRoot() == nullptr) { in Parse()
43 if (!ast_->Expand()) { in Parse()
437 return ast_; in GetAst()
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/codegen/SA/ts/
H A Dsa_ts_code_emitter.cpp110 for (auto interface : ast_->GetInterfaceDefs()) { in EmitInterfaceImports()
124 int sequenceableNumber = static_cast<int>(ast_->GetSequenceableDefNumber()); in EmitInterfaceSelfDefinedTypeImports()
126 AutoPtr<ASTSequenceableType> seqType = ast_->GetSequenceableDef(i); in EmitInterfaceSelfDefinedTypeImports()
131 for (auto interface : ast_->GetInterfaceDefs()) { in EmitInterfaceSelfDefinedTypeImports()
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/codegen/
H A Dcode_emitter.cpp27 if (ast_->GetLicense().empty()) { in EmitLicense()
30 sb.Append(ast_->GetLicense()).Append("\n\n"); in EmitLicense()
63 std::string subPackage = Options::GetInstance().GetSubPackage(ast_->GetPackageName()); in GetFileParentPath()
123 …return StringHelper::Format("v%u_%u/%s", ast_->GetMajorVer(), ast_->GetMinorVer(), FileName(name).… in EmitVersionHeaderName()
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/codegen/HDI/c/
H A Dc_custom_types_code_emitter.cpp25 if (ast_->GetASTFileType() != ASTFileType::AST_TYPES) { in ResolveDirectory()
145 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeDecls()
146 AutoPtr<HdiTypeEmitter> typeEmitter = GetTypeEmitter(ast_->GetTypeDefintion(i)); in EmitCustomTypeDecls()
148 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeDecls()
156 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeFuncDecl()
157 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeFuncDecl()
160 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeFuncDecl()
222 for (size_t i = 0; i < ast_->GetTypeDefinitionNumber(); i++) { in EmitCustomTypeDataProcess()
223 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeDataProcess()
230 if (i + 1 < ast_->GetTypeDefinitionNumber()) { in EmitCustomTypeDataProcess()
[all …]

123