about summary refs log tree commit diff stats
path: root/wiki/lib/styles/print.css
blob: a5c39e8894ed83e90d4d4466628fb0728dea4695 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Basic print styles. These styles are needed for basic DokuWiki functions
 * regardless of the used template. Templates can override them of course
 */

div.error, /* messages with msg() */
div.info,
div.success,
div.notify,
.secedit, /* section edit button */
.a11y, /* accessibly hidden text */
.JSpopup, /* modal windows */
#link__wiz {
    display: none;
}
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 */
discard """
  output: '''
10
assigning z = 20
reading field y
20
call to y
dot call
no params call to a
100
no params call to b
100
one param call to c with 10
100'''
"""

type
  T1 = object
    x*: int

  TD = distinct T1

  T2 = object
    x: int

proc `.`*(v: T1, f: string): int =
  echo "reading field ", f
  return v.x

proc `.=`(x: var T1, f: string{lit}, v: int) =
  echo "assigning ", f, " = ", v
  x.x = v

template `.()`(x: T1, f: string, args: varargs[expr]): string =
  echo "call to ", f
  "dot call"

echo ""

var t = T1(x: 10)

echo t.x
t.z = 20
echo t.y
echo t.y()

var d = TD(t)
assert(not compiles(d.y))

proc `.`(v: T2, f: string): int =
  echo "no params call to ", f
  return v.x

proc `.`*(v: T2, f: string, a: int): int =
  echo "one param call to ", f, " with ", a
  return v.x

var tt = T2(x: 100)

echo tt.a
echo tt.b()
echo tt.c(10)

assert(not compiles(tt.d("x")))
assert(not compiles(tt.d(1, 2)))