Sjoerd Langkemper

Results 204 comments of Sjoerd Langkemper

I think the problems with conditional access are related to this issue: [Adding a rule changes associativity from right to left · Issue #1301 · tree-sitter/tree-sitter](https://github.com/tree-sitter/tree-sitter/issues/1301) Conditional access expressions conflict...

See also #131. [This comment](https://github.com/tree-sitter/tree-sitter-c-sharp/issues/131#issuecomment-708627117) seems to have a correct test.

Test case: ``` ===================================== Precedence between invocation and conditional access ===================================== var a = b?.ToString(); --- (compilation_unit (global_statement (local_declaration_statement (variable_declaration (implicit_type) (variable_declarator (identifier) (equals_value_clause (conditional_access_expression (identifier) (invocation_expression (member_binding_expression (identifier)) (argument_list)))))))))...

Test case: ``` ===================================== Cast with parentheses ===================================== var a = (Int32)(1); --- (compilation_unit (global_statement (local_declaration_statement (variable_declaration (implicit_type) (variable_declarator (identifier) (equals_value_clause (cast_expression (identifier) (parenthesized_expression (integer_literal))))))))) ```

This is because of a [length restriction](https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/src/hmacSHA256_fmt_plug.c#L64) in john. You can try increasing `SALT_LIMBS` in the source code to support larger data sizes. Also, I noticed that jumbo-john now supports...

I think comments are generally ignored by semgrep in any language. Today I also ran into a use case where I want to match comments, but in PHP: the comments...

There are two things causing this issue: * [Precedence incorrect between or and conditional access](https://github.com/tree-sitter/tree-sitter-c-sharp/issues/233) * map `a?.b` to `null == a ? null : a.b` [here](https://github.com/returntocorp/semgrep/blob/756408aafebb849d89993a067f9c6f8d834df8a4/semgrep-core/src/parsing/tree_sitter/Parse_csharp_tree_sitter.ml#L1295) So `x ||...

I am getting pretty tired of the stale bot.

> Basically x?.y becomes (x?).y This is semantically incorrect, especially with function calls. Consider `x?.y()`. In `(x?).y()`, `y()` is always called, possibly on a null value. When in reality, the...