RCTParserUtils.h 1006 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <Foundation/Foundation.h>
  8. #import <React/RCTDefines.h>
  9. @interface RCTParserUtils : NSObject
  10. /**
  11. * Generic utility functions for parsing Objective-C source code.
  12. */
  13. RCT_EXTERN BOOL RCTReadChar(const char **input, char c);
  14. RCT_EXTERN BOOL RCTReadString(const char **input, const char *string);
  15. RCT_EXTERN void RCTSkipWhitespace(const char **input);
  16. RCT_EXTERN BOOL RCTParseSelectorIdentifier(const char **input, NSString **string);
  17. RCT_EXTERN BOOL RCTParseArgumentIdentifier(const char **input, NSString **string);
  18. /**
  19. * Parse an Objective-C type into a form that can be used by RCTConvert.
  20. * This doesn't really belong here, but it's used by both RCTConvert and
  21. * RCTModuleMethod, which makes it difficult to find a better home for it.
  22. */
  23. RCT_EXTERN NSString *RCTParseType(const char **input);
  24. @end