X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flily-parser.cc;h=cec4893d8db0b9cab96c0404e34cecf088bf28c7;hb=c3cd1737b2a12a4f51b4090caf12429cb34290d1;hp=8159c3dae7ca677c01324bad4632a3317b5bb200;hpb=4778c7326d726f50f6ac541322006d6b90795945;p=lilypond.git diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index 8159c3dae7..cec4893d8d 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2011 Han-Wen Nienhuys + Copyright (C) 1997--2012 Han-Wen Nienhuys Jan Nieuwenhuizen LilyPond is free software: you can redistribute it and/or modify @@ -156,7 +156,7 @@ Lily_parser::parse_string (string ly_code) SCM Lily_parser::parse_string_expression (string ly_code, string filename, - int line) + int line) { // TODO: use $parser lexer_->set_identifier (ly_symbol2scm ("parser"), @@ -165,15 +165,16 @@ Lily_parser::parse_string_expression (string ly_code, string filename, lexer_->main_input_name_ = filename; lexer_->is_main_input_ = true; lexer_->new_input (lexer_->main_input_name_, ly_code, sources_); - if (line) { - lexer_->get_source_file ()->set_line (0, line); - } + if (line) + { + lexer_->get_source_file ()->set_line (0, line); + } SCM mod = lexer_->set_current_scope (); lexer_->push_extra_token (EMBEDDED_LILY); do_yyparse (); SCM result = lexer_->lookup_identifier_symbol (ly_symbol2scm ("parseStringResult")); // parseStringResult is set in the grammar rule for embedded_lilypond - + scm_set_current_module (mod); error_level_ = error_level_ | lexer_->error_level_;