Home
last modified time | relevance | path

Searched refs:ast_ (Results 1 - 25 of 30) sorted by relevance

12

/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_ICALLBACK) { 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_ in GetFileParentPath()
[all...]
H A Dcpp_custom_types_code_emitter.cpp17 if (ast_->GetASTFileType() != ASTFileType::AST_TYPES) { in ResolveDirectory()
51 std::string marcoName = StringHelper::Format("%s.%s", ast_->GetPackageName().c_str(), baseName_.c_str()); in EmitPassthroughCustomTypesHeaderFile()
92 std::string marcoName = StringHelper::Format("%s.%s", ast_->GetPackageName().c_str(), baseName_.c_str()); in EmitCustomTypesHeaderFile()
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_ in EmitCustomTypeDataProcess()
[all...]
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 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_client_interface_code_emitter.cpp17 if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST_ICALLBACK) { 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 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_ in EmitCustomTypeDataProcess()
[all...]
H A Dcpp_interface_code_emitter.cpp17 if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST_ICALLBACK) { 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_->GetMajorVer()); in EmitInterfaceGetVersionMethod()
249 sb.Append(prefix + TAB).AppendFormat("%s = %d;\n", minorParam->GetName().c_str(), ast_->GetMinorVer()); in EmitInterfaceGetVersionMethod()
H A Dc_interface_code_emitter.cpp17 if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST_ICALLBACK) { in ResolveDirectory()
169 sb.AppendFormat("#define %s %u\n", majorVerName_.c_str(), ast_->GetMajorVer()); in EmitInterfaceVersionMacro()
170 sb.AppendFormat("#define %s %u\n", minorVerName_.c_str(), ast_->GetMinorVer()); in EmitInterfaceVersionMacro()
H A Djava_client_proxy_code_emitter.cpp16 if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST_ICALLBACK) { in ResolveDirectory()
68 const AST::TypeStringMap &types = ast_->GetTypes(); in EmitProxyCorelibImports()
95 for (const auto &importPair : ast_->GetImports()) { in EmitProxySelfDefinedTypeImports()
H A Dcpp_service_impl_code_emitter.cpp17 if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST_ICALLBACK) { in ResolveDirectory()
H A Dcode_emitter.h127 AutoPtr<AST> ast_ = nullptr; member in OHOS::HDI::CodeEmitter
H A Dcpp_client_proxy_code_emitter.cpp18 if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST_ICALLBACK) { in ResolveDirectory()
414 const AST::TypeStringMap &types = ast_->GetTypes(); in GetSourceOtherLibInclusions()
523 sb.Append(prefix + TAB).AppendFormat("if (%s != %d) {\n", serMajorName.c_str(), ast_->GetMajorVer()); in EmitGetInstanceMethodInitProxyImpl()
526 sb.AppendFormat(", version of client:%d.%d\", __func__, ", ast_->GetMajorVer(), ast_->GetMinorVer()); in EmitGetInstanceMethodInitProxyImpl()
700 sb.Append(prefix + TAB).AppendFormat("if (%s != %d) {\n", serMajorName.c_str(), ast_->GetMajorVer()); in EmitProxyCastFromMethodImplTemplate()
703 sb.AppendFormat(", version of client:%d.%d\", __func__, ", ast_->GetMajorVer(), ast_->GetMinorVer()); in EmitProxyCastFromMethodImplTemplate()
H A Dcpp_service_stub_code_emitter.cpp17 if (ast_->GetASTFileType() == ASTFileType::AST_IFACE || ast_->GetASTFileType() == ASTFileType::AST_ICALLBACK) { in ResolveDirectory()
229 const AST::TypeStringMap &types = ast_->GetTypes(); in GetSourceOtherLibInclusions()
/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_; member in OHOS::Hardware::Generator
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()
H A Dtext_gen.cpp53 auto moduleTerm = ast_->GetAstRoot()->Lookup("module", PARSEROP_CONFTERM); in Initialize()
85 auto ret = ast_->WalkBackward([this](const std::shared_ptr<AstObject> &current, int32_t) -> uint32_t { in HeaderOutputTraversal()
349 return ast_->WalkRound(forwardWalkFunc, backwardWalkFunc); in OutputImplGlobalVariables()
372 if (object == ast_->GetAstRoot()) { in ImplementCloseBraceGen()
390 if (object == ast_->GetAstRoot()) { in ImplementGenTraversal()
592 while (p != ast_->GetAstRoot()) { in HcsBuildObjectPath()
613 return ast_->WalkBackward([this](const std::shared_ptr<AstObject> &object, int32_t) -> uint32_t { in OutputTemplateImpl()
641 return ast_->WalkBackward([this](const std::shared_ptr<AstObject> &object, int32_t) -> uint32_t {
718 return ast_->WalkForward([&nodeMap](const std::shared_ptr<AstObject> &current, uint32_t) -> uint32_t {
H A Dbytecode_gen.cpp76 return ast_->WalkBackward([this](std::shared_ptr<AstObject> &object, int32_t depth) { in ByteCodeConvert()
180 Option::Instance().ShouldAlign() ? -ast_->GetAstRoot()->GetSize() : ast_->GetAstRoot()->GetSize()),
193 return ast_->WalkForward([this](std::shared_ptr<AstObject> &current, int32_t depth) {
H A Ddecompile_gen.h45 std::shared_ptr<Ast> ast_; member in OHOS::Hardware::DecompileGen
H A Dparser.h63 std::shared_ptr<Ast> ast_; member in OHOS::Hardware::Parser
H A Dmacro_gen.cpp98 return ast_->WalkBackward([this](std::shared_ptr<AstObject> &object, int32_t depth) { in TemplateNodeSeparate()
217 return ast_->WalkForward([this](std::shared_ptr<AstObject> &current, int32_t depth) {
H A Dstartup_cfg_gen.cpp229 return ast_->WalkBackward([this](std::shared_ptr<AstObject> &object, int32_t depth) { in TemplateNodeSeparate()
424 std::shared_ptr<AstObject> deviceInfo = ast_->GetAstRoot()->Lookup("device_info", PARSEROP_CONFNODE);
/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()
96 ast_->SetIdlFile(lexer_.GetFilePath()); in ParseFile()
97 ast_->SetLicense(ParseLicense()); in ParseFile()
179 ast_->SetPackageName(result.str(RE_PACKAGE_INDEX).c_str()); in ParserPackageInfo()
182 ast_->SetVersion(majorVersion, minorVersion); in ParserPackageInfo()
247 if (!ast_->AddImport(importAst)) { in ParseImportInfo()
266 seqType->SetNamespace(ast_->ParseNamespace(seqName)); in ParseSequenceableInfo()
275 ast_ in ParseSequenceableInfo()
[all...]
H A Dparser.h250 AutoPtr<AST> ast_; member in OHOS::HDI::Parser

Completed in 15 milliseconds

12