Git Product home page Git Product logo

objj-parser's Introduction

Objective-J Parser

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

It is extended from the Acorn JavaScript parser by Marijn Haverbeke:

Is used by the Objective-J compiler

It is 100% compatable with JavaScript with two extra options.

1: Turn on 'preprocess' to allow C like preprocess derectives.

It is 100% compatible with the Macros and Conditionals preprocessor directives defined in the GNU C 4.0 Preprocessor User Guide.

Example:

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

Will be parsed as if it was like this:

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

For more info see http://www.cappuccino-project.org/blog/2013/05/the-new-objective-j-2-0-compiler.html

2: Turn on 'objj' to allow Objective-J syntax

See http://www.cappuccino-project.org/learn/objective-j.html

Use from command line with different options: usage: acorn infile [--ecma3|--ecma5] [--strictSemicolons] [--trackComments] [--trackSpaces] [--locations] [--no-objj] [--no-preprocess] [--compact] [--silent] [--help]

objj-parser's People

Contributors

mrcarlberg avatar marijnh avatar aparajita avatar abraidwood avatar wjx avatar benekastah avatar arian avatar lehni avatar p01 avatar mishoo avatar oxyc avatar keeyipchan avatar kratorado avatar zsjforcn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.