Skip to content

Commit 52b8d86

Browse files
committed
Fix debugger (ws_after was removed)
1 parent f0475ee commit 52b8d86

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

debugger.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ inline void debug_ast(AST_Node* node, string ind = "", Env* env = 0)
6969
case Complex_Selector::ADJACENT_TO: cerr << "{+}"; break;
7070
case Complex_Selector::ANCESTOR_OF: cerr << "{ }"; break;
7171
}
72-
cerr << " <" << prettyprint(selector->pstate().token.ws_before()) << "> X <" << prettyprint(selector->pstate().token.ws_after()) << ">" << endl;
72+
cerr << " <" << prettyprint(selector->pstate().token.ws_before()) << ">" << endl;
7373
debug_ast(selector->head(), ind + " ", env);
7474
debug_ast(selector->tail(), ind + "-", env);
7575
} else if (dynamic_cast<Compound_Selector*>(node)) {
@@ -81,7 +81,7 @@ inline void debug_ast(AST_Node* node, string ind = "", Env* env = 0)
8181
<< (selector->is_optional() ? " [is_optional]": " -")
8282
<< (selector->has_line_break() ? " [line-break]": " -")
8383
<< (selector->has_line_feed() ? " [line-feed]": " -") <<
84-
" <" << prettyprint(selector->pstate().token.ws_before()) << "> X <" << prettyprint(selector->pstate().token.ws_after()) << ">" << endl;
84+
" <" << prettyprint(selector->pstate().token.ws_before()) << ">" << endl;
8585
for(auto i : selector->elements()) { debug_ast(i, ind + " ", env); }
8686
} else if (dynamic_cast<Propset*>(node)) {
8787
Propset* selector = dynamic_cast<Propset*>(node);
@@ -105,7 +105,7 @@ inline void debug_ast(AST_Node* node, string ind = "", Env* env = 0)
105105
} else if (dynamic_cast<Type_Selector*>(node)) {
106106
Type_Selector* selector = dynamic_cast<Type_Selector*>(node);
107107
cerr << ind << "Type_Selector " << selector << " <<" << selector->name() << ">>" << (selector->has_line_break() ? " [line-break]": " -") <<
108-
" <" << prettyprint(selector->pstate().token.ws_before()) << "> X <" << prettyprint(selector->pstate().token.ws_after()) << ">" << endl;
108+
" <" << prettyprint(selector->pstate().token.ws_before()) << ">" << endl;
109109
} else if (dynamic_cast<Selector_Placeholder*>(node)) {
110110

111111
Selector_Placeholder* selector = dynamic_cast<Selector_Placeholder*>(node);
@@ -187,7 +187,7 @@ inline void debug_ast(AST_Node* node, string ind = "", Env* env = 0)
187187
} else if (dynamic_cast<Comment*>(node)) {
188188
Comment* block = dynamic_cast<Comment*>(node);
189189
cerr << ind << "Comment " << block << " " << block->tabs() <<
190-
" <" << prettyprint(block->pstate().token.ws_before()) << "> X <" << prettyprint(block->pstate().token.ws_after()) << ">" << endl;
190+
" <" << prettyprint(block->pstate().token.ws_before()) << ">" << endl;
191191
debug_ast(block->text(), ind + "// ", env);
192192
} else if (dynamic_cast<If*>(node)) {
193193
If* block = dynamic_cast<If*>(node);
@@ -322,13 +322,13 @@ inline void debug_ast(AST_Node* node, string ind = "", Env* env = 0)
322322
(expression->is_delayed() ? " {delayed}" : "") <<
323323
(expression->sass_fix_1291() ? " {sass_fix_1291}" : "") <<
324324
(expression->quote_mark() != 0 ? " {qm:" + string(1, expression->quote_mark()) + "}" : "") <<
325-
" <" << prettyprint(expression->pstate().token.ws_before()) << "> X <" << prettyprint(expression->pstate().token.ws_after()) << ">" << endl;
325+
" <" << prettyprint(expression->pstate().token.ws_before()) << ">" << endl;
326326
} else if (dynamic_cast<String_Constant*>(node)) {
327327
String_Constant* expression = dynamic_cast<String_Constant*>(node);
328328
cerr << ind << "String_Constant : " << expression << " [" << prettyprint(expression->value()) << "]" <<
329329
(expression->is_delayed() ? " {delayed}" : "") <<
330330
(expression->sass_fix_1291() ? " {sass_fix_1291}" : "") <<
331-
" <" << prettyprint(expression->pstate().token.ws_before()) << "> X <" << prettyprint(expression->pstate().token.ws_after()) << ">" << endl;
331+
" <" << prettyprint(expression->pstate().token.ws_before()) << ">" << endl;
332332
} else if (dynamic_cast<String_Schema*>(node)) {
333333
String_Schema* expression = dynamic_cast<String_Schema*>(node);
334334
cerr << ind << "String_Schema " << expression << " " << expression->concrete_type() <<

environment.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ namespace Sass {
6363
else return current_frame_[key];
6464
}
6565

66+
#ifdef DEBUG
6667
void print()
6768
{
6869
for (typename map<string, T>::iterator i = current_frame_.begin(); i != current_frame_.end(); ++i) {
@@ -73,6 +74,8 @@ namespace Sass {
7374
parent_->print();
7475
}
7576
}
77+
#endif
78+
7679
};
7780
}
7881

0 commit comments

Comments
 (0)