File tree Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ StringValue
179179 = literal :LiteralChar + { return literal .join (' ' ) }
180180
181181LiteralChar
182- = ! InlineCommentOpen ! LineTerminator char :[^;\n ]
182+ = ! InlineCommentOpen ! LineTerminator char :[^;, \n ]
183183 { return char }
184184
185185/*
Original file line number Diff line number Diff line change 1+ // !$*UTF8*$!
2+ {
3+ archiveVersion = 1;
4+ classes = {
5+ };
6+ empties = (
7+ );
8+ ARCHS = (
9+ armv6,
10+ armv7,
11+ );
12+ files = (
13+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
14+ 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */,
15+ );
16+ objectVersion = 45;
17+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
18+ }
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/with_array.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 arrays with commented entries' ] = function ( test ) {
10+ test . ok ( project . files instanceof Array ) ;
11+ test . equal ( project . files . length , 2 ) ;
12+ test . done ( )
13+ }
14+
15+ exports [ 'should parse arrays with uncommented entries' ] = function ( test ) {
16+ test . ok ( project . ARCHS instanceof Array ) ;
17+ test . equal ( project . ARCHS . length , 2 ) ;
18+ test . done ( )
19+ }
20+
21+ exports [ 'should parse empty arrays' ] = function ( test ) {
22+ test . ok ( project . empties instanceof Array ) ;
23+ test . equal ( project . empties . length , 0 ) ;
24+ test . done ( ) ;
25+ }
You can’t perform that action at this time.
0 commit comments