summary refs log tree commit diff stats
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* bugfix: semfold supports merging of '&'Araq2012-02-191-0/+10
|
* fixes #99Araq2012-02-171-6/+7
|
* Merge branch 'master' of github.com:Araq/NimrodAraq2012-02-171-0/+6
|\
| * niminst is now able to create build files for debhelper so that .deb ↵dom962012-02-161-0/+6
| | | | | | | | packages can be created. Implemented $ in the times module for TWeekDay and TMonth.
* | bugfix:
discard """
  cmd: '''nim c -d:nimAllocStats --newruntime $file'''
  output: '''button
clicked!
(allocCount: 6, deallocCount: 6)'''
"""

import system / ansi_c

type
  Widget* = ref object of RootObj
    drawImpl: owned(proc (self: Widget))

  Button* = ref object of Widget
    caption: string
    onclick: owned(proc())

  Window* = ref object of Widget
    elements: seq[owned Widget]


proc newButton(caption: string; onclick: owned(proc())): owned Button =
  proc draw(self: Widget) =
    let b = Button(self)
    echo b.caption

  #result = Button(drawImpl: draw, caption: caption, onclick: onclick)
  new(result)
  result.drawImpl = draw
  result.caption = caption
  result.onclick = onclick

proc newWindow(): owned Window 
|
* pragma on/off improvements; endb rewrittenAraq2012-01-289-37/+55
|
* pragma blocks; fixed line information issue with user defined assertionsAraq2012-01-1710-7/+88
|
* project wide configuration file now with suffix '.nimrod.cfg'Araq2012-01-151-1/+4
|
* removed nimKeepAlive as it's not necessary with interior pointer checkingAraq2012-01-151-44/+20
|
* niminst: bugfixes; documentation changesAraq2012-01-151-1/+1
|
* bugfixes: tests are green againAraq2012-01-131-1/+2
|
* niminst: diverse improvements; fixes #80Araq2012-01-132-16/+24
|
* bugfix: endless recursion in 'semAfterMacroCall'Araq2012-01-131-0/+5
|
* bugfix: invalid indentation for 'else' is detected; optional indentation for ↵Araq2012-01-132-2/+7
| | | | 'if' expressions
* bugfix: tests/reject/tnoinst.nim is now rejected properlyAraq2012-01-133-1/+10
|
* further steps to eliminate generics bugsAraq2012-01-111-12/+19
|
* removed '^ deprecated' messageAraq2012-01-102-7/+4
|
* unsuccessful phantom bug huntingAraq2012-01-081-2/+8
|
* bugfix: command line args are processed again after config files, so that ↵Araq2012-01-081-5/+5
| | | | --verbosity:3 works again
* implicit invokation of items/pairs iteratorsAraq2012-01-082-25/+44
|
* fixes #33Araq2012-01-072-7/+12
|
* bugfix: type alias to generic; generic type not stripped away from for loop ↵Araq2012-01-074-12/+24
| | | | variable
* bugfix: removed newSons legacyAraq2012-01-073-8/+13
|
* test t99bott.nim works nowAraq2012-01-062-21/+19
|
* implemented incompleteStruct pragma; embedded debugger works with posix moduleAraq2012-01-056-12/+22
|
* bugfix: tester should compile againAraq2012-01-031-1/+1
|
* C sources regenerated for new len(openarray) header that catches more bugs; ↵Araq2012-01-031-2/+2
| | | | symbol files should work again
* year 2012 for most copyright headersAraq2012-01-0286-94/+94
|
* new len(openarray) implementationAraq2011-12-312-4/+9
|
* make trecinca|b tests greenAraq2011-12-313-3/+8
|
* critbits added to stdlibAraq2011-12-301-2/+0
|