version 0.8.10

This commit is contained in:
Araq 2010-10-21 00:12:14 +02:00
commit 765366c1f3
58 changed files with 768 additions and 30834 deletions

View file

@ -32,5 +32,6 @@ tsimtych.nim;5;type mismatch: got (bool) but expected 'string'
tstatret.nim;4;statement not allowed after
tstmtexp.nim;3;value returned by statement has to be discarded
ttempl2.nim;13;undeclared identifier: 'b'
ttypelessemptyset.nim;0;Error: internal error: invalid kind for last(tyEmpty)
tunderscores.nim;3;invalid token: _
typredef.nim;2;illegal recursion in type 'Uint8'

Can't render this file because it contains an unexpected character in line 23 and column 23.

View file

@ -2,5 +2,5 @@
from sdl import PSurface
discard SDL.CreateRGBSurface(SDL.SWSURFACE, 23, 34,
32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xff000000)
32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xff000000'i32)

View file

@ -1,4 +1,4 @@
import regexprs, strutils
import re, strutils
type
TURL = tuple[protocol, subdomain, domain, port: string, path: seq[string]]
@ -8,7 +8,7 @@ proc parseURL(url: string): TURL =
var pattern: string = r"([a-zA-Z]+://)?(\w+?\.)?(\w+)(\.\w+)(:[0-9]+)?(/.+)?"
var m: array[0..6, string] #Array with the matches
newSeq(m, 7) #ERROR
discard regexprs.match(url, pattern, m)
discard regexprs.match(url, re(pattern), m)
result = (protocol: m[1], subdomain: m[2], domain: m[3] & m[4],
port: m[5], path: m[6].split('/'))