diff options
| -rw-r--r-- | src/yuescript/yue_compiler.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index 9891e79..f67e921 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
| @@ -7989,6 +7989,19 @@ private: | |||
| 7989 | transformFor(forNode, temp); | 7989 | transformFor(forNode, temp); |
| 7990 | break; | 7990 | break; |
| 7991 | } | 7991 | } |
| 7992 | case id<YueComment_t>(): { | ||
| 7993 | if (_config.reserveComment) { | ||
| 7994 | auto comment = static_cast<YueComment_t*>(item); | ||
| 7995 | temp.push_back(indent() + comment->to_string(&_config) + nl(item)); | ||
| 7996 | } | ||
| 7997 | break; | ||
| 7998 | } | ||
| 7999 | case id<EmptyLine_t>(): { | ||
| 8000 | if (_config.reserveComment) { | ||
| 8001 | temp.push_back(nl(item)); | ||
| 8002 | } | ||
| 8003 | break; | ||
| 8004 | } | ||
| 7992 | case id<VariablePair_t>(): | 8005 | case id<VariablePair_t>(): |
| 7993 | case id<VariablePairDef_t>(): { | 8006 | case id<VariablePairDef_t>(): { |
| 7994 | if (auto pair = ast_cast<VariablePairDef_t>(item)) { | 8007 | if (auto pair = ast_cast<VariablePairDef_t>(item)) { |
