1.0.0-10 • Published 1 year ago

objj-transpiler v1.0.0-10

Weekly downloads
2
License
-
Repository
github
Last release
1 year ago

ObjJAcornCompiler

A tiny, fast JavaScript and/or Objective-J transpiler with built in preprocessor. Written in JavaScript.

It uses a parser extended from the Acorn JavaScript parser by Marijn Haverbeke.

Preprocessor

The parser has a built in C like preprocessor.

Example:

#define MAX(x, y) (x > y ? x : y)
var m1 = MAX(a, b);
var m2 = MAX(14, 20);

Will be compiled to:

var m1 = a > b ? a : b;
var m2 = 14 > 20 ? 14 : 20;

For more info see this blogpost on the Cappuccino website.

Usage

    --module                        Set the source type to module instead of script in
                                    the parser.

    --ecma5, --ecma8, --latest      Sets the set version of ECMAScript used be the parser.

    --loose                         Sets the parser to use loose mode.

    --preserve-paren                Tells the parser to preserve parentheses, even if
                                    unnecessary.

    --strict-semicolons             ???

    --no-allow-trailing-commas      ???

    --track-comments                ???

    --include-comment-line-break    ???

    --include-comments              ???

    --track-spaces                  ???

    --track-locations               ???

    --no-objj                       Turns off the parsing of Objective-J.

    --no-preprocess                 Turns off the parsing of preprocessor directives.

    --silent                        ???

    --old-safari-bug                ???

    --no-code                       ???

    --ast                           Generates the intermediate AST as a JSON file.

    --source-map                    ???

    --no-debug-symbols              ???

    --no-type-signatures            ???

    --no-inline-msgsend             ???

    --indent-width                  ???

    --indent-string                 ???

    --indent-tab                    ???

    --output, -o

    -D                              ???

    --help                          ???

    -                               ???

Limitations

It can't compile Objective-J code that depends on other Objective-J files. The Objective-J load and runtime is needed for this. But it will work as long as you declare any superclass in the same file.

1.0.0-9

1 year ago

1.0.0-10

1 year ago

1.0.0-5

2 years ago

1.0.0-4

2 years ago

1.0.0-7

2 years ago

1.0.0-6

2 years ago

1.0.0-1

2 years ago

1.0.0-3

2 years ago

1.0.0-2

2 years ago

1.0.0-8

2 years ago

0.5.7

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.0

8 years ago

0.3.8

9 years ago

0.3.7

9 years ago

0.3.6

9 years ago

0.3.5

9 years ago

0.3.4

9 years ago