Skip to content

Commit 08846bb

Browse files
committed
Merge pull request #5 from e2l3n/tpopov/rebase-onto-origin
Rebase origin onto master
2 parents 6c772ff + 976eca8 commit 08846bb

23 files changed

+2958
-2564
lines changed

lib/parser/pbxproj.js

+1,670-2,507
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/parser/pbxproj.pegjs

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
{
22
function merge(hash, secondHash) {
33
secondHash = secondHash[0]
4-
for(var i in secondHash)
5-
hash[i] = secondHash[i]
4+
for(var i in secondHash) {
5+
hash[i] = merge_obj(hash[i], secondHash[i]);
6+
}
67

78
return hash;
89
}
10+
11+
function merge_obj(obj, secondObj) {
12+
if (!obj)
13+
return secondObj;
14+
15+
for(var i in secondObj)
16+
obj[i] = merge_obj(obj[i], secondObj[i]);
17+
18+
return obj;
19+
}
920
}
1021

1122
/*
@@ -155,17 +166,20 @@ ArrayEntry
155166
= SimpleArrayEntry / CommentedArrayEntry
156167

157168
SimpleArrayEntry
158-
= val:Value "," { return val }
169+
= val:Value EndArrayEntry { return val }
159170

160171
CommentedArrayEntry
161-
= val:Value _ comment:InlineComment ","
172+
= val:Value _ comment:InlineComment EndArrayEntry
162173
{
163174
var result = Object.create(null);
164175
result.value = val.trim();
165176
result.comment = comment.trim();
166177
return result;
167178
}
168179

180+
EndArrayEntry
181+
= "," / _ &")"
182+
169183
/*
170184
* Identifiers and Values
171185
*/

lib/pbxFile.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
var path = require('path'),
2+
util = require('util'),
23
M_EXTENSION = /[.]m$/, SOURCE_FILE = 'sourcecode.c.objc',
34
H_EXTENSION = /[.]h$/, HEADER_FILE = 'sourcecode.c.h',
45
BUNDLE_EXTENSION = /[.]bundle$/, BUNDLE = '"wrapper.plug-in"',
56
XIB_EXTENSION = /[.]xib$/, XIB_FILE = 'file.xib',
67
DYLIB_EXTENSION = /[.]dylib$/, DYLIB = '"compiled.mach-o.dylib"',
7-
FRAMEWORK_EXTENSION = /[.]framework/, FRAMEWORK = 'wrapper.framework',
8+
FRAMEWORK_EXTENSION = /[.]framework$/, FRAMEWORK = 'wrapper.framework',
89
ARCHIVE_EXTENSION = /[.]a$/, ARCHIVE = 'archive.ar',
910
PNG_EXTENSION = /[.]png/, PNG_IMAGE = "image.png",
1011
DEFAULT_SOURCE_TREE = '"<group>"',
@@ -97,7 +98,7 @@ function pbxFile(filepath, opt) {
9798
if (opt.compilerFlags) {
9899
if (!this.settings)
99100
this.settings = {};
100-
this.settings.COMPILER_FLAGS = opt.compilerFlags;
101+
this.settings.COMPILER_FLAGS = util.format('"%s"', opt.compilerFlags);
101102
}
102103
}
103104

0 commit comments

Comments
 (0)