Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Headers cleanup

  • Loading branch information...
commit e37d79a214e899263385da893387c4e35e29fd67 1 parent 02bf34b
@groue authored
View
2  src/bin/buildGRMustacheAvailabilityMacros
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
MAJOR_VERSION = 4
-MAX_MINOR_VERSION = 2
+MAX_MINOR_VERSION = 3
puts <<-LICENSE
// The MIT License
View
82 src/classes/GRMustacheAvailabilityMacros.h
@@ -31,6 +31,7 @@
#define GRMUSTACHE_VERSION_4_0 4000
#define GRMUSTACHE_VERSION_4_1 4010
#define GRMUSTACHE_VERSION_4_2 4020
+#define GRMUSTACHE_VERSION_4_3 4030
@@ -38,10 +39,10 @@
/*
- * If max GRMustacheVersion not specified, assume 4.2
+ * If max GRMustacheVersion not specified, assume 4.3
*/
#ifndef GRMUSTACHE_VERSION_MAX_ALLOWED
-#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_4_2
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_4_3
#endif
/*
@@ -211,3 +212,80 @@
+/*
+ * AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER
+ *
+ * Used on declarations introduced in GRMustache 4.3
+ */
+#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_4_3
+#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER UNAVAILABLE_ATTRIBUTE
+#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_4_3
+#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER WEAK_IMPORT_ATTRIBUTE
+#else
+#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in GRMustache 4.3,
+ * and deprecated in GRMustache 4.3
+ */
+#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
+#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#else
+#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3
+ *
+ * Used on declarations introduced in GRMustache 4.0,
+ * but later deprecated in GRMustache 4.3
+ */
+#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
+#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 DEPRECATED_ATTRIBUTE
+#else
+#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3
+ *
+ * Used on declarations introduced in GRMustache 4.1,
+ * but later deprecated in GRMustache 4.3
+ */
+#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
+#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 DEPRECATED_ATTRIBUTE
+#else
+#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3
+ *
+ * Used on declarations introduced in GRMustache 4.2,
+ * but later deprecated in GRMustache 4.3
+ */
+#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
+#define AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 DEPRECATED_ATTRIBUTE
+#else
+#define AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_GRMUSTACHE_VERSION_4_3_AND_LATER
+ *
+ * Used on types deprecated in GRMustache 4.3
+ */
+#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
+#define DEPRECATED_IN_GRMUSTACHE_VERSION_4_3_AND_LATER DEPRECATED_ATTRIBUTE
+#else
+#define DEPRECATED_IN_GRMUSTACHE_VERSION_4_3_AND_LATER
+#endif
+
+
+
+
+
+
View
4 src/classes/GRMustacheFilter.h
@@ -41,7 +41,7 @@ extern NSString * const GRMustacheFilterException;
/**
* TODO
*/
-- (id)transformedValue:(id)object;
+- (id)transformedValue:(id)object AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER;
@end
@@ -60,7 +60,7 @@ extern NSString * const GRMustacheFilterException;
/**
* TODO
*/
-+ (id)filterWithBlock:(id(^)(id value))block;
++ (id)filterWithBlock:(id(^)(id value))block AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER;
#endif /* if NS_BLOCKS_AVAILABLE */
View
2  src/classes/GRMustacheInvocation_private.h
@@ -94,5 +94,5 @@
/**
* TODO
*/
-- (BOOL)isEquivalentToInvocation:(GRMustacheInvocation *)invocation;
+- (BOOL)isEquivalentToInvocation:(GRMustacheInvocation *)invocation GRMUSTACHE_API_INTERNAL;
@end
View
2  src/classes/GRMustacheParser_private.h
@@ -96,7 +96,7 @@
/**
* TODO
*/
-@property (nonatomic, strong, readonly) NSMutableSet *pragmas;
+@property (nonatomic, strong, readonly) NSMutableSet *pragmas GRMUSTACHE_API_INTERNAL;
/**
* The parser will invoke its delegate as it builds tokens from the template
View
5 src/classes/GRMustacheRenderingElement_private.h
@@ -58,9 +58,10 @@
/**
* Renders a context stack.
*
- * @param context A context stack.
+ * @param context A context stack.
* @param delegatingTemplate A template whose delegate methods should be called
- * whenever relevant.
+ * whenever relevant.
+ * @param delegates TODO
*
* @return The rendering of _context_.
*/
View
5 src/classes/GRMustacheSectionElement_private.h
@@ -86,9 +86,10 @@
* Returns the rendering of inner rendering elements for the provided context,
* without any invocation nor interpretation.
*
- * @param context A context stack for rendering inner elements.
+ * @param context A context stack for rendering inner elements.
* @param delegatingTemplate A template whose delegate methods should be called
- * whenever relevant.
+ * whenever relevant.
+ * @param delegates TODO
*
* @return The rendering of the section.
*/
View
9 src/classes/GRMustacheSection_private.h
@@ -47,10 +47,11 @@
/**
* Builds and returns a section suitable for GRMustacheHelper.
*
- * @param sectionElement The underlying sectionElement
- * @param renderingContext The rendering context exposed to the library user
- * @param delegatingTemplate A template whose delegate methods should be called
- * whenever relevant.
+ * @param sectionElement The underlying sectionElement
+ * @param renderingContext The rendering context exposed to the library user
+ * @param delegatingTemplate A template whose delegate methods should be called
+ * whenever relevant.
+ * @param delegates TODO
*
* @return A section.
*
View
5 src/classes/GRMustacheTemplateDelegate.h
@@ -58,11 +58,6 @@ typedef enum {
* TODO
*/
GRMustacheInterpretationFilter,
-
- /**
- * TODO
- */
- GRMustacheInterpretationFilteredValue,
} GRMustacheInterpretation;
/**
View
5 src/classes/GRMustacheToken_private.h
@@ -85,6 +85,9 @@ typedef enum {
GRMustacheTokenTypePragma,
} GRMustacheTokenType;
+/**
+ * TODO
+ */
typedef union {
id object;
NSString *text;
@@ -184,7 +187,7 @@ typedef union {
/**
* The substring of the template represented by this token.
*/
-@property (nonatomic, readonly) NSString *templateSubstring;
+@property (nonatomic, readonly) NSString *templateSubstring GRMUSTACHE_API_INTERNAL;
/**
* Builds and return a token.
Please sign in to comment.
Something went wrong with that request. Please try again.