summary refs log tree commit diff stats
path: root/compiler/semtempl.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes regression: NimForum compiles againAraq2015-09-211-24/+61
|
* Merge branch 'devel' into fix_bracket_exprAraq2015-09-121-0/+11
|\
| * fixes some regressionsAraq2015-09-121-0/+11
| |
| * fixes #1528Araq2015-09-121-24/+1
| |
* | first attempt to fix 'a[i]' handling in genericsAraq2015-09-121-0/+51
| |
* | fixes #1528Araq2015-09-101-24/+1
|/
* fixes #2670Araq2015-08-081-4/+19
|
* minor refactoring for big fixes to comeAraq2015-07-241-3/+7
|
* fixes #1738Araq2015-07-221-1/+1
|
* don't store the scope for routinesAraq2015-04-041-1/+1
|
* fixes #2390Araq2015-03-231-53/+59
|
* fixes #2215Araq2015-02-251-1/+1
|
* Fix typosFederico Ceratto2015-02-151-1/+1
|
* Fix typosFederico Ceratto2015-02-151-2/+2
|
* nimsuggest improvementsAraq2015-01-301-3/+7
|
* fixes #1915Araq2015-01-121-3/+12
|
* Happy new year!Guillaume Gelin2015-01-061-1/+1
|
* fixes #940Araq2014-11-171-1/+2
|
* nimfix improvementsAraq2014-09-101-4/+2
|
* 'pretty' command does not exist anymore; improvements for nimfixAraq2014-09-101-1/+15
|
* updated the compiler to use the new symbol namesAraq2014-08-281-3/+3
|
* Nimrod renamed to NimAraq2014-08-281-1/+1
|
* fixes #1285Araq2014-06-301-1/+1
|
* Renamed considerAccents to considerQuotedIdentClay Sweetser2014-05-261-2/+2
|
* Renamed 'considerAcc' to 'considerAccents' for clarityClay Sweetser2014-05-241-2/+2
| | | | | Added documentation string to 'considerAccents' Modified renderParamType's assertion to allow nkAcc nodes.
* propagate semExpr flags in macro/template expansionZahary Karadjov2014-04-061-2/+2
|
* fixes #880Araq2014-04-011-14/+20
|
* fixes tmemit regressionAraq2014-03-261-0/+14
|
* fixes #1025; don't know what this breaksAraq2014-03-261-2/+0
|
* fixes #993Araq2014-03-131-1/+7
|
* fix #909Zahary Karadjov2014-03-091-1/+3
|
* split the inline and closure iterators into different symbol kinds for ↵Zahary Karadjov2014-03-061-2/+2
| | | | easier discrimination between them
* 'inject' for the new symbol binding rules in templatesAraq2014-01-191-7/+19
|
* Templates will pick the candidate in the nearest scope when symbols are mixed-inZahary Karadjov2013-12-311-0/+1
|
* case consistency: next stepsAraq2013-12-291-2/+2
|
* case consistency part 4Araq2013-12-271-27/+27
|
* case consistency part 1Araq2013-12-271-2/+2
|
* bootstraps with new template symbol binding rulesAraq2013-12-241-8/+8
|
* attempt to merge newtemplAraq2013-12-241-1/+3
|
* 'bind' default for clean templatesAraq2013-05-151-3/+44
|
* Merge branch 'master' of github.com:Araq/NimrodAraq2013-05-141-10/+9
|\
| * final fixes giving us a working compilerZahary Karadjov2013-05-121-3/+2
| |
| * get rid of the SymTab* procs in astalgoZahary Karadjov2013-05-121-1/+1
| |
| * switch to a linked list of scopesZahary Karadjov2013-05-111-6/+6
| |
* | 'inject' for 'for' loop variablesAraq2013-05-141-18/+26
| |
* | todo.txt changesAraq2013-05-111-3/+14
|/
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
|
* allow 'mixin' in genericsAraq2012-10-121-23/+0
|
* bugfix: gensym in rofilesAraq2012-10-051-1/+2
|
* proc bodies can be expressions with a typeAraq2012-09-221-0/+23
|
n>== IsViewable) manage(wins[i], &wa); } } if(wins) XFree(wins); } static void setup() { int i, j; unsigned int mask; Window w; XModifierKeymap *modmap; XSetWindowAttributes wa; /* init atoms */ wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32, PropModeReplace, (unsigned char *) netatom, NetLast); /* init cursors */ cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr); cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing); cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); modmap = XGetModifierMapping(dpy); for (i = 0; i < 8; i++) { for (j = 0; j < modmap->max_keypermod; j++) { if(modmap->modifiermap[i * modmap->max_keypermod + j] == XKeysymToKeycode(dpy, XK_Num_Lock)) numlockmask = (1 << i); } } XFree(modmap); wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask | EnterWindowMask | LeaveWindowMask; wa.cursor = cursor[CurNormal]; XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); grabkeys(); initrregs(); for(ntags = 0; tags[ntags]; ntags++); seltag = emallocz(sizeof(Bool) * ntags); seltag[0] = True; /* style */ dc.norm[ColBG] = getcolor(NORMBGCOLOR); dc.norm[ColFG] = getcolor(NORMFGCOLOR); dc.sel[ColBG] = getcolor(SELBGCOLOR); dc.sel[ColFG] = getcolor(SELFGCOLOR); dc.status[ColBG] = getcolor(STATUSBGCOLOR); dc.status[ColFG] = getcolor(STATUSFGCOLOR); setfont(FONT); bmw = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL); sx = sy = 0; sw = DisplayWidth(dpy, screen); sh = DisplayHeight(dpy, screen); mw = (sw * MASTERW) / 100; bx = by = 0; bw = sw; dc.h = bh = dc.font.height + 2; wa.override_redirect = 1; wa.background_pixmap = ParentRelative; wa.event_mask = ButtonPressMask | ExposureMask; barwin = XCreateWindow(dpy, root, bx, by, bw, bh, 0, DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); XDefineCursor(dpy, barwin, cursor[CurNormal]); XMapRaised(dpy, barwin); dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen)); dc.gc = XCreateGC(dpy, root, 0, 0); XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); strcpy(stext, "dwm-"VERSION); } /* * Startup Error handler to check if another window manager * is already running. */ static int xerrorstart(Display *dsply, XErrorEvent *ee) { otherwm = True; return -1; } /* extern */ int getproto(Window w) { int i, format, protos, status; unsigned long extra, res; Atom *protocols, real; protos = 0; status = XGetWindowProperty(dpy, w, wmatom[WMProtocols], 0L, 20L, False, XA_ATOM, &real, &format, &res, &extra, (unsigned char **)&protocols); if(status != Success || protocols == 0) return protos; for(i = 0; i < res; i++) if(protocols[i] == wmatom[WMDelete]) protos |= PROTODELWIN; free(protocols); return protos; } void sendevent(Window w, Atom a, long value) { XEvent e; e.type = ClientMessage; e.xclient.window = w; e.xclient.message_type = a; e.xclient.format = 32; e.xclient.data.l[0] = value; e.xclient.data.l[1] = CurrentTime; XSendEvent(dpy, w, False, NoEventMask, &e); XSync(dpy, False); } void quit(Arg *arg) { readin = running = False; } /* * There's no way to check accesses to destroyed windows, thus those cases are * ignored (especially on UnmapNotify's). Other types of errors call Xlibs * default error handler, which calls exit(). */ int xerror(Display *dpy, XErrorEvent *ee) { if(ee->error_code == BadWindow || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch) || (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable) || (ee->request_code == X_PolyFillRectangle && ee->error_code == BadDrawable) || (ee->request_code == X_PolySegment && ee->error_code == BadDrawable) || (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch) || (ee->request_code == X_GrabKey && ee->error_code == BadAccess)) return 0; fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n", ee->request_code, ee->error_code); return xerrorxlib(dpy, ee); /* may call exit() */ } int main(int argc, char *argv[]) { int r, xfd; fd_set rd; if(argc == 2 && !strncmp("-v", argv[1], 3)) { fputs("dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout); exit(EXIT_SUCCESS); } else if(argc != 1) eprint("usage: dwm [-v]\n"); dpy = XOpenDisplay(0); if(!dpy) eprint("dwm: cannot open display\n"); xfd = ConnectionNumber(dpy); screen = DefaultScreen(dpy); root = RootWindow(dpy, screen); otherwm = False; XSetErrorHandler(xerrorstart); /* this causes an error if some other window manager is running */ XSelectInput(dpy, root, SubstructureRedirectMask); XSync(dpy, False); if(otherwm) eprint("dwm: another window manager is already running\n"); XSync(dpy, False); XSetErrorHandler(NULL); xerrorxlib = XSetErrorHandler(xerror); XSync(dpy, False); setup(); drawstatus(); scan(); /* main event loop, also reads status text from stdin */ XSync(dpy, False); procevent(); readin = True; while(running) { FD_ZERO(&rd); if(readin) FD_SET(STDIN_FILENO, &rd); FD_SET(xfd, &rd); r = select(xfd + 1, &rd, NULL, NULL, NULL); if((r == -1) && (errno == EINTR)) continue; if(r > 0) { if(readin && FD_ISSET(STDIN_FILENO, &rd)) { readin = NULL != fgets(stext, sizeof(stext), stdin); if(readin) stext[strlen(stext) - 1] = 0; else strcpy(stext, "broken pipe"); drawstatus(); } } else if(r < 0) eprint("select failed\n"); procevent(); } cleanup(); XCloseDisplay(dpy); return 0; }