Skip to content

Commit

Permalink
Add comment syntax to tglf
Browse files Browse the repository at this point in the history
  • Loading branch information
skieffer committed Jul 21, 2023
1 parent 09529ad commit 672bae2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cola/libdialect/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ Graph_SP dialect::buildGraphFromTglf(istream &in) {
while (getline(in, line)) {
// Skip empty lines.
if (line.empty()) continue;
// Comment lines begin with "//". (See https://stackoverflow.com/a/40441240)
if (line.rfind("//", 0) == 0) continue;
// Check for "#" lines.
if (line == "#") {
// Time to change state.
Expand Down
1 change: 1 addition & 0 deletions cola/libdialect/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Graph;
*
* TGLF looks like this:
*
* // This line is a comment.
* i0 cx0 cy0 w0 h0
* i1 cx1 cy1 w1 h1
* ...
Expand Down

0 comments on commit 672bae2

Please sign in to comment.