File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ CommentedIdentifier
7777 }
7878
7979CommentedValue
80- = literal :Literal _ comment :InlineComment
80+ = literal :Value _ comment :InlineComment
8181 {
8282 var result = Object .create (null )
8383 result .comment = comment .trim ();
@@ -117,22 +117,23 @@ Identifier
117117 { return id .join (' ' ) }
118118
119119Value
120- = obj :Object { return obj } / NumberValue / StringValue
121-
122- Literal
123- = StringValue
120+ = Object / NumberValue / StringValue
124121
125122NumberValue
126- = number :Digit + { return parseInt (number, 10 ) }
123+ = ! Alpha number :Digit + ! Alpha
124+ { return parseInt (number, 10 ) }
127125
128126Digit
129127 = [0-9]
130128
129+ Alpha
130+ = [A-Za-z]
131+
131132StringValue
132133 = literal :LiteralChar + { return literal .join (' ' ) }
133134
134135LiteralChar
135- = ! InlineCommentOpen char :[^;\n ]
136+ = ! InlineCommentOpen ! LineTerminator char :[^;\n ]
136137 { return char }
137138
138139SingleLineComment
@@ -153,6 +154,9 @@ NonLine
153154 = ! NewLine char :Char
154155 { return char }
155156
157+ LineTerminator
158+ = NewLine / ";"
159+
156160NewLine
157161 = [\n\r ]
158162
Original file line number Diff line number Diff line change @@ -27,3 +27,8 @@ exports['should split out properties and comments'] = function (test) {
2727 test . equal ( project [ 'rootObject_comment' ] , 'Project object' ) ;
2828 test . done ( ) ;
2929}
30+
31+ exports [ 'should parse non-commented hash things' ] = function ( test ) {
32+ test . equal ( project . nonObject , '29B97313FDCFA39411CA2CEF' ) ;
33+ test . done ( ) ;
34+ }
Original file line number Diff line number Diff line change 44 classes = {
55 };
66 objectVersion = 45;
7+ nonObject = 29B97313FDCFA39411CA2CEF;
78 rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
89}
You can’t perform that action at this time.
0 commit comments