diff options
| Commit | b4bb5eb1affcf1bebc779fbfba92cbdf7fe38c8d (patch) | |
|---|---|---|
| Author | 2020-10-27 19:38:20 +0200 | |
| Committer | 2020-10-27 19:38:20 +0200 | |
| Files | ec80fa8f66ec6103fdec98448ef571a4c41ea1b9 /JSImpl | |
| IPL-b4bb5eb1affcf1bebc779fbfba92cbdf7fe38c8d.tar IPL-b4bb5eb1affcf1bebc779fbfba92cbdf7fe38c8d.tar.gz IPL-b4bb5eb1affcf1bebc779fbfba92cbdf7fe38c8d.zip | ||
| Parent | b9243748c11a6391068e6501c96040021572297d (diff) | |
Fix printing of numbers in ast printer.
1 files changed, 8 insertions, 0 deletions
| -rw-r--r-- | JSImpl/src/ASTPrinter.cpp | 8 |
diff --git a/JSImpl/src/ASTPrinter.cpp b/JSImpl/src/ASTPrinter.cpp index 7b298da..2978f4c 100644 --- a/JSImpl/src/ASTPrinter.cpp +++ b/JSImpl/src/ASTPrinter.cpp @@ -136,6 +136,7 @@ public: void Print( const char* name, const IPLString& member, bool isLast); void Print( const char* name, bool member, bool isLast); void Print( const char* name, const TokenType& member, bool isLast); + void Print( const char* name, const double& member, bool isLast); inline void Enter(); inline void Exit(); @@ -263,6 +264,13 @@ void ASTToJsonPrinter::Print(const char* name, const IPLString& member, bool isL PrepNextElement(m_Output, isLast); } +void ASTToJsonPrinter::Print(const char* name, const double& member, bool isLast) +{ + InsertIndent(); + m_Output << "\"" << name << "\": " << member; + PrepNextElement(m_Output, isLast); +} + #define MEMBERS_COUNT(type, name, def) ++membersCount; |
