diff --git a/tools/hc-gen/Makefile b/tools/hc-gen/Makefile index 9ee07ed59f96c1e989eb5c723a413832dd4073bc..34ee1fbc1e4463e3a2c604dbd6e51464645d482f 100644 --- a/tools/hc-gen/Makefile +++ b/tools/hc-gen/Makefile @@ -22,6 +22,7 @@ $(OBJECTS): $(BUILD_DIR)/%.o : %.cpp $(Q) $(CXX) $(CXX_FLAGS) $(CXX_LD_FLAGS) -c $< -o $@ $(TARGET): $(OBJECTS) + $(Q) echo built $@ $(Q) $(CXX) $(CXX_FLAGS) $(CXX_LD_FLAGS) $^ -o $@ test: $(TARGET) diff --git a/tools/hc-gen/src/ast.h b/tools/hc-gen/src/ast.h index fb37bbfe130967f40bf5b4e3574be61ad67a1648..543483391dd3ddf65811ccdcc1304bef5ec042f4 100644 --- a/tools/hc-gen/src/ast.h +++ b/tools/hc-gen/src/ast.h @@ -434,6 +434,10 @@ private: bool redefineChecked_; }; +std::ostream& operator<<(std::ostream &s, const AstObject &obj); +std::ostream& operator<<(std::ostream &s, const ConfigNode &obj); +std::ostream& operator<<(std::ostream &s, const ConfigTerm &obj); + } // Hardware } // OHOS diff --git a/tools/hc-gen/src/lexer.h b/tools/hc-gen/src/lexer.h index 2fe69958660fd46420bb8827a848e40f7ac1b13f..adbc063fea24636a712f0cfab425ca2406a3013c 100644 --- a/tools/hc-gen/src/lexer.h +++ b/tools/hc-gen/src/lexer.h @@ -76,6 +76,8 @@ private: int32_t lineLoc_; }; +std::ostream& operator<<(std::ostream &s, const Lexer &lexer); + } // Hardware } // OHOS diff --git a/tools/hc-gen/src/token.h b/tools/hc-gen/src/token.h index 80c16d2552a0abb77228a6bfa1a005acbd66d1d7..cd27c22f7f8a04d2aeab9d0708d2632d47e5e795 100644 --- a/tools/hc-gen/src/token.h +++ b/tools/hc-gen/src/token.h @@ -42,6 +42,8 @@ struct Token { friend std::ostream &operator<<(std::ostream &stream, const Token &t); }; +std::ostream& operator<<(std::ostream &s, const Token &t); + std::string TokenType2String(int32_t type); } // Hardware