Skip to content

Commit 9cb9a10

Browse files
committed
fix: remove comments mentions
1 parent 6990e6e commit 9cb9a10

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
users[2]{id,name,role}:
2-
1,Alice,admin
3-
2,Bob,user
4-
5-
key: value
2+
1,Alice,admin # row 1
3+
2,Bob,user # row 2

playground/table_mixed3.toon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
users[2]{id,name,role}:
2+
1,Alice,admin
3+
2,Bob,user
4+
5+
key: value

src/main/kotlin/com/github/xepozz/toon/language/parser/Toon.bnf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ private entry ::=
4343
object_field
4444
| table
4545
| list_item
46-
| COMMENT
4746
| EOL
4847

4948
object_field ::= key DELIMITER field_value {
@@ -91,11 +90,11 @@ field_names ::= key (COMMA key)*
9190
table_data ::= table_data_inline | table_data_multiline
9291

9392
table_data_inline ::= table_data_value
94-
table_data_multiline ::= EOL INDENT table_data_multiline_item (EOL table_data_multiline_item)* EOL? DEDENT {
93+
table_data_multiline ::= EOL INDENT table_data_multiline_item (EOL | table_data_multiline_item)* DEDENT {
9594
pin = 2
9695
}
9796

98-
private table_data_multiline_item ::= table_data_value | COMMENT
97+
private table_data_multiline_item ::= table_data_value
9998
private table_data_value ::= value_list
10099

101100
table_row ::= value (COMMA value)*

0 commit comments

Comments
 (0)