Skip to content

Commit e72df9d

Browse files
committed
[grammar] cleaning up grammar a little
1 parent b94a411 commit e72df9d

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

pbxproj.pegjs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ Project
2121
return proj;
2222
}
2323

24-
Anything
25-
= Char / EOF
26-
2724
Object
2825
= "{" obj:(AssignmentList / EmptyBody) "}"
2926
{ return obj }
@@ -89,12 +86,15 @@ CommentedValue
8986
}
9087

9188
InlineComment
92-
= "/*" body:[^*]+ "*/"
89+
= InlineCommentOpen body:[^*]+ InlineCommentClose
9390
{ return body.join('') }
9491

9592
InlineCommentOpen
9693
= "/*"
9794

95+
InlineCommentClose
96+
= "*/"
97+
9898
DelimitedSection
9999
= begin:DelimitedSectionBegin _ fields:(AssignmentList / EmptyBody) _ DelimitedSectionEnd
100100
{
@@ -139,9 +139,6 @@ SingleLineComment
139139
= "//" _ contents:OneLineString NewLine
140140
{ return contents }
141141

142-
Terminator
143-
= NewLine? EOF
144-
145142
OneLineString
146143
= contents:NonLine*
147144
{ return contents.join('') }
@@ -159,12 +156,5 @@ NonLine
159156
NewLine
160157
= [\n\r]
161158

162-
EOF
163-
= !.
164-
165-
String
166-
= str:Char*
167-
{ return str.join('') }
168-
169159
Char
170160
= .

0 commit comments

Comments
 (0)