File tree Expand file tree Collapse file tree 3 files changed +50
-2
lines changed Expand file tree Collapse file tree 3 files changed +50
-2
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,10 @@ AssignmentList
4141 if (tail) return merge (head,tail)
4242 else return head
4343 }
44- / _ section :DelimitedSection _
44+ / _ head :DelimitedSection _ tail : AssignmentList *
4545 {
46- return section
46+ if (tail) return merge (head,tail)
47+ else return head
4748 }
4849
4950/*
Original file line number Diff line number Diff line change 1+ // !$*UTF8*$!
2+ {
3+ archiveVersion = 1;
4+ classes = {
5+ };
6+ objectVersion = 45;
7+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
8+ objects = {
9+ /* Begin PBXTargetDependency section */
10+ 301BF551109A68C00062928A /* PBXTargetDependency */ = {
11+ isa = PBXTargetDependency;
12+ name = PhoneGapLib;
13+ targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */;
14+ };
15+ /* End PBXTargetDependency section */
16+
17+ /* Begin PBXSourcesBuildPhase section */
18+ 1D60588E0D05DD3D006BFB54 /* Sources */ = {
19+ isa = PBXSourcesBuildPhase;
20+ buildActionMask = 2147483647;
21+ files = (
22+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
23+ 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */,
24+ );
25+ runOnlyForDeploymentPostprocessing = 0;
26+ };
27+ /* End PBXSourcesBuildPhase section */
28+ };
29+ }
Original file line number Diff line number Diff line change 1+ var PEG = require ( 'pegjs' ) ,
2+ fs = require ( 'fs' ) ,
3+ pbx = fs . readFileSync ( 'test/projects/two-sections.pbxproj' , 'utf-8' ) ,
4+ grammar = fs . readFileSync ( 'pbxproj.pegjs' , 'utf-8' ) ,
5+ parser = PEG . buildParser ( grammar ) ,
6+ rawProj = parser . parse ( pbx ) ,
7+ project = rawProj . project ;
8+
9+ exports [ 'should parse a project with two sections' ] = function ( test ) {
10+ // if it gets this far it's worked
11+ test . done ( ) ;
12+ }
13+
14+ exports [ 'should have both sections on the project object' ] = function ( test ) {
15+ test . ok ( project . objects [ 'PBXTargetDependency' ] ) ;
16+ test . ok ( project . objects [ 'PBXSourcesBuildPhase' ] ) ;
17+ test . done ( ) ;
18+ }
You can’t perform that action at this time.
0 commit comments