This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import macros | |
macro void(name: expr): stmt {.immediate.} = | |
echo reprTree name | |
#CurlyExpr | |
# Call | |
# Ident !"abc" | |
# Command | |
# Ident !"int" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import macros | |
template ctypedef(name: expr): stmt {.immediate.} = | |
macro `name`(body: expr): stmt {.immediate.} = | |
let head = body[0] | |
let procname = head[0] | |
var params = newSeq[PNimrodNode]() | |
for node in head.children: | |
case node.kind | |
of nnkCommand: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<Document xmlns="http://www.evolus.vn/Namespace/Pencil"><Properties/><Pages><Page><Properties><Property name="name">Untitled Page</Property><Property name="id">1397597259991_8851</Property><Property name="width">1000</Property><Property name="height">1500</Property><Property name="dimBackground"/><Property name="transparentBackground">false</Property><Property name="backgroundColor">#C0C0C0FF</Property><Property name="fid">untitled_page</Property></Properties><Content><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:heading" p:sc="Heading 1" id="f632af5c128b455f867b3e967423d64e" transform="matrix(1,0,0,1,273,34)"><p:metadata><p:property name="textContent"><![CDATA[Prelude]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|bold|normal|24px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="customStyle"><![CDATA[]]></p:prop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import macros, strutils | |
macro `:=`(a, b: expr): stmt {.immediate.} = | |
let tempVar = newIdentNode(!"tmp") | |
result = newLetStmt(tempVar, b) | |
var i = 0 | |
for child in a.children: | |
var arrAccess = newNimNode(nnkBracketExpr) | |
.add(tempVar) | |
.add(newIntLitNode(i)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------------------- | |
--- Testing CrapWow (CrapWow) | |
[[[ Sanity Tests ]]] | |
Verification value 0x49ECB015 : Passed! | |
Running sanity check 1..........PASS | |
Running sanity check 2..........PASS | |
[[[ Speed Tests ]]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{.emit: "#include <stdint.h>\n".} | |
type | |
FInt8* {.importc: "int8_t".} = object | |
proc `*`(a, b: FInt8): FInt8 = | |
{.emit: "return ((`a`)*(`b`));".} | |
proc toInt(a: FInt8): int = | |
{.emit: "return `a`;".} | |
var a: FInt8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import exceptions | |
template checkBounds(idx, min, max: int) = | |
when not defined(release): | |
if idx < min or idx > max: | |
raiseException(errOutOfBounds, idx, min, max) | |
# TBuffer {{{ | |
type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim | |
index 70eced0..7c11d3e 100644 | |
--- a/compiler/ccgtypes.nim | |
+++ b/compiler/ccgtypes.nim | |
@@ -13,7 +13,7 @@ | |
proc mangleField(name: string): string = | |
result = mangle(name) | |
- if name[0] in Letters: | |
+ if name[0] in 'a'..'z': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim | |
index 7c11d3e..70eced0 100644 | |
--- a/compiler/ccgtypes.nim | |
+++ b/compiler/ccgtypes.nim | |
@@ -13,7 +13,7 @@ | |
proc mangleField(name: string): string = | |
result = mangle(name) | |
- if name[0] in 'a'..'z': | |
+ if name[0] in Letters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import macros | |
# StmtList | |
# Call | |
# Ident !"asda" | |
# Call | |
# Ident !"gfa" | |
# BlockStmt | |
# Ident !"a" | |
# StmtList |