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
Aparajita Fishman
86e5c15e3c
Formatting, optimizations.
2013-08-09 08:28:37 -04:00
Francisco Ryan Tolmasky I
c620c7bf39
Fix for %% being broken in sprintf (minor bugfix for press message showing undefined, larger press bugs remain).
...
Reviewed by me.
2011-01-09 03:25:59 -08:00
Brian Donovan
8ca2a1bf5b
IE uses an empty string as the value of an empty capture group.
2010-10-22 14:41:31 -07:00
Brian Donovan
8427697a4b
Fix accidental globals.
2010-10-22 14:15:22 -07:00
Brian Donovan
7be6352531
Add format parameter index support to sprintf.
...
This is primarily useful in cases when the format string can vary, but the argument order will not, as is often the case with format strings in Localized.strings files.
From http://perldoc.perl.org/functions/sprintf.html :
An explicit format parameter index, such as 2$. By default sprintf will format the next unused argument in the list, but this allows you to take the arguments out of order.
See also this Cocoa example: http://stackoverflow.com/questions/1063843/is-there-a-way-to-specify-argument-position-index-in-nsstring-stringwithformat
2010-10-21 09:54:51 -07:00
Ross Boucher
e3dc9fd96b
Make sprintf no longer global, instead ObjectiveJ.sprintf.
2010-03-07 17:41:33 -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
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
Tom Robinson
2cc40a7961
Add sprintf.js to Objective-J
2010-02-05 21:11:47 -08:00