CompileGeneric<string> throws error on parsing double quotes "

Oct 30, 2012 at 10:11 AM
Edited Oct 30, 2012 at 11:15 AM

Hi,

When I try this code I am getting an exception. I am trying to insert " (double quotes) within a string literal.

This is the code:

 

ExpressionContext fleeContext;

fleeContext = GetFleeContext<string>();

fleeContext.CompileGeneric<string>("\"");

this throws an exception which reads: Unexpected character: Unexpected character: \" Line: 1, Column: 1

Any idea how can I achieve this? i.e. being able to parse " successfully by flee

Regards,

Oct 21, 2013 at 11:45 PM
Edited Oct 21, 2013 at 11:46 PM
it's like you're telling the parser only "
dont forget you're passing a string containing a string litteral
and in your string every " and \ char must be escaped

so
fleeContext.CompileGeneric<string>("\"\\\"\"");