about summary refs log tree commit diff stats
path: root/055parse_tree.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-12-02 17:11:58 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-12-02 17:11:58 -0800
commit1f7e3c056ce0ea71e1337579b24e8fd1ad26abac (patch)
treecebdec305552bdf180f3f0db5518a69c2a086857 /055parse_tree.cc
parentf8997ec06c0cdda1a16c5d99f96c447ce6809185 (diff)
downloadmu-1f7e3c056ce0ea71e1337579b24e8fd1ad26abac.tar.gz
2614 - still fixing bugs with missing '['
When skipping past some text (usually whitespace, but also commas and
comments) I need to always be aware of whether it's ok to switch to the
next line or not.
Diffstat (limited to '055parse_tree.cc')
-rw-r--r--055parse_tree.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/055parse_tree.cc b/055parse_tree.cc
index ef9cf4e1..33537344 100644
--- a/055parse_tree.cc
+++ b/055parse_tree.cc
@@ -28,7 +28,7 @@ string_tree* parse_string_tree(const string& s) {
 }
 
 string_tree* parse_string_tree(istream& in) {
-  skip_whitespace(in);
+  skip_whitespace_but_not_newline(in);
   if (!has_data(in)) return NULL;
   if (in.peek() == ')') {
     in.get();
@@ -44,8 +44,7 @@ string_tree* parse_string_tree(istream& in) {
   while (in.peek() != ')') {
     assert(has_data(in));
     *curr = new string_tree("");
-    skip_whitespace(in);
-    skip_ignored_characters(in);
+    skip_whitespace_but_not_newline(in);
     if (in.peek() == '(')
       (*curr)->left = parse_string_tree(in);
     else