non-nil AST; continue after errors for IDE support

This commit is contained in:
Araq 2011-02-12 19:24:20 +01:00
commit 5b28d08203
84 changed files with 678 additions and 722 deletions

0
lib/core/marshal.nim Normal file → Executable file
View file

0
lib/core/threads.nim Normal file → Executable file
View file

0
lib/impure/ssl.nim Normal file → Executable file
View file

0
lib/pure/base64.nim Normal file → Executable file
View file

0
lib/pure/cookies.nim Normal file → Executable file
View file

View file

@ -185,11 +185,12 @@ when not defined(ECMAScript):
proc random(max: int): int = return int(rand()) mod max
proc trunc*(x: float): float {.importc: "trunc", nodecl.}
proc floor*(x: float): float {.importc: "floor", nodecl.}
else:
proc mathrandom(): float {.importc: "Math.random", nodecl.}
proc mathfloor(x: float): float {.importc: "Math.floor", nodecl.}
proc random*(max: int): int = return mathfloor(mathrandom() * max)
proc floor*(x: float): float {.importc: "Math.floor", nodecl.}
proc random*(max: int): int = return floor(mathrandom() * max)
proc randomize*() = nil
proc sqrt*(x: float): float {.importc: "Math.sqrt", nodecl.}
@ -208,7 +209,7 @@ else:
elif x < 0.0:
result = -frexp(-x, exponent)
else:
var ex = mathfloor(log2(x))
var ex = floor(log2(x))
exponent = round(ex)
result = x / pow(2.0, ex)
@ -227,7 +228,6 @@ else:
var y = exp(2.0*x)
return (y-1.0)/(y+1.0)
type
TRunningStat* = object ## an accumulator for statistical data
n*: int ## number of pushed data

0
lib/pure/scgi.nim Normal file → Executable file
View file

0
lib/pure/smtp.nim Normal file → Executable file
View file

0
lib/wrappers/claro.nim Normal file → Executable file
View file

0
lib/wrappers/openssl.nim Normal file → Executable file
View file

0
lib/wrappers/pcre.nim Normal file → Executable file
View file