From c8eb6c1a64d76dc9a1005571c4eb71ddc6d8f2a9 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 31 Dec 2017 16:39:13 -0800 Subject: 4178 --- 044space_surround.cc | 3 +-- html/044space_surround.cc.html | 40 +++++++++++++++++++--------------------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/044space_surround.cc b/044space_surround.cc index a8529adb..f3d8319c 100644 --- a/044space_surround.cc +++ b/044space_surround.cc @@ -45,8 +45,7 @@ int space_base(const reagent& x) { int space_base(const reagent& x, int space_index, int base) { if (space_index == 0) return base; - int result = space_base(x, space_index-1, get_or_insert(Memory, base+/*skip length*/1))+/*skip refcount*/1; - return result; + return space_base(x, space_index-1, get_or_insert(Memory, base+/*skip length*/1))+/*skip refcount*/1; } int space_index(const reagent& x) { diff --git a/html/044space_surround.cc.html b/html/044space_surround.cc.html index 95578028..15a6847b 100644 --- a/html/044space_surround.cc.html +++ b/html/044space_surround.cc.html @@ -15,7 +15,6 @@ body { font-size: 12pt; font-family: monospace; color: #aaaaaa; background-color a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } -.Conceal { color: #4e4e4e; } .traceContains { color: #008000; } .LineNr { color: #444444; } .Identifier { color: #c0a020; } @@ -107,26 +106,25 @@ if ('onhashchange' in window) { 44 45 int space_base(const reagent& x, int space_index, int base) { 46 if (space_index == 0) -47 ¦ return base; -48 int result = space_base(x, space_index-1, get_or_insert(Memory, base+/*skip length*/1))+/*skip refcount*/1; -49 return result; -50 } -51 -52 int space_index(const reagent& x) { -53 for (int i = 0; i < SIZE(x.properties); ++i) { -54 ¦ if (x.properties.at(i).first == "space") { -55 ¦ ¦ if (!x.properties.at(i).second || x.properties.at(i).second->right) -56 ¦ ¦ ¦ raise << maybe(current_recipe_name()) << "/space metadata should take exactly one value in '" << x.original_string << "'\n" << end(); -57 ¦ ¦ return to_integer(x.properties.at(i).second->value); -58 ¦ } -59 } -60 return 0; -61 } -62 -63 :(scenario permit_space_as_variable_name) -64 def main [ -65 space:num <- copy 0 -66 ] +47 return base; +48 return space_base(x, space_index-1, get_or_insert(Memory, base+/*skip length*/1))+/*skip refcount*/1; +49 } +50 +51 int space_index(const reagent& x) { +52 for (int i = 0; i < SIZE(x.properties); ++i) { +53 if (x.properties.at(i).first == "space") { +54 if (!x.properties.at(i).second || x.properties.at(i).second->right) +55 raise << maybe(current_recipe_name()) << "/space metadata should take exactly one value in '" << x.original_string << "'\n" << end(); +56 return to_integer(x.properties.at(i).second->value); +57 } +58 } +59 return 0; +60 } +61 +62 :(scenario permit_space_as_variable_name) +63 def main [ +64 space:num <- copy 0 +65 ] -- cgit 1.4.1-2-gfad0