src/parser.cpp

changeset 358
ef90ed0a5720
parent 335
c5830bce1c23
--- a/src/parser.cpp	Sat Apr 08 22:09:29 2023 +0300
+++ b/src/parser.cpp	Sun Apr 09 00:56:49 2023 +0300
@@ -107,6 +107,10 @@
 		parsed->content = match.captured(0);
 		return parsed;
 	};
+	if (auto line1Match = tryRe(exprs().commentRe)) {
+		LineType0* const parsed = init(LineType0{}, *line1Match);
+		parsed->value = Comment{attrib<Attribute::Text>(*parsed)};
+	}
 	if (auto line1Match = tryRe(exprs().subfileRe)) {
 		LineType1* const parsed = init(LineType1{}, *line1Match);
 		parsed->value = {
@@ -116,7 +120,7 @@
 					glm::vec4{vectorAttrib<Attribute::X2, Attribute::Y2, Attribute::Z2>(*parsed), 0},
 					glm::vec4{vectorAttrib<Attribute::X3, Attribute::Y3, Attribute::Z3>(*parsed), 0},
 					glm::vec4{vectorAttrib<Attribute::X4, Attribute::Y4, Attribute::Z4>(*parsed), 0},
-					glm::vec4{vectorAttrib<Attribute::X1, Attribute::Y1, Attribute::Z1>(*parsed), 0}
+					glm::vec4{vectorAttrib<Attribute::X1, Attribute::Y1, Attribute::Z1>(*parsed), 1}
 				},
 			},
 			colorAttrib(parsed),

mercurial