1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
9 /* NOLINTNEXTLINE(modernize-use-using) */
10 typedef enum cmListFileLexer_Type_e
12 cmListFileLexer_Token_None
,
13 cmListFileLexer_Token_Space
,
14 cmListFileLexer_Token_Newline
,
15 cmListFileLexer_Token_Identifier
,
16 cmListFileLexer_Token_ParenLeft
,
17 cmListFileLexer_Token_ParenRight
,
18 cmListFileLexer_Token_ArgumentUnquoted
,
19 cmListFileLexer_Token_ArgumentQuoted
,
20 cmListFileLexer_Token_ArgumentBracket
,
21 cmListFileLexer_Token_CommentBracket
,
22 cmListFileLexer_Token_BadCharacter
,
23 cmListFileLexer_Token_BadBracket
,
24 cmListFileLexer_Token_BadString
25 } cmListFileLexer_Type
;
27 /* NOLINTNEXTLINE(modernize-use-using) */
28 typedef struct cmListFileLexer_Token_s cmListFileLexer_Token
;
29 struct cmListFileLexer_Token_s
31 cmListFileLexer_Type type
;
38 enum cmListFileLexer_BOM_e
40 cmListFileLexer_BOM_None
,
41 cmListFileLexer_BOM_Broken
,
42 cmListFileLexer_BOM_UTF8
,
43 cmListFileLexer_BOM_UTF16BE
,
44 cmListFileLexer_BOM_UTF16LE
,
45 cmListFileLexer_BOM_UTF32BE
,
46 cmListFileLexer_BOM_UTF32LE
49 /* NOLINTNEXTLINE(modernize-use-using) */
50 typedef enum cmListFileLexer_BOM_e cmListFileLexer_BOM
;
52 /* NOLINTNEXTLINE(modernize-use-using) */
53 typedef struct cmListFileLexer_s cmListFileLexer
;
55 cmListFileLexer
* cmListFileLexer_New(void);
56 int cmListFileLexer_SetFileName(cmListFileLexer
*, const char*,
57 cmListFileLexer_BOM
* bom
);
58 int cmListFileLexer_SetString(cmListFileLexer
*, const char*);
59 cmListFileLexer_Token
* cmListFileLexer_Scan(cmListFileLexer
*);
60 long cmListFileLexer_GetCurrentLine(cmListFileLexer
*);
61 long cmListFileLexer_GetCurrentColumn(cmListFileLexer
*);
62 const char* cmListFileLexer_GetTypeAsString(cmListFileLexer
*,
63 cmListFileLexer_Type
);
64 void cmListFileLexer_Delete(cmListFileLexer
*);