about summary refs log blame commit diff stats
path: root/theme_template
blob: b4f5b42771f93655e0cf4e39bb078dfa9879cea2 (plain) (tree)
cd2458c0 ^pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
//: Boolean primitives

:(before "End Primitive Recipe Declarations")
AND,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "and", AND);
:(before "End Primitive Recipe Checks")
case AND: {
  for (int i = 0;  i < SIZE(inst.ingredients);  ++i) {
    if (!is_mu_scalar(inst.ingredients.at(i))) {
      raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
      goto finish_checking_instruction;
    }
  }
  if (SIZE(inst.products) > 1) {
    raise << maybe(get(Recipe, r).name) << "'and' yields exactly one product in '" << inst.original_string << "'\n" << end();
    break;
  }
  if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) {
    raise << maybe(get(Recipe, r).name) << "'and' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end();
    break;
  }
  break;
}
:(before "End Primitive Recipe Implementations")
case AND: {
  bool result = true;
  for (int i = 0;  i < SIZE(ingredients);  ++i)
    result = result && ingredients.at(i).at(0);
  products.resize(1);
  products.at(0).push_back(result);
  break;
}

:(scenario and)
def main [
  1:bool <- copy 1
  2:bool <- copy 0
  3:bool <- and 1:bool, 2:bool
]
+mem: storing 0 in location 3

:(scenario and_2)
def main [
  1:bool <- and 1, 1
]
+mem: storing 1 in location 1

:(scenario and_multiple)
def main [
  1:bool <- and 1, 1, 0
]
+mem: storing 0 in location 1

:(scenario and_multiple_2)
def main [
  1:bool <- and 1, 1, 1
]
+mem: storing 1 in location 1

:(before "End Primitive Recipe Declarations")
OR,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "or", OR);
:(before "End Primitive Recipe Checks")
case OR: {
  for (int i = 0;  i < SIZE(inst.ingredients);  ++i) {
    if (!is_mu_scalar(inst.ingredients.at(i))) {
      raise << maybe(get(Recipe, r).name) << "'and' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
      goto finish_checking_instruction;
    }
  }
  if (SIZE(inst.products) > 1) {
    raise << maybe(get(Recipe, r).name) << "'or' yields exactly one product in '" << inst.original_string << "'\n" << end();
    break;
  }
  if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) {
    raise << maybe(get(Recipe, r).name) << "'or' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end();
    break;
  }
  break;
}
:(before "End Primitive Recipe Implementations")
case OR: {
  bool result = false;
  for (int i = 0;  i < SIZE(ingredients);  ++i)
    result = result || ingredients.at(i).at(0);
  products.resize(1);
  products.at(0).push_back(result);
  break;
}

:(scenario or)
def main [
  1:bool <- copy 1
  2:bool <- copy 0
  3:bool <- or 1:bool, 2:bool
]
+mem: storing 1 in location 3

:(scenario or_2)
def main [
  1:bool <- or 0, 0
]
+mem: storing 0 in location 1

:(scenario or_multiple)
def main [
  1:bool <- and 0, 0, 0
]
+mem: storing 0 in location 1

:(scenario or_multiple_2)
def main [
  1:bool <- or 0, 0, 1
]
+mem: storing 1 in location 1

:(before "End Primitive Recipe Declarations")
NOT,
:(before &
[colours]
bkgnd=
titlebar=
titlebar.text=
titlebar.brackets=
titlebar.unencrypted=
titlebar.encrypted=
titlebar.untrusted=
titlebar.trusted=
titlebar.online=
titlebar.offline=
titlebar.away=
titlebar.chat=
titlebar.dnd=
titlebar.xa=
statusbar=
statusbar.text=
statusbar.time=
statusbar.brackets=
statusbar.active=
statusbar.new=
main.text=
main.text.me=
main.text.them=
main.splash=
main.time=
input.text=
subscribed=
unsubscribed=
otr.started.trusted=
otr.started.untrusted=
otr.ended=
otr.trusted=
otr.untrusted=
online=
away=
chat=
dnd=
xa=
offline=
incoming=
mention=
trigger=
typing=
gone=
error=
roominfo=
roommention=
roommention.term=
roomtrigger=
roomtrigger.term=
me=
them=
roster.header=
roster.chat=
roster.online=
roster.away=
roster.xa=
roster.dnd=
roster.offline=
roster.chat.active=
roster.online.active=
roster.away.active=
roster.xa.active=
roster.dnd.active=
roster.offline.active=
roster.chat.unread=
roster.online.unread=
roster.away.unread=
roster.xa.unread=
roster.dnd.unread=
roster.offline.unread=
roster.room=
roster.room.unread=
roster.room.trigger=
roster.room.mention=
occupants.header=
receipt.sent=
untrusted=

[ui]
beep=
flash=
splash=
wrap=
time.console=
time.chat=
time.muc=
time.config=
time.private=
time.xmlconsole=
time.lastactivity=
time.statusbar=
privileges=
presence=
intype=
enc.warn=
resource.title=
resource.message=
statuses.console=
statuses.chat=
statuses.muc=
roster=
roster.offline=
roster.empty=
roster.by=
roster.order=
roster.unread=
roster.count=
roster.priority=
roster.size=
roster.wrap=
roster.header.char=
roster.contact.char=
roster.contact.indent=
roster.resource=
roster.resource.char=
roster.resource.indent=
roster.resource.join=
roster.presence=
roster.presence.indent=
roster.status=
roster.contacts=
roster.unsubscribed=
roster.rooms=
roster.rooms.order=
roster.rooms.unread=
roster.rooms.pos=
roster.rooms.by=
roster.rooms.char=
roster.rooms.private.char=
roster.private=
roster.private.char=
occupants=
occupants.size=
occupants.char=
occupants.jid=
occupants.wrap=
occupants.indent=
occupants.header.char=
wins.autotidy=
otr.char=
pgp.char=
omemo.char=
console.muc=
console.chat=
console.private=
inputwin.position=
class="n">before "End Primitive Recipe Implementations") case NOT: { products.resize(SIZE(ingredients)); for (int i = 0; i < SIZE(ingredients); ++i) { products.at(i).push_back(!ingredients.at(i).at(0)); } break; } :(scenario not) def main [ 1:bool <- copy 1 2:bool <- not 1:bool ] +mem: storing 0 in location 2 :(scenario not_multiple) def main [ 1:bool, 2:bool, 3:bool <- not 1, 0, 1 ] +mem: storing 0 in location 1 +mem: storing 1 in location 2 +mem: storing 0 in location 3