From ec46882282a1d515577e85838e4323a8f5aeeb91 Mon Sep 17 00:00:00 2001 From: Billingsly Wetherfordshire Date: Sun, 26 May 2013 14:32:32 -0700 Subject: [PATCH] Updated Writing a Macro (markdown) --- Writing-a-Macro.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Writing-a-Macro.md b/Writing-a-Macro.md index 6af7f4a..e77e231 100644 --- a/Writing-a-Macro.md +++ b/Writing-a-Macro.md @@ -1,6 +1,6 @@ Macros are complex and powerful, allowing you to build the AST imperatively. So how does one build AST? It's not as hard as it sounds. -I'm going to go over the process I used to write the marshaling macro used in keineSchweine (github/fowlmouth/keineSchweine/lib/genpacket.nim) +I'm going to go over the process I used to write the marshaling macro used in keineSchweine (github/fowlmouth/keineSchweine/dependencies/genpacket) Okay, so I have described a packet as a object type holding the information needed, for example a packet that gets sent out to clients when a new client connects might look like this: ```nimrod @@ -19,5 +19,7 @@ proc readClientJoined (stream: PStream): TClientJoined = readBE stream, result.playerID readBE stream, result.alias ``` +As you can see, this will result in a specialized function for reading/writing a certain type of packet +to be continued