David Richardson
1a9a42ff54
Replace #pragma mark with // MARK:
...
Replace objc directive with native Javascript version // MARK: to facilitate elimination of preproccsing pass.
2026-07-21 15:15:53 -06:00
Martin Carlberg
6456809a72
Fixed: Use semicolon on last line in #included files. The new preprocessor might think that the statement will continue on the next line.
...
Due to Javascript don’t need to have semicolon at end of statement there are times when the parser thinks the line continues on the next line.
For example we have a file.js:
var f = function(x)
{
return x + x;
}
Now in another file we do:
#include file.js
(function(exports) {
a = 42;
})(exports.b)
There will be two different behaviors if the ’file.js’ has a semicolon at the end of the last line. This commit make sure we have the right behavior.
2017-06-26 15:45:02 +02:00
Alexander Ljungberg
267f00bfe1
Put spaces around = in [name] = function... generated JS to reduce lint warnings.
2011-11-10 09:41:21 +00:00
Alexander Ljungberg
7539b5b06d
Merge pull request #903 from paulbaumgart/cappuccino
...
---
Some OJTestCases for the Preprocessor to help make sure it still works as expected when it gets revamped to remove with() from method code generation.
Note that this adds a test case which the current Preprocessor fails: http://github.com/paulbaumgart/cappuccino/commit/8cc61cccfd78debe96eba96a7b332938e6d5377e#L1R81
2011-05-15 19:25:10 -04:00
Francisco Ryan Tolmasky I
96e3c4db68
Store type info for ivars when proper flags are set.
...
Reviewed by me.
2011-04-14 09:49:33 -07:00
Paul Baumgart
0802b80c35
Make local param shadowing detection print a warning instead of throwing a SyntaxError. This way it's easier to test that particular scenario, since this is actually a bug in the Preprocessor.
2010-09-24 15:03:22 -07:00
Francisco Ryan Tolmasky I
70e4dd16df
A few more parser tests and reorg of tests.
...
Reviewed by me.
2010-09-19 08:18:54 -07:00
Alexander Ljungberg
547f1fb786
While not used anywhere, the preprocessor 'peak' method was most likely meant to be called 'peek'. Renamed it. Also some minor code styling and whitespace fixes.
2010-08-29 17:42:22 -04:00
Paul Baumgart and Ross Boucher
66180f8de4
change @property to @accessors in pre-processor error messages
2010-05-15 12:19:35 -07:00
Ross Boucher
4cc7dec35b
Throw syntax error for # followed by anything other than pragma.
2010-04-09 14:34:02 -07:00
Ross Boucher
47ecd40c4f
Made the pre-processor capable of recognizing and ignoring Xcode's '#pragma mark' mark-ups
...
Conflicts:
Objective-J/Preprocessor.js
2010-04-09 14:26:29 -07:00
Ross Boucher
df728b7a21
Support terminating method signatures with ;. Closes #416 .
2010-03-28 08:51:35 -07:00
Ross Boucher
4175b762c3
Disable new syntax check while we work out the build issue some people are having.
2010-03-23 13:29:55 -07:00
Ross Boucher
d0ad865976
Add the with{} back in for Class methods, instead take the disallowed list from objj_class.
2010-03-23 11:21:59 -07:00
Ross Boucher
7013b34897
Add a few additional syntax checks.
...
Throw an error if a method uses a parameter name that is also an ivar name.
Stop using with{} block for class methods.
2010-03-23 11:21:59 -07:00
Francisco Ryan Tolmasky I
eb00953c60
Merge branch 'master' into URL
2010-03-05 16:06:42 -08:00
Paul Baumgart and Ross Boucher
ab196e75c1
Fix missing throw in Preprocessor to report an error on unmatched brackets. Closes gh-524
2010-03-05 12:34:57 -08:00
Francisco Ryan Tolmasky I
eb57d14673
Further migration from file paths to CFURLs.
...
Reviewed by me.
2010-03-03 01:04:25 -08:00
Francisco Ryan Tolmasky I
1ba828da18
Beginning transition from string paths to CFURLs.
...
Reviewed by me.
2010-02-23 15:11:10 -08:00
Francisco Ryan Tolmasky I
7defdd2a00
Fix for some files showing up as anonymous.
...
Reviewed by tlrobinson.
2010-02-22 14:27:30 -08:00
Francisco Ryan Tolmasky I
20637fc5e0
Added missing licenses and removed a bit of unused code.
...
Reviewed by me.
2010-02-21 13:52:51 -08:00
Francisco Ryan Tolmasky I
7433c38d92
Pulled @each out into a separate feature branch, so as to not conflict with the 0.8 work: http://github.com/280north/cappuccino/tree/@each .
...
Reviewed by me.
2010-02-21 12:31:13 -08:00
Francisco Ryan Tolmasky I
841ed9ea89
Major cleanup of globals and exports. Removed many accidental globals and no more need for eval in the initialization process. Also fixes Theme Showcase.
...
Reviewed by me.
2010-02-20 01:04:17 -08:00
Francisco Ryan Tolmasky I
7819e174f1
Added setString: to CPData which sits on top of setSerializedPlistObject:.
...
Reviewed by me.
2010-02-19 00:42:23 -08:00
Ross Boucher
81b72fc571
Throw a syntax error if we don't recognize the @accessors syntax.
2010-02-17 17:27:37 -08:00
Ross Boucher
93722f6a7d
Fix a bug where any @ added accessors to ivar declarations.
...
Closes #474 .
2010-02-16 15:50:04 -08:00
Francisco Ryan Tolmasky I
64fd9f615c
Additional performance improvements to CPFastEnumeration.
...
Reviewed by me.
2010-02-16 02:04:31 -08:00
Francisco Ryan Tolmasky I
f95c3ca46a
Adds fast enumeration to Cappuccino. Currently support for Arrays, dictionaries, single objects, and nil.
...
Closes #472 .
Reviewed by me.
2010-02-15 21:46:50 -08:00
Tom Robinson
b907ea59f4
Export a few more properties from Objective-J for use in "press"
2010-02-08 23:45:59 -08:00
Francisco Ryan Tolmasky I
21ef259e1f
Fix for being too strict when accepting PLISTs and also fixes a regression with erroring when parsing code with shebangs(!).
...
Closes #69 .
Reviewed by me.
2010-02-03 00:31:37 -08:00
Francisco Ryan Tolmasky I
7b303b6529
Removed unused functions.
...
Reviewed by me.
2010-01-31 12:48:26 -08:00
Francisco Ryan Tolmasky I
794d8a754c
Make blendtask work with new system.
...
Reviewed by me.
2010-01-28 16:24:18 -08:00
Francisco Ryan Tolmasky I
ec210c49c5
Beginnings of new loader.
...
Reviewed by me.
2010-01-27 00:43:54 -08:00