Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Breck Yunits authored and Breck Yunits committed Apr 27, 2024
1 parent 6cd722b commit 7728584
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions grammar/tables.grammar
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ abstractTableParser
compile() {
return `<table class="scrollTable"><thead><tr>${this.tableHeader.join("\n")}</tr></thead>\n<tbody>${this.tableBody}</tbody></table>`
}

rowParser
catchAllCellType stringCell
javascript
Expand All @@ -53,6 +54,7 @@ rowParser
}
return str
}

tableParser
description A table with a custom delimiter.
extends abstractTableParser
Expand All @@ -61,18 +63,22 @@ tableParser
get delimiter() {
return this.content ?? ""
}

commaTableParser
description Comma separated values table.
extends abstractTableParser
string delimiter ,

pipeTableParser
description Pipe separated values table.
extends abstractTableParser
string delimiter |

spaceTableParser
description Space separated values table. Last column is a catch all.
extends abstractTableParser
string delimiter

tabTableParser
description Tab separated values table.
extends abstractTableParser
Expand Down
3 changes: 3 additions & 0 deletions grammar/treeTable.grammar
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ treeRowContentParser
description Any blob content in a cell.
cells stringCell
catchAllCellType stringCell

treeRowColumnParser
catchAllParser treeRowContentParser
description A columnName value pair, or just a columnName if the value is a text blob.
cells idCell
catchAllCellType stringCell

treeRowParser
cells idCell
description The root node of a row.
Expand All @@ -31,6 +33,7 @@ treeRowParser
})
return str
}

treeTableParser
description A table of data written in Tree Notation form. Useful when a column contains a text blob.
extends abstractTableParser
Expand Down

0 comments on commit 7728584

Please sign in to comment.