X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/4de0686f54039cd5211daebcf5a51ad475594170..3530897b0e384dd614bfef0a446b343e00a6616b:/Replace.hpp diff --git a/Replace.hpp b/Replace.hpp index de3c33a..3c4a6b7 100644 --- a/Replace.hpp +++ b/Replace.hpp @@ -1,3 +1,42 @@ +/* Cycript - Inlining/Optimizing JavaScript Compiler + * Copyright (C) 2009 Jay Freeman (saurik) +*/ + +/* Modified BSD License {{{ */ +/* + * Redistribution and use in source and binary + * forms, with or without modification, are permitted + * provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the + * above copyright notice, this list of conditions + * and the following disclaimer. + * 2. Redistributions in binary form must reproduce the + * above copyright notice, this list of conditions + * and the following disclaimer in the documentation + * and/or other materials provided with the + * distribution. + * 3. The name of the author may not be used to endorse + * or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/* }}} */ + #ifndef REPLACE_HPP #define REPLACE_HPP @@ -20,6 +59,8 @@ ($ CYFunctionParameter(args)) #define $S(args...) \ ($ CYString(args)) +#define $U \ + $V("undefined") #define $V(name) \ ($ CYVariable($I(name))) @@ -88,4 +129,17 @@ #define $N5(func, args...) \ $N(func, $C5_(args)) +#define $L(args...) \ + $ CYDeclaration(args) +#define $L1(arg0) \ + $ CYDeclarations(arg0) +#define $L2(arg0, args...) \ + $ CYDeclarations(arg0, $L1(args)) +#define $L3(arg0, args...) \ + $ CYDeclarations(arg0, $L2(args)) +#define $L4(arg0, args...) \ + $ CYDeclarations(arg0, $L3(args)) +#define $L5(arg0, args...) \ + $ CYDeclarations(arg0, $L4(args)) + #endif/*REPLACE_HPP*/