Add support for backslash

git-svn-id: http://root.cern.ch/svn/root/trunk@47791 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
Vassil Vassilev 2012-12-03 16:37:47 +00:00
parent ef8d4e85ba
commit e5a6058db4
2 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,7 @@ namespace cling {
char C = *curPos++;
switch (C) {
case '[': case ']': case '(': case ')': case '{': case '}': case '"':
case '\'': case ',': case '.': // INTENTIONAL FALL THROUGHs
case '\'': case '\\': case ',': case '.': // INTENTIONAL FALL THROUGHs
return LexPunctuator(C, Tok);
case '/':
@ -93,6 +93,7 @@ namespace cling {
case ',' : Tok.setKind(tok::comma); break;
case '.' : Tok.setKind(tok::dot); break;
case '/' : Tok.setKind(tok::slash); break;
case '\\' : Tok.setKind(tok::backslash); break;
case '\0' : Tok.setKind(tok::eof); Tok.setLength(0); break; // if static call
default: Tok.setLength(0); break;
}

View File

@ -26,6 +26,7 @@ namespace cling {
comma, // ","
dot, // "."
slash, // "/"
backslash, // "\"
ident, // (a-zA-Z)[(0-9a-zA-Z)*]
raw_ident, // .*^(' '|'\t')
comment, // //