Skip to content
Snippets Groups Projects
Commit 0fdadb98 authored by Markus Blatt's avatar Markus Blatt
Browse files

Allow colons in variable assignments.

Allow text after endif.

[[Imported from SVN: r6989]]
parent 3b2ae2af
No related branches found
No related tags found
No related merge requests found
......@@ -273,7 +273,7 @@ def repl_tabs(tokens):
def am_2_cmake_string(amstring):
ParserElement.setDefaultWhitespaceChars("")
word = Word(alphanums+"*.-_=<>&!;,/")
word = Word(alphanums+"*:.-_=<>&!;,/")
ws=Word(' ')
opt_ws=Optional(ws)
varopen = Literal("$(")#.replaceWith("${")
......@@ -302,7 +302,7 @@ def am_2_cmake_string(amstring):
ifexpression = restOfLine + NL
ifexpression.setParseAction(rename_var)
ifbody = Group(lines)
endif = Literal('endif')
endif = Literal('endif')+restOfLine.suppress()
elsestatement = Forward()
elsestatement << (opt_ws+ Literal('else').setResultsName('elsestart') + NL + Group (lines))
#endif.setDebug()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment