semgrep / pfff

pfff is mainly an OCaml API to write static analysis, dynamic analysis, code visualizations, code navigations, or style-preserving source-to-source transformations such as refactorings on source code.
https://semgrep.dev
Other
186 stars 29 forks source link

Scala: Parse underscores and long suffix in number literals #4155 #483

Closed mmcqd closed 3 years ago

mmcqd commented 3 years ago

Details in: https://github.com/returntocorp/semgrep/pull/4155

Security

linear[bot] commented 3 years ago
PA-157 [Scala] Parsing error

**Describe the bug** Code: ```scala import com.softwaremill.tagging._ trait Money object Main extends App { val coin: Long @@ Money = 100_000_000L.taggedWith[Money] } ``` Error: ``` Main.scala:6:40: Syntax error Raised at file "src/parsing/Parse_target.ml", line 174, characters 23-26 Called from file "src/cli/Main.ml", line 1114, characters 17-60 Called from file "src/pfff/h_program-lang/Error_code.ml", line 399, characters 4-8 Uncaught exception: Parse_info.Parsing_error(_) ``` **To Reproduce** Run attached code **Expected behavior** parsed **What is the priority of the bug to you?** - [ ] P0: blocking your adoption of Semgrep or workflow - [ ] P1: important to fix or quite annoying - [x] P2: regular bug that should get fixed **Environment** official docker [View original issue in GitHub](https://github.com/returntocorp/semgrep/issues/3322) ---