forked from phoedos/pmd
Added support for various C++ string prefixes.
These were already tokenized without errors, but the prefixes were considered to be a separate token.
This commit is contained in:
@ -312,7 +312,9 @@ TOKEN :
|
||||
|
||||
< CHARACTER : ("L")? "'" ( ( ~["'","\\","\r","\n"] ) | ( "\\" ( ~["\n","\r"] ) ) )* "'" >
|
||||
|
||||
| < STRING : ("L")? "\"" ( ( ~["\"","\\","\r","\n"] ) | ( "\\" ( ~["\n","\r"] | "\n" | "\r\n" ) ) )* "\"" >
|
||||
| < #STRPREF : (["L", "u", "U"] | "u8")? >
|
||||
| < STRING : <STRPREF>
|
||||
"\"" ( ( ~["\"","\\","\r","\n"] ) | ( "\\" ( ~["\n","\r"] | "\n" | "\r\n" ) ) )* "\"" >
|
||||
|
||||
| < RSTRING : "R\"(" ( ~[")"] | ( ")" ~["\""] ) )* ")\"" >
|
||||
}
|
||||
|
Reference in New Issue
Block a user