r107062 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107061‎ | r107062 | r107063 >
Date:12:37, 22 December 2011
Author:gwicke
Status:ok
Tags:
Comment:
Update comments a bit.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt
@@ -981,7 +981,18 @@
982982
983983 list_char = [*#:;]
984984
985 -/* split up table handling into individual tokens */
 985+/**
 986+ * Tables
 987+ *
 988+ * Table productions are geared to support independent parsing of fragments in
 989+ * templates (the common table start / row / table end use case). The tokens
 990+ * produced by these fragments then match up to a table while building the
 991+ * DOM tree. For similar reasons, table rows do not emit explicit end tag
 992+ * tokens.
 993+ *
 994+ * The separate table_lines production is faster than moving those productions
 995+ * directly to block_lines.
 996+ * */
986997
987998 table_lines
988999 = & { return setFlag('table'); }
@@ -993,7 +1004,7 @@
9941005 }
9951006 / & { return clearFlag('table'); }
9961007
997 -// Make sure this is only active at start-of-line!
 1008+// This production assumes start-of-line position!
9981009 table_line
9991010 = table_start_tag
10001011 / table_row_tag
@@ -1024,8 +1035,6 @@
10251036 }
10261037
10271038
1028 -// Only add table rows directly to start-of-line productions, so we get
1029 -// implicit rows!
10301039 table_row_tag
10311040 = //& { console.log("table row enter"); return true; }
10321041 "|-"
@@ -1103,7 +1112,9 @@
11041113
11051114
11061115
1107 -/* Tables, full-table version (no support for table fragments from templates) */
 1116+/* Tables, full-table version (no support for table fragments from templates)
 1117+ * Only left here for comparison purposes with the above productions. Remove
 1118+ * when those work as intended! */
11081119 table
11091120 = tas:table_start space* c:table_caption? b:table_body? te:table_end {
11101121 var res = {type: 'TAG', name: 'table'}

Status & tagging log