src/ldrawsyntaxhighlighter.cpp

changeset 342
9fd7dcab6d76
parent 331
638a7458ef5e
child 343
4a82990affd5
equal deleted inserted replaced
341:71c8cea3c205 342:9fd7dcab6d76
27 this->quadrilateralPattern = QRegularExpression{R"(^\s*(4)\s+(\d+)\s+)" FOUR_VECTORS R"(\s*$)"}; 27 this->quadrilateralPattern = QRegularExpression{R"(^\s*(4)\s+(\d+)\s+)" FOUR_VECTORS R"(\s*$)"};
28 this->cedgePattern = QRegularExpression{R"(^\s*(5)\s+(\d+)\s+)" FOUR_VECTORS R"(\s*$)"}; 28 this->cedgePattern = QRegularExpression{R"(^\s*(5)\s+(\d+)\s+)" FOUR_VECTORS R"(\s*$)"};
29 this->bfcPattern = QRegularExpression{QStringLiteral( 29 this->bfcPattern = QRegularExpression{QStringLiteral(
30 R"(^\s*(0) (BFC (?:CERTIFY CCW|CERTIFY CW|NOCERTIFY|INVERTNEXT|CLIP|NOCLIP))\s*$)" 30 R"(^\s*(0) (BFC (?:CERTIFY CCW|CERTIFY CW|NOCERTIFY|INVERTNEXT|CLIP|NOCLIP))\s*$)"
31 )}; 31 )};
32 this->commentPattern = QRegularExpression{R"(^\s*(0)\s+(.+)$)"}; 32 this->commentPattern = QRegularExpression{R"(^\s*(0)(\s+.*)?$)"};
33 } 33 }
34 34
35 void LDrawSyntaxHighlighter::highlightBlock(const QString& text) 35 void LDrawSyntaxHighlighter::highlightBlock(const QString& text)
36 { 36 {
37 bool matched = false; 37 bool matched = false;

mercurial