Martin Carlberg
fa18095538
Fixed: Does not add extra parentheses for expression operators with the same precedence
2013-03-20 20:47:27 +01:00
Martin Carlberg
92ac8569b3
New: Full support for generate code instead of copy
...
The new compiler can now generate code. The old way of copy and alter the source
code is still supported.
2013-03-17 21:00:24 +01:00
Martin Carlberg
0c982b0999
Fixed: An ExpressionStatement with a Send message expression can be parsed wrongly
...
When a statement ends without a semicolon and a Send message expression is on the next line it was wrongly parsed as a single Send message expression. It should be an ExpressionStatement with a Send message expression inside.
2013-03-17 20:52:21 +01:00
Martin Carlberg
bef0ca18c6
New: New option to generate code for the objjc tool
...
A new option flag '-G' can be added to let the compiler generate the code instead of copy and alter it from the source code
2013-03-17 20:45:34 +01:00
Martin Carlberg
22cdbd7ec7
Merge branch 'master' of https://github.com/cappuccino/cappuccino into preprocess
...
Conflicts:
Objective-J/ObjJAcornCompiler.js
Objective-J/acorn.js
2013-03-12 11:20:56 +01:00
Martin Carlberg
362f3b890e
Added first try for compiler to generate code
2013-03-12 09:22:26 +01:00
Alexander Ljungberg
5f2d1b8255
Merge branch 'master' of github.com:cappuccino/cappuccino
2013-03-10 17:41:42 +00:00
Alexander Ljungberg
483bd16a2d
Formatting: simplify code slightly.
2013-03-10 17:40:58 +00:00
Alexander Ljungberg
b53616ead3
New: @deref(<any idempotent expression>).
...
This change makes it possible to @deref any expression, such as a conditional expression, as long as the expression doesn't have side effects.
The reason not to allow dereferencing of expressions with side effects is that we might need to evaluate the expression twice in certain uses of deref, which is not obvious when you look at the deref operator in plain code.
2013-03-10 17:32:28 +00:00
Alexander Ljungberg
f201ab0721
New: update operators on references, such as @deref(x)++.
...
This fix implements support for both prefix and postfix update operators on a dereference.
2013-03-10 14:02:37 +00:00
Alexander Ljungberg
34faf362d1
New: @ref and @deref in Objective-J 2.0.
2013-03-10 12:17:43 +00:00
Aparajita Fishman
eb6cdfe97c
Typo: fixed spelling in comment
2013-03-09 14:35:16 -05:00
Martin Carlberg
5481ce25b2
Fixed: Will compiler or issue correct error message when wrong case is used in filename on @import statements
2013-03-07 17:48:21 +01:00
Antoine Mercadal
5312524871
Define navigator.userAgent as another ugly Rhino fix
2013-02-28 15:41:14 -08:00
Martin Carlberg
c17053f71a
Removed test line
2013-02-26 08:53:12 +01:00
Alexander Ljungberg
472848da91
New: array literals in Objective-J 2.0.
...
Array literals look like `@[a, b, c]`.
This syntax is supported for completeness and source compatibility, but are not terribly useful since standard JavaScript arrays are toll-free bridged to CPArray.
Array literals could be handy if you're replacing CPArray with your own implementation.
2013-02-25 14:57:05 +00:00
Alexander Ljungberg
5200f945fe
New: dictionary literals in Objective-J 2.0.
2013-02-25 14:24:29 +00:00
Martin Carlberg
e8e87b3b83
Added recursive token transformer and preprocessor tokenizer
2013-02-24 22:26:27 +01:00
Martin Carlberg
340f1e3258
Made the acorn parser able to run outside of the Cappuccino world
2013-02-24 22:25:00 +01:00
Martin Carlberg
529e703ddd
Merge branch 'master' of https://github.com/cappuccino/cappuccino into objj_compiler2
2013-02-24 15:45:56 +01:00
aparajita
c401e3b55e
Merge pull request #1497 from BlairDuncan/afterDocumentLoadFix
...
fix to enables the startup loader to continue if dynamically loaded
2013-02-23 18:01:28 -08:00
Martin Carlberg
699ef14b4e
Merge with latest acorn compiler
2013-02-21 12:57:19 +01:00
Martin Carlberg
8c68854d1d
Fixed local variable that is declared as a global
2013-02-19 20:25:57 +01:00
Martin Carlberg
64a38a2aef
Refactored how maybe warnings is handled and prepared for new "local variable hides global variable" warning. The warning is disabled because there are to many warning in the Cappuccino frameworks right now.
2013-02-19 20:22:42 +01:00
Martin Carlberg
cccfe7268b
Fixed better comment
2013-02-19 17:48:16 +01:00
Martin Carlberg
c03697c0a6
Fixed support for IE8
2013-02-19 17:47:34 +01:00
Martin Carlberg
32bf87c0c3
Fixed typo
2013-02-19 17:46:24 +01:00
Aparajita Fishman
ff35b4a4b6
It turns out function.displayName is no longer necessary with the latest Safari, Chrome, FireFox, and even IE 9+. All of them correctly identify the function name.
2013-02-18 16:13:13 -05:00
Stefan Eilers and Alexander Ljungberg
61b19a1df5
Fix "jake release"
2013-02-13 12:24:58 +00:00
Alexander Ljungberg
181c4ad3c6
Support IBOutlet as a synonym to @outlet.
...
Without this fix the new compiler would treat IBOutlet as the type and expect the next token to be the ivar name.
This fix make the new compiler treat IBOutlet the same as @outlet.
2013-01-30 15:48:30 +00:00
Antoine Mercadal
1080ace4cd
Make the ugly fix for rhino a little bit uglier, but makes build on linux works
2013-01-25 10:11:07 -08:00
Martin Carlberg
1280b6e13e
Fixed new compiler to load frameworks for the environment that it is building and not for the environment that is running
2013-01-23 15:25:13 +01:00
Martin Carlberg
201c7637f6
Fixed new compiler to output better formatted error messages
2013-01-22 15:38:02 +01:00
Martin Carlberg
2952812a4b
Fixed uninitialized warning message in new compiler when using rhino
2013-01-22 10:32:37 +01:00
Alexander Ljungberg
5ec9cf7faf
Fixed: "in" could not be a parameter in a message.
...
With the new compiler, messages such as `[a in:b]` could not be sent, the "in:" parameter throwing an unexpected token error. This was true both if "in" was the first argument or any of the subsequent parameters (such as in `[a something:X in:Y]`).
2013-01-21 02:11:51 +00:00
Alexander Ljungberg
cc05df412e
Fixed: objjc didn't print some errors.
...
Before this fix, certain errors during compilation such as not being able to load a file, would cause the compilation to fail without stating what went wrong.
This fix prints such errors and avoids crashing later when the result of the compilation is undefined.
2013-01-21 01:08:28 +00:00
Alexander Ljungberg
e7f0400580
Formatting.
2013-01-20 18:24:48 +00:00
Alexander Ljungberg
ad109532be
It's enough to read flattensSources once.
2013-01-20 18:09:55 +00:00
Martin Carlberg
586c9d3139
Fixed "Can't find superclass 'MyClass' <Context File: Accessors>" problem when
...
compiling accessors to class with superclass in same file.
2013-01-18 21:23:11 +01:00
Martin Carlberg
6fbab322cf
Fixed warning messages in compiler
2013-01-18 14:25:05 +01:00
Martin Carlberg
e78f211e8a
Added @class and @global declaration and will now make a warning if class or global is not declared.
2013-01-14 18:36:39 +01:00
Martin Carlberg
77d66fa0c9
Fix for: Track spaces will take the spaces after the next token instead of the current. Also do "delete" of property instead of setting it to null for cleaner AST tree.
2013-01-13 22:08:42 +01:00
Martin Carlberg
a652fdf8d2
Fix for: Track comments will take the comment after the next token instead of the current. Also do "delete" of property instead of setting it to null for cleaner AST tree.
2013-01-13 22:08:29 +01:00
Aparajita Fishman and Martin Carlberg
85481225a3
Use a better error message for missing semicolons, trailing whitespace elimination
2013-01-13 22:06:18 +01:00
Martin Carlberg
3dc6a30c4c
Code clean up
2013-01-11 20:36:19 +01:00
Martin Carlberg
f076b05e7e
More information: Shows that the new compiler is used when doing "objjc --help". New output: "Usage (objjc 2.0):…"
2013-01-11 08:06:51 +01:00
Martin Carlberg
7c71cd1f80
The new compiler takes care of hoisted variables
2013-01-10 19:30:34 +01:00
Martin Carlberg
c192f3b47b
Fix to make the Cappuccino framework compile with rhino
2013-01-10 11:21:45 +01:00
Martin Carlberg
89da16afec
Fixed objjc to output compiled source not the input source
2013-01-09 14:58:22 +01:00
Martin Carlberg
1dfc77a4ba
Fixed objjc to use new acorn based compiler
2013-01-09 14:12:58 +01:00