| Commit message (Expand) | Author | Age | Files | Lines |
* | Markdown code blocks part 5 (#20236) | Andrey Makarov | 2022-08-17 | 1 | -1/+2 |
* | Improve Markdown code blocks & start moving docs to Markdown style (#19954) | Andrey Makarov | 2022-07-15 | 1 | -0/+0 |
* | turn on syntax highlighting in Manual & Tutorial (#17692) | Andrey Makarov | 2021-04-11 | 1 | -0/+1 |
* | RST backtick refactor (all *.rst except manual.rst and rst_examples.rst) (#17... | quantimnot | 2021-03-18 | 1 | -5/+7 |
* | Massive documentation fixes + copy editing (#15747) | Yanis Zafirópulos | 2020-10-29 | 1 | -1/+1 |
* | deviated -> derived (#12846) [backport] | Mark | 2019-12-08 | 1 | -3/+3 |
* | improve documentation for 'var T return values'; refs #7373 | Andreas Rumpf | 2018-04-21 | 1 | -0/+20 |
* | merge the different manual/*.rst include files. Was too hard to find the corr... | Andreas Rumpf | 2018-04-14 | 24 | -8010/+0 |
* | Cpp codegen: handling of imported exceptions. Fixes #3571 (#7360) | cooldome | 2018-04-10 | 1 | -0/+22 |
* | added the 'x.p[:T]' notation for explicit generic instantiations in combinati... | Araq | 2018-04-06 | 3 | -37/+38 |
* | fix small typo in the documentation (#7411) | Abhishek | 2018-03-26 | 1 | -2/+2 |
* | Fix #7304 by clarifying integer width in manual (#7319) | twetzel59 | 2018-03-17 | 1 | -2/+4 |
* | fixes #7247 | Andreas Rumpf | 2018-02-23 | 1 | -26/+0 |
* | fixes the RST in the manual | Andreas Rumpf | 2018-02-04 | 1 | -1/+1 |
* | Merge branch 'devel' into araq-overloading-symmetry | Andreas Rumpf | 2018-02-03 | 1 | -3/+3 |
|\ |
|
| * | manual: do not mention the VTable types which are not implemented yet | Andreas Rumpf | 2018-02-02 | 1 | -44/+45 |
| * | Fix the names of the float checks pragmas. (#7170) | konqoro | 2018-02-01 | 1 | -3/+3 |
* | | better type inference for numerical types; prerequisitive for version 1 | Andreas Rumpf | 2018-02-02 | 1 | -0/+29 |
* | | manual: do not mention the VTable types which are not implemented yet | Andreas Rumpf | 2018-02-02 | 1 | -44/+45 |
|/ |
|
* | fixes #7089 | Andreas Rumpf | 2018-01-24 | 1 | -4/+6 |
* | Mention lack of js support in closure iterator limitations (#7110) | Mathias Stearn | 2018-01-19 | 1 | -0/+1 |
* | Implement custom annotations (#6987) | cooldome | 2018-01-09 | 1 | -0/+67 |
* | Add compile-time paragraph to manual | Zach Smith | 2017-12-30 | 1 | -0/+ass="p">(before "End Primitive Recipe Declarations")
RESTORE,
:(before "End Primitive Recipe Numbers")
Recipe_ordinal["restore"] = RESTORE;
:(before "End Primitive Recipe Implementations")
case RESTORE: {
if (SIZE(ingredients) != 1) {
raise << current_recipe_name() << ": 'restore' requires exactly one ingredient, but got " << current_instruction().to_string() << '\n' << end();
break;
}
string filename;
if (is_literal_string(current_instruction().ingredients.at(0))) {
filename = current_instruction().ingredients.at(0).name;
}
else if (is_mu_string(current_instruction().ingredients.at(0))) {
filename = read_mu_string(ingredients.at(0).at(0));
}
else {
raise << current_recipe_name() << ": first ingredient of 'restore' should be a string, but got " << current_instruction().ingredients.at(0).to_string() << '\n' << end();
break;
}
if (Current_scenario) break; // do nothing in tests
string contents = slurp("lesson/"+filename);
products.resize(1);
if (contents.empty())
products.at(0).push_back(0);
else
products.at(0).push_back(new_mu_string(contents));
break;
}
:(code)
string slurp(const string& filename) {
//? cerr << filename << '\n'; //? 1
ostringstream result;
ifstream fin(filename.c_str());
fin.peek();
if (!fin) return result.str(); // don't bother checking errno
const int N = 1024;
char buf[N];
while (!fin.eof()) {
bzero(buf, N);
fin.read(buf, N-1); // leave at least one null
result << buf;
}
fin.close();
//? cerr << "=> " << result.str(); //? 1
return result.str();
}
:(before "End Primitive Recipe Declarations")
SAVE,
:(before "End Primitive Recipe Numbers")
Recipe_ordinal["save"] = SAVE;
:(before "End Primitive Recipe Implementations")
case SAVE: {
if (SIZE(ingredients) != 2) {
raise << current_recipe_name() << ": 'save' requires exactly two ingredients, but got " << current_instruction().to_string() << '\n' << end();
break;
}
if (Current_scenario) break; // do nothing in tests
string filename;
if (is_literal_string(current_instruction().ingredients.at(0))) {
filename = current_instruction().ingredients.at(0).name;
}
else if (is_mu_string(current_instruction().ingredients.at(0))) {
filename = read_mu_string(ingredients.at(0).at(0));
}
else {
raise << current_recipe_name() << ": first ingredient of 'save' should be a string, but got " << current_instruction().ingredients.at(0).to_string() << '\n' << end();
break;
}
if (!scalar(ingredients.at(1))) {
raise << current_recipe_name() << ": second ingredient of 'save' should be an address:array:character, but got " << current_instruction().ingredients.at(1).to_string() << '\n' << end();
break;
}
ofstream fout(("lesson/"+filename).c_str());
string contents = read_mu_string(ingredients.at(1).at(0));
fout << contents;
fout.close();
if (!exists("lesson/.git")) break;
// bug in git: git diff -q messes up --exit-code
// explicitly say '--all' for git 1.9
int status = system("cd lesson; git add --all .; git diff HEAD --exit-code >/dev/null || git commit -a -m . >/dev/null");
if (status != 0)
raise << "error in commit: contents " << contents << '\n' << end();
break;
}
:(code)
bool exists(const string& filename) {
struct stat dummy;
return 0 == stat(filename.c_str(), &dummy);
}
string to_string(long long int x) {
ostringstream tmp;
tmp << x;
return tmp.str();
}
:(before "End Includes")
#include<sys/stat.h>
|