Power-Fx icon indicating copy to clipboard operation
Power-Fx copied to clipboard

Lexer is removing chars

Open anderson-joyle opened this issue 1 year ago • 0 comments

Lexer is removing chars from string inputs. This should work:

var expression = "\"AA" + char.ConvertFromUtf32(8203) + "BB\""; // expression.Length is 7
var tokens = TexlLexer.InvariantLexer.LexSource(expression, TexlLexer.Flags.None);
var stringToken = tokens[0] as StrLitToken; // stringToken.Legth 
Assert.Equal(stringToken.Value.Length, expression.Length - 2);

anderson-joyle avatar Apr 09 '24 00:04 anderson-joyle