about summary refs log blame commit diff stats
path: root/core/scripts/setup-target.sh
blob: 69b86408aafa6cc7b3855ee2fb1ce2ad556757a1 (plain) (tree)
p">; } break; } :(before "End Primitive Recipe Implementations") case ASSERT: { if (!ingredients.at(0).at(0)) { if (is_literal_text(current_instruction().ingredients.at(1))) raise << current_instruction().ingredients.at(1).name << '\n' << end(); else raise << read_mu_text(ingredients.at(1).at(0)) << '\n' << end(); if (!Hide_errors) exit(1); } break; } //: 'cheating' by using the host system :(before "End Primitive Recipe Declarations") _READ, :(before "End Primitive Recipe Numbers") put(Recipe_ordinal, "$read", _READ); :(before "End Primitive Recipe Checks") case _READ: { break; } :(before "End Primitive Recipe Implementations") case _READ: { skip_whitespace(cin); string result; if (has_data(cin)) cin >> result; products.resize(1); products.at(0).push_back(new_mu_text(result)); break; } :(code) void skip_whitespace(istream& in) { while (true) { if (!has_data(in)) break; if (isspace(in.peek())) in.get(); else break; } }