diff options
author | Brad King <brad.king@kitware.com> | 2013-08-06 19:58:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-17 13:07:00 (GMT) |
commit | daa0f6f98df6e944a46a8dff13bb247cf7e301b1 (patch) | |
tree | 3125abd5ec16e69ab2019ae8c2c60c3fa5e00753 /Source/cmListFileLexer.h | |
parent | a8c652342f0e4dcaf933ecb0ce164b44d4997ae4 (diff) | |
download | CMake-daa0f6f98df6e944a46a8dff13bb247cf7e301b1.zip CMake-daa0f6f98df6e944a46a8dff13bb247cf7e301b1.tar.gz CMake-daa0f6f98df6e944a46a8dff13bb247cf7e301b1.tar.bz2 |
Add Lua-style long brackets and long comments to CMake language
Teach the CMake language parser to recognize Lua-style "long bracket"
arguments. These start with two '[' separated by zero or more '='
characters e.g. "[[" or "[=[" or "[==[". They end with two ']'
separated by the same number of '=' as the opening bracket. There is no
nesting of brackets of the same level (number of '='). No escapes,
variable expansion, or other processing is performed on the content
between such brackets so they always represent exactly one argument.
Also teach CMake to parse and ignore "long comment" syntax. A long
comment starts with "#" immediately followed by an opening long bracket.
It ends at the matching close long bracket.
Teach the RunCMake.Syntax test to cover long bracket and long comment
cases.
Diffstat (limited to 'Source/cmListFileLexer.h')
-rw-r--r-- | Source/cmListFileLexer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmListFileLexer.h b/Source/cmListFileLexer.h index 719347c..bd2868a 100644 --- a/Source/cmListFileLexer.h +++ b/Source/cmListFileLexer.h @@ -22,7 +22,10 @@ typedef enum cmListFileLexer_Type_e cmListFileLexer_Token_ParenRight, cmListFileLexer_Token_ArgumentUnquoted, cmListFileLexer_Token_ArgumentQuoted, + cmListFileLexer_Token_ArgumentBracket, + cmListFileLexer_Token_CommentBracket, cmListFileLexer_Token_BadCharacter, + cmListFileLexer_Token_BadBracket, cmListFileLexer_Token_BadString } cmListFileLexer_Type; |