All Projects → DanielMSchmidt → objective-c-parser

DanielMSchmidt / objective-c-parser

Licence: MIT License
Get the JSON representation of an Objective-C header file

Programming Languages

objective c
16641 projects - #2 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to objective-c-parser

CreateAPI
Delightful code generator for OpenAPI specs
Stars: ✭ 176 (+826.32%)
Mutual labels:  code-generation
babel-plugin-private-underscores
Make _classMembers 'private' using symbols
Stars: ✭ 39 (+105.26%)
Mutual labels:  babel
2life-server
💌 双生:遇见另一半的美好:)(服务端)
Stars: ✭ 66 (+247.37%)
Mutual labels:  babel
react-quiz-app
A Simple React Quiz App 💎
Stars: ✭ 37 (+94.74%)
Mutual labels:  babel
netflix landing-page
The Netflix.com landing page built via React 16 and Styled-Components. Build deployed via Surge.sh for preview.
Stars: ✭ 39 (+105.26%)
Mutual labels:  babel
nunavut
Generate code from DSDL using PyDSDL and Jinja2
Stars: ✭ 23 (+21.05%)
Mutual labels:  code-generation
frontplate-cli
フロントエンドビルドCLI
Stars: ✭ 25 (+31.58%)
Mutual labels:  babel
kotlin-code-gen-sample
Code generation samples for Kotlin projects
Stars: ✭ 35 (+84.21%)
Mutual labels:  code-generation
webpack-gulp-wordpress-starter-theme
A WordPress theme with Webpack & Gulp
Stars: ✭ 110 (+478.95%)
Mutual labels:  babel
babel-preset-react-native-web3
deprecated: babel preset for react native, web3 and babel 6
Stars: ✭ 22 (+15.79%)
Mutual labels:  babel
k6-template-es6
Template repository for bundling test projects into single test scripts runnable by k6
Stars: ✭ 39 (+105.26%)
Mutual labels:  babel
find-unused-exports
A Node.js CLI and equivalent JS API to find unused ECMAScript module exports in a project.
Stars: ✭ 30 (+57.89%)
Mutual labels:  babel
cerebro-web
Website for Cerebro
Stars: ✭ 21 (+10.53%)
Mutual labels:  babel
freeRouter
freeRouter - networking swiss army knife
Stars: ✭ 26 (+36.84%)
Mutual labels:  babel
gobang
一个五子棋AI,使用原生JavaScript开发
Stars: ✭ 22 (+15.79%)
Mutual labels:  babel
medly-components
🧩 Medly components provides numerous themable react components, each with multiple varitaions of sizes, colors, position etc.
Stars: ✭ 66 (+247.37%)
Mutual labels:  babel
vue-cms
VUE-CMS. Proudly Using ES7, Vue 2, Koa 2, Webpack 4, Babel 7 And Mocha
Stars: ✭ 16 (-15.79%)
Mutual labels:  babel
Webpack-Starter-Kit
Webpack 4 stater kit with SCSS, PostCSS, Babel & ESLint
Stars: ✭ 41 (+115.79%)
Mutual labels:  babel
gulp-webpack-boilerplate
A good foundation for your next frontend project.
Stars: ✭ 56 (+194.74%)
Mutual labels:  babel
core-web
like core-js but for Web APIs (based on polyfill.io)
Stars: ✭ 34 (+78.95%)
Mutual labels:  babel

objective-c-parser Build Status Coverage Status BCH compliance

Get an objective-c header file and translate it to equivalent javascript calls

Install

$ npm install objective-c-parser

Usage

const fs = require("fs");
const objectiveCParser = require("objective-c-parser");
const content = fs.readFileSync("/path/to/objective-c/Ponies.h", "utf8");

const output = objectiveCParser(content);

fs.writeFileSync("/path/to/project/ponies.json", JSON.stringify(output));

Example

#import <Foundation/Foundation.h>
@protocol Ponies, Foo;
@interface BasicName : NSObject

// Another comment
@property(nonatomic, readonly) uninteresting<IgnorePlease> matcher;


// This is the comment of basic method one
- (NSInteger)basicMethodOne;

/**
 *  This is the comment of basic method two.
 *  It has multiple lines
 */
- (NSString *) basicMethodTwoWithArgOne:(NSInteger)argOne AndArgTwo:(NSString *)argTwo;
@end
{
	"name": "BasicName",
	"methods": [
		{
			"args": [],
			"comment": "This is the comment of basic method one",
			"name": "basicMethodOne",
			"returnType": "NSInteger"
		},
		{
			"args": [
				{
					"type": "NSInteger",
					"name": "argOne"
				},
				{
					"type": "NSString",
					"name": "argTwo"
				}
			],
			"comment": "This is the comment of basic method two.\nIt has multiple lines",
			"name": "basicMethodTwoWithArgOneAndArgTwo",
			"returnType": "NSString"
		}
	]
}

Please be aware that name can be undefined if the headerfile does not contain an @interface declaration.

License

MIT © Daniel Schmidt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].