From ee6a21cede4cfe6773afc4985d298e3841dde370 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 4 Oct 2016 09:36:14 -0700 Subject: 3440 --- 011load.cc | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to '011load.cc') diff --git a/011load.cc b/011load.cc index cc329b5c..d575c706 100644 --- a/011load.cc +++ b/011load.cc @@ -215,30 +215,6 @@ void skip_comment(istream& in) { } } -//: Warn if a recipe gets redefined, because large codebases can accidentally -//: step on their own toes. But there'll be many occasions later where -//: we'll want to disable the errors. -:(before "End Globals") -bool Disable_redefine_checks = false; -:(before "End Setup") -Disable_redefine_checks = false; -:(code) -bool should_check_for_redefine(const string& recipe_name) { - if (Disable_redefine_checks) return false; - return true; -} - -// for debugging -:(code) -void show_rest_of_stream(istream& in) { - cerr << '^'; - char c; - while (in >> c) - cerr << c; - cerr << "$\n"; - exit(0); -} - :(scenario recipe_instead_of_def) recipe main [ 1:number <- copy 23 @@ -364,6 +340,19 @@ void test_parse_comment_terminated_by_eof() { cerr << "."; // termination = success } +//: Warn if a recipe gets redefined, because large codebases can accidentally +//: step on their own toes. But there'll be many occasions later where +//: we'll want to disable the errors. +:(before "End Globals") +bool Disable_redefine_checks = false; +:(before "End Setup") +Disable_redefine_checks = false; +:(code) +bool should_check_for_redefine(const string& recipe_name) { + if (Disable_redefine_checks) return false; + return true; +} + :(scenario warn_on_missing_space_before_bracket) % Hide_errors = true; def main[ @@ -390,3 +379,14 @@ def! main [ ] -error: redefining recipe main $error: 0 + +:(code) +// for debugging +void show_rest_of_stream(istream& in) { + cerr << '^'; + char c; + while (in >> c) + cerr << c; + cerr << "$\n"; + exit(0); +} -- cgit 1.4.1-2-gfad0 ss='right' method='get' action='/akkartik/mu/log/html/112read-byte.subx.html'>
path: root/html/112read-byte.subx.html
blob: 4236360235df75c1501cc1821941519a52b98f01 (plain) (tree)
1
2
3
4
5
6
7
8
9