summary refs log tree commit diff stats
path: root/doc/filelist.txt
Commit message (Expand)AuthorAgeFilesLines
* Fix Typos in Internal Docs (#11735) [ci skip]Tristano Ajmone2019-07-151-2/+2
* fixes #2559Araq2015-09-101-2/+2
* Nimrod renamed to NimAraq2014-08-281-5/+5
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
* bugfix: proper return types for templatesAraq2011-06-151-1/+2
* got rid of some arcane module namesAraq2011-04-211-9/+4
* fixed pango/pangoutils new wrappersAndreas Rumpf2010-02-261-0/+0
* continued work on html/xmlparserrumpf_a@web.de2010-02-141-0/+0
* fixed typos in documentationAndreas Rumpf2009-11-151-2/+2
* version 0.8.2rumpf_a@web.de2009-10-211-1/+2
* added tools and web dirsAndreas Rumpf2009-09-151-0/+0
* version 0.7.8Andreas Rumpf2009-05-081-0/+2
* version 0.7.6Andreas Rumpf2009-04-221-1/+2
* version 0.7.4Andreas Rumpf2009-01-071-41/+54
* version 0.7.0Andreas Rumpf2008-11-161-6/+3
* first releaseRumpf2008-06-231-0/+0
* Initial importAndreas Rumpf2008-06-221-0/+44
ld } /* 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 */
discard """
  cmd: "nim c --gc:arc $file"
  nimout: '''(a: true, n: doAssert)
Table[system.string, trepr.MyType](data: @[], counter: 0)
nil
'''
  output: '''
nil
2
Obj(member: ref @["hello"])
ref (member: ref @["hello"])
ObjUa(v: 0, a: [...])
'''
"""

# xxx consider merging with `tests/stdlib/trepr.nim` to increase overall test coverage

import tables

type
  NimSym = distinct NimNode
  MyType = tuple
    a: bool
    n: NimSym

proc myproc(t: MyType) =
  echo repr(t)

proc myproc2(t: MyType) =
  var x = Table[string, t]()
  echo repr(x)

proc myproc3(t: MyType) =
  var x: TableRef[string, t]
  echo repr(x)


macro dumpSym(a: typed) =
  myproc((a: true, n: NimSym(a)))
  myproc2((a: true, n: NimSym(a)))
  myproc3((a: true, n: NimSym(a)))

dumpSym(doAssert)

# bug 13731

import os
var a: File
echo repr a

# bug 13872

echo repr(2'u16)

# bug 14270

type
  Obj = ref object
    member: ref seq[string]

var c = Obj(member: new seq[string])
c.member[] = @["hello"]
echo c.repr

var c2 = new tuple[member: ref seq[string]]
c2.member = new seq[string]
c2.member[] = @["hello"]
echo c2.repr

proc p2 =
  echo "hey"

discard repr p2


#####################################################################
# bug #15043

import macros

macro extract(): untyped =
  result = newStmtList()
  var x: seq[tuple[node: NimNode]]

  proc test(n: NimNode) {.closure.} =
    x.add (node: n)
  
  test(parseExpr("discard"))
  
extract()

type
  ObjUa = ref object
    v: int
    a: UncheckedArray[char]

echo ObjUa().repr