Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment syntax to tglf #59

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading