summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
Commit message (Expand)AuthorAgeFilesLines
...
* [refactoring] compiler: simplified markUsedAndreas Rumpf2019-08-081-36/+36
* fixes #11809Andreas Rumpf2019-08-081-15/+32
* int128 on firstOrd, lastOrd and lengthOrd (#11701)Arne Döring2019-08-071-5/+5
* revert changesAndrii Riabushenko2019-07-251-2/+2
* fixes #11826Andrii Riabushenko2019-07-251-2/+2
* revert the bugfix for #11747 as it really was a new, poorly though-out featureAraq2019-07-191-3/+0
* Merge branch 'devel' into araq-detect-unused-importsAndreas Rumpf2019-07-181-0/+3
|\
| * fixes #11747Andreas Rumpf2019-07-171-0/+3
* | warn about unused imports; fixes an 'export' regression [nobackport]Andreas Rumpf2019-07-181-3/+3
* | [feature] detect unused importsAraq2019-07-171-17/+20
|/
* make 'koch temp' work againAraq2019-07-141-11/+15
* styleCheck: make the compiler and large parts of the stdlib compatible with -...Araq2019-07-101-4/+4
* bugfix: allow type conversions between 'owned ref' typesAraq2019-07-091-1/+5
* Offsetof fixes (#11690)Arne Döring2019-07-091-9/+3
* fixes #11515 (#11624)Andreas Rumpf2019-07-011-2/+5
* fixes #11600Araq2019-06-261-1/+1
* [feature] cleanup PR, refs #11424Araq2019-06-191-5/+6
* literal array indices (#11424)Jasper Jenkins2019-06-181-4/+19
* [refactoring] liftdestructors is now a module of its ownAraq2019-06-121-5/+5
* Remove immediate pragma (#11308)Arne Döring2019-05-291-10/+2
* fixes #11187 (#11315)Andreas Rumpf2019-05-241-2/+3
* fixes #8568 (#11303)Andreas Rumpf2019-05-221-0/+4
* fixes #7167 (#11300)Andreas Rumpf2019-05-221-2/+1
* Allow void macro result (#11286)Arne Döring2019-05-211-1/+1
* More specific error message for unsupported recursion in iterators (#11283)Ico Doornekamp2019-05-201-1/+1
* Tuple error message (#11141); fixes #3211Arne Döring2019-05-151-17/+24
* fixes #88 (#11243)Andreas Rumpf2019-05-151-2/+2
* Iterator fixes (#11234)Jasper Jenkins2019-05-131-4/+10
* rename tyExpr/tyStmt to tyUntyped/tyTyped (#11227)Arne Döring2019-05-111-3/+3
* Make range checks in semConv (#7164)Oscar Nihlgård2019-05-101-16/+37
* Replace countup(x, y) with x .. yClyybber2019-05-071-2/+2
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-23/+23
* low/high for float ranges (#11177)Oscar Nihlgård2019-05-061-1/+1
* fixes #11175Araq2019-05-051-1/+3
* Fixes #11045. Assigning a proc to const and invoking. (#11076)Aditya Siram2019-05-041-4/+8
* decent borrow check for --newruntimeAraq2019-05-021-6/+35
* fixes #11114Araq2019-05-021-1/+5
* fixes #11073Araq2019-04-221-2/+4
* revert discardable transformation (#10905)Andreas Rumpf2019-04-211-2/+2
* sem'check understands 'owned procs'Araq2019-04-111-6/+16
* makes koch.nim sem'check with --newruntimeAraq2019-04-061-1/+1
* fixes unowned->owned conversion ruleAndreas Rumpf2019-04-061-1/+1
* remove check for better error message (#10926)Arne Döring2019-03-291-3/+0
* newruntime: bugfixesAndreas Rumpf2019-03-251-0/+3
* more destructor based changes (#10885)Andreas Rumpf2019-03-231-3/+3
* fixes #10807 (#10814)cooldome2019-03-121-2/+5
* fixes the regressionAndreas Rumpf2019-03-071-1/+2
* owned refs must be movedAndreas Rumpf2019-03-071-0/+1
* better error message for 'owned'Andreas Rumpf2019-03-051-1/+2
* special typing rules for owned pointersAndreas Rumpf2019-03-041-0/+4
efault, tcell.ColorRed) return &AccountView{ acct: acct, grid: grid, host: host, logger: logger, } } dirlist := NewDirectoryList(acct, &conf.Ui, logger, worker) if conf.Ui.SidebarWidth > 0 { grid.AddChild(ui.NewBordered(dirlist, ui.BORDER_RIGHT)) } msglist := NewMessageList(conf, logger) grid.AddChild(msglist).At(0, 1) view := &AccountView{ acct: acct, conf: conf, dirlist: dirlist, grid: grid, host: host, logger: logger, msglist: msglist, worker: worker, } go worker.Backend.Run() worker.PostAction(&types.Configure{Config: acct}, nil) worker.PostAction(&types.Connect{}, view.connected) host.SetStatus("Connecting...") return view } func (acct *AccountView) Tick() bool { if acct.worker == nil { return false } select { case msg := <-acct.worker.Messages: msg = acct.worker.ProcessMessage(msg) acct.onMessage(msg) return true default: return false } } func (acct *AccountView) AccountConfig() *config.AccountConfig { return acct.acct } func (acct *AccountView) Worker() *types.Worker { return acct.worker } func (acct *AccountView) Logger() *log.Logger { return acct.logger } func (acct *AccountView) Name() string { return acct.acct.Name } func (acct *AccountView) Children() []ui.Drawable { return acct.grid.Children() } func (acct *AccountView) OnInvalidate(onInvalidate func(d ui.Drawable)) { acct.grid.OnInvalidate(func(_ ui.Drawable) { onInvalidate(acct) }) } func (acct *AccountView) Invalidate() { acct.grid.Invalidate() } func (acct *AccountView) Draw(ctx *ui.Context) { acct.grid.Draw(ctx) } func (acct *AccountView) Focus(focus bool) { // TODO: Unfocus children I guess } func (acct *AccountView) connected(msg types.WorkerMessage) { switch msg.(type) { case *types.Done: acct.host.SetStatus("Listing mailboxes...") acct.logger.Println("Listing mailboxes...") acct.dirlist.UpdateList(func(dirs []string) { var dir string for _, _dir := range dirs { if _dir == acct.acct.Default { dir = _dir break } } if dir == "" && len(dirs) > 0 { dir = dirs[0] } if dir != "" { acct.dirlist.Select(dir) } acct.logger.Println("Connected.") acct.host.SetStatus("Connected.") }) } } func (acct *AccountView) Directories() *DirectoryList { return acct.dirlist } func (acct *AccountView) Messages() *MessageList { return acct.msglist } func (acct *AccountView) Store() *lib.MessageStore { return acct.msglist.Store() } func (acct *AccountView) SelectedAccount() *AccountView { return acct } func (acct *AccountView) SelectedMessage() (*models.MessageInfo, error) { if len(acct.msglist.Store().Uids()) == 0 { return nil, errors.New("no message selected") } return acct.msglist.Selected(), nil } func (acct *AccountView) SelectedMessagePart() *PartInfo { return nil } func (acct *AccountView) onMessage(msg types.WorkerMessage) { switch msg := msg.(type) { case *types.Done: switch msg.InResponseTo().(type) { case *types.OpenDirectory: if store, ok := acct.dirlist.SelectedMsgStore(); ok { // If we've opened this dir before, we can re-render it from // memory while we wait for the update and the UI feels // snappier. If not, we'll unset the store and show the spinner // while we download the UID list. acct.msglist.SetStore(store) } else { acct.msglist.SetStore(nil) } case *types.CreateDirectory: acct.dirlist.UpdateList(nil) } case *types.DirectoryInfo: if store, ok := acct.dirlist.MsgStore(msg.Info.Name); ok { store.Update(msg) } else { store = lib.NewMessageStore(acct.worker, msg.Info, func(msg *models.MessageInfo) { acct.conf.Triggers.ExecNewEmail(acct.acct, acct.conf, msg) }) acct.dirlist.SetMsgStore(msg.Info.Name, store) store.OnUpdate(func(_ *lib.MessageStore) { store.OnUpdate(nil) acct.msglist.SetStore(store) }) } case *types.DirectoryContents: if store, ok := acct.dirlist.SelectedMsgStore(); ok { store.Update(msg) } case *types.FullMessage: if store, ok := acct.dirlist.SelectedMsgStore(); ok { store.Update(msg) } case *types.MessageInfo: if store, ok := acct.dirlist.SelectedMsgStore(); ok { store.Update(msg) } case *types.MessagesDeleted: if store, ok := acct.dirlist.SelectedMsgStore(); ok { store.Update(msg) } case *types.Error: acct.logger.Printf("%v", msg.Error) acct.host.SetStatus(fmt.Sprintf("%v", msg.Error)). Color(tcell.ColorDefault, tcell.ColorRed) } }