Re: [PATCH v2 05/21] qapi/parser: Assert lexer value is a string

2021-05-18 Thread John Snow
On 5/18/21 6:02 AM, Markus Armbruster wrote: John Snow writes: The type checker can't narrow the type of the token value to string, because it's only loosely correlated with the return token. We know that a token of '#' should always have a "str" value. Add an assertion. Signed-off-by: John

Re: [PATCH v2 05/21] qapi/parser: Assert lexer value is a string

2021-05-18 Thread Markus Armbruster
John Snow writes: > The type checker can't narrow the type of the token value to string, > because it's only loosely correlated with the return token. > > We know that a token of '#' should always have a "str" value. > Add an assertion. > > Signed-off-by: John Snow > --- > scripts/qapi/parser.p

[PATCH v2 05/21] qapi/parser: Assert lexer value is a string

2021-05-11 Thread John Snow
The type checker can't narrow the type of the token value to string, because it's only loosely correlated with the return token. We know that a token of '#' should always have a "str" value. Add an assertion. Signed-off-by: John Snow --- scripts/qapi/parser.py | 1 + 1 file changed, 1 insertion