Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tootallnate/objj
Objective-J for NodObjC
https://github.com/tootallnate/objj
Last synced: 5 days ago
JSON representation
Objective-J for NodObjC
- Host: GitHub
- URL: https://github.com/tootallnate/objj
- Owner: TooTallNate
- License: lgpl-2.1
- Created: 2012-04-24T01:35:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-07-07T01:32:14.000Z (over 12 years ago)
- Last Synced: 2024-10-24T02:46:12.850Z (2 months ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Objective-J
===========
### [Objective-J][wikipedia] compiler for NodObjC## This is a work in progress!!!
This is a fork of the Cappuccino Objective-J preprocessor that outputs valid
[NodObjC][] syntax. The major difference is that you specify regular official
Cocoa classes like `NSString`.Installation
------------Install with `npm`:
``` bash
$ npm install -g objj
```Examples
--------``` objj
@import// creating a new Class, inheriting from NSObject
@implementation Person : NSObject {
NSString *name;
}
- (id)initWithName: (NSString *) aName {
self = [super init];
[self setName: name];
return self;
}- (void) setName: (NSString *) aName {
name = aName;
}- (NSString *) name {
return name;
}+ (id) allocWithName: (NSString *)aName {
return [[self alloc] initWithName: aName];
}
@end// create an NSAutoreleasePool instance
var pool = [[NSAutoreleasePool alloc] init];// create one of our Person instances
var person = [Person allocWithName: @"Nathan"];
console.log([person name]);
// "Nathan"
```License
-------Preprocessor.js
Objective-JOriginally created by Francisco Tolmasky.
Copyright 2008-2010, 280 North, Inc.Modified to output NodObjC syntax by Nathan Rajlich
Copyright 2012This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA[wikipedia]: http://wikipedia.org/wiki/Objective-J
[tutorial]: http://cappuccino.org/learn/tutorials/objective-j-tutorial.php
[NodObjC]: https://github.com/TooTallNate/NodObjC