Merge branch 'release-3.29'
[kiteware-cmake.git] / Source / cmGeneratorExpressionLexer.h
bloba4321d1ae7095311a9ecd22c6670c0e044a30b9e
1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
3 #pragma once
5 #include "cmConfigure.h" // IWYU pragma: keep
7 #include <cstddef>
8 #include <string>
9 #include <vector>
11 struct cmGeneratorExpressionToken
13 cmGeneratorExpressionToken(unsigned type, const char* c, size_t l)
14 : TokenType(type)
15 , Content(c)
16 , Length(l)
19 enum
21 Text,
22 BeginExpression,
23 EndExpression,
24 ColonSeparator,
25 CommaSeparator
27 unsigned TokenType;
28 const char* Content;
29 size_t Length;
32 /** \class cmGeneratorExpressionLexer
35 class cmGeneratorExpressionLexer
37 public:
38 cmGeneratorExpressionLexer();
40 std::vector<cmGeneratorExpressionToken> Tokenize(const std::string& input);
42 bool GetSawGeneratorExpression() const
44 return this->SawGeneratorExpression;
47 private:
48 bool SawBeginExpression = false;
49 bool SawGeneratorExpression = false;